Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

New plugin installation problems

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


paul.wildthing at googlemail

Jul 10, 2012, 2:15 AM

Post #1 of 8 (434 views)
Permalink
New plugin installation problems

I've made a new plugin and it creates an egg fine (although the sources.txt
info file looks a bit sparse - it only contains the batch file for creating
the egg and the setup.py file). I've copied it into the plugins directory
on my testbed however it does not display on the admin page of trac and in
the log when running in debug trac is not even attempting to add the plugin
as it does with the rest of the plugins. The egg is readable, the python
version is correct and I have enabled it in the trac.ini file so any help
would really be appreciated!

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/eN7Jy7zu6M8J.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


ryano at physiosonics

Jul 10, 2012, 8:07 AM

Post #2 of 8 (431 views)
Permalink
New plugin installation problems [In reply to]

I've had a similar problem when forgetting to include an empty __init.py__ in the package directory. If that is not your issue, could you send your setup.py and a listing of your package layout?

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/MNaBIODXqdsJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


paul.wildthing at googlemail

Jul 10, 2012, 8:26 AM

Post #3 of 8 (425 views)
Permalink
Re: New plugin installation problems [In reply to]

Thanks for the replyI've now made a plugin which works using the tutorial
on trac-hacks. However, whenever I change the names of the files and the
references to them in the other files to something more useful than
'helloworld' the plugin stops working. The 2 copies I'm using are identical
in code apart from the names - the only thing that differs is the
SOURCES.txt file, which has far less references in it for the plugin which
has the changed names.

The directory structure for the working plugin is:

+helloworldplugin

+build

+bdist.win32

+lib

+dist

helloworldplugin-1.1-py2.7.egg

+helloworld

+templates

helloworld.html

__init__.py

helloworld.py

+helloworldplugin.egg-info

dependency_links,txt

entry_points.txt

PKG-INFO

SOURCES.txt

top_level.txt

create.bat

setup.py



I've also attached my setup.py file. The structure for the renamed plugin
is exactly the same and all references inside the fields have been changed
correctly.




On Tuesday, 10 July 2012 16:07:04 UTC+1, RjOllos wrote:
>
> I've had a similar problem when forgetting to include an empty __init.py__
> in the package directory. If that is not your issue, could you send your
> setup.py and a listing of your package layout?

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/mHnOrcT3BoEJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Attachments: setup.py (0.48 KB)


ryano at physiosonics

Jul 10, 2012, 11:20 PM

Post #4 of 8 (424 views)
Permalink
Re: New plugin installation problems [In reply to]

On Tuesday, July 10, 2012 8:26:07 AM UTC-7, paul.wilding wrote:
>
> Thanks for the replyI've now made a plugin which works using the tutorial
> on trac-hacks. However, whenever I change the names of the files and the
> references to them in the other files to something more useful than
> 'helloworld' the plugin stops working. The 2 copies I'm using are identical
> in code apart from the names - the only thing that differs is the
> SOURCES.txt file, which has far less references in it for the plugin which
> has the changed names.


You have a syntax error on the first line of your setup.py.

Could you just send your source with the renamed code/files and we can
figure out where the problem is?

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/oR_lAvjBt_0J.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


paul.wildthing at googlemail

Jul 11, 2012, 1:22 AM

Post #5 of 8 (423 views)
Permalink
Re: New plugin installation problems [In reply to]

No idea how that syntax error got into the setup.py file!

I've attached the source code with the renamed bits for you, thanks again.

On Wednesday, 11 July 2012 07:20:48 UTC+1, RjOllos wrote:
>
>
>
> On Tuesday, July 10, 2012 8:26:07 AM UTC-7, paul.wilding wrote:
>>
>> Thanks for the replyI've now made a plugin which works using the tutorial
>> on trac-hacks. However, whenever I change the names of the files and the
>> references to them in the other files to something more useful than
>> 'helloworld' the plugin stops working. The 2 copies I'm using are identical
>> in code apart from the names - the only thing that differs is the
>> SOURCES.txt file, which has far less references in it for the plugin which
>> has the changed names.
>
>
> You have a syntax error on the first line of your setup.py.
>
> Could you just send your source with the renamed code/files and we can
> figure out where the problem is?
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/FkEe8uUAC9QJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Attachments: buildrequestsplugin.zip (324 KB)


ryano at physiosonics

Jul 12, 2012, 5:05 PM

Post #6 of 8 (418 views)
Permalink
Re: New plugin installation problems [In reply to]

On Wednesday, July 11, 2012 1:22:44 AM UTC-7, paul.wilding wrote:
>
> No idea how that syntax error got into the setup.py file!
>
> I've attached the source code with the renamed bits for you, thanks again.
>

The plugin installed fine for me using `python setup.py install`. It also
installs fine in development mode, `python setup.py develop -md
/path/to/env/plugins-directory.

You may want to direct TracLogging to the console and see if you have any
errors.

http://trac.edgewall.org/wiki/TracLogging

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/GDXRm1RDaQwJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


paul.wildthing at googlemail

Jul 13, 2012, 2:57 AM

Post #7 of 8 (415 views)
Permalink
Re: New plugin installation problems [In reply to]

Those commands worked for fine, thanks! I was using a batch file before
with 'setup.py bdist_egg' to create the egg and then copying it into the
plugins directory which was probably the problem. Will there be any issues
with using the commands you suggested once I deploy the plugin?

On Tuesday, 10 July 2012 10:15:20 UTC+1, paul.wilding wrote:
>
> I've made a new plugin and it creates an egg fine (although the
> sources.txt info file looks a bit sparse - it only contains the batch file
> for creating the egg and the setup.py file). I've copied it into the
> plugins directory on my testbed however it does not display on the admin
> page of trac and in the log when running in debug trac is not even
> attempting to add the plugin as it does with the rest of the plugins. The
> egg is readable, the python version is correct and I have enabled it in the
> trac.ini file so any help would really be appreciated!

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/vaH9gbT4dLQJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


ryano at physiosonics

Jul 13, 2012, 3:13 PM

Post #8 of 8 (413 views)
Permalink
Re: New plugin installation problems [In reply to]

On Friday, July 13, 2012 2:57:07 AM UTC-7, paul.wilding wrote:
>
> Will there be any issues with using the commands you suggested once I
> deploy the plugin?
>

The plugins will be installed in site-packages for your installation, which
some say is not a good idea. I've been told that it is generally considered
bad practice to install plugins globally when you will be running other
applications in Python. My Trac instance is setup in a virtualenv, so it
doesn't seem to matter in that case. Others will probably have more
insightful comments on this.

It seems to work fine to copy the file into the $TRACENV/plugins directory
through:

python setup.py bdist_egg
cp dist/buildrequestsplugin-1.2-py2.6.egg /path/to/trac-env/plugins/

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/_yBgb3E-5ccJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.