For my Trac plugin, I want to pack my scripts and data together as an egg file. I used multiple different examples I found online as reference, but my egg file was not recognized by Trac.
I looked inside the egg file with 7zip, and all of the files seem to be in there, so I think it might be a problem with the meta data. The plugin itself works if I use just the .py script or an egg-link with absolute paths.
My project structure looks like this:
ticket-printer-plugin (the project root)
|
---setup.py
---ticketprinter
|
---__init__.py
---ticketprinter_admin.py
---ticketprinter_export.py
---htdocs
|
---css
| |
| ---ticketformat.css
|
---templates
|
---admin_panel.html
The init file in the ticketprinter package contains the following:
from ticketprinter_export import *
from ticketprinter_admin import *
The setup.py script looks like this:
from setuptools import setup
setup(
name='TracTicketPrinter', version='0.1',
packages=['ticketprinter'],
package_data={'ticketprinter': [
'htdocs/css/*.css',
'htdocs/templates/*.html']},
entry_points={
'trac.plugins': [
'ticketprinter = ticketprinter',
],
},
)
I checked the logs and there were no errors. It looks like Trac doesn't even recognize the egg file, so it might be a problem with the paths or the dependencies, but I can't find the mistake.