0
votes

I installed the Hello World plugin for trac, following the tutorial wich can be found here http://trac.edgewall.org/wiki/TracDev/PluginDevelopment and here https://trac-hacks.org/wiki/EggCookingTutorialTrac0.11, in my local installation of Agilo for Trac.

In both cases, installing the .egg-file worked fine, I also enabled it in the trac.ini, but the hello world button didn't show up in the navigation bar. The plugin is also not visible under "plugins" in the admin panel. But when I try to install it again, it says the plugin is already installed.

Did I miss something that I need to do in order to activate the plugin? (It is enabled in the trac.ini)

UPDATE I tried copying the hello world plugin as single .py file in the plugins directory and it works, so the error must be something with the setup script or the .egg file. I will check the file paths again, and answer this question if I figure it out. I'm glad I've gotten one step closer to the solution.

UPDATE
I still don't get the .egg to run. It works when I use a single file plugin, and also when using egg-link. Could someone have a look at my setup script in case I missed something?

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',
        ],
    },
)
1
I suggest checking the logs. Most likely the plugin is not loading.RjOllos
I don't get any errors in my log file. Searching through the file I also don't get any messages containing the name of the plugin. What can be a reason for a plugin to not load? Maybe a version conflict?Raimund Krämer
I suggest re-following the steps until you get to First Deployment. Most likely you missed a step such as adding helloworld/__init__.py. I ran through those steps and they work fine for me.RjOllos
Is this compatible with Trac 0.12.2? That's the version that comes with Agilo. What's the version you tested it with?Raimund Krämer
I don't see any reason it won't work with 0.12.2. The plugin is very simple and uses parts of the API that have been the same since 0.11RjOllos

1 Answers

0
votes

I finally found the reason why it didn't work. I didn't realize that Agilo for Trac is installed with its own Python. So even though the plugin was 100 % compatible, the egg file wasn't, because it was built with a different version of Python.