Hi All,
I finally get to work on this. I spent a few hour trying to get the
Helloworld plugin to work. I know I am a newbie (both Python and Trac) but
I think it is very important to have good document for newbie to be able to
create a helloworld plugin in short time. I have a few questions regarding
this.
1) Naming in setup.py. I am trying to understand how the name works.
Let's use example from the link.
from setuptools import find_packages, setup
setup(
name='TracHelloWorld', version='1.0',
packages=find_packages(exclude=['*.tests*']),
entry_points = """
[trac.plugins]
helloworld = myplugs.helloworld
""",)
I notice that the name TracHelloworld will be the name of the egg.
I don't understand how the naming for [trac.plugins] works. The problem is,
I can't get the helloworld plugin to work using this setup.py. I have to
use this one. I change the name of the folder to helloworld and have
helloword.py in it.
from setuptools import find_packages, setup
setup(
name='helloworld', version='1.0',
packages=find_packages(exclude=['*.tests*']),
entry_points = """
[trac.plugins]
helloworld = helloworld.helloworld
""",
)
My question would be, why the first setup.py doesn't work?
2) Do I need to add the plugin into the trac.ini to work? If so what name
should I use?
Do I use the name of package or the name of the egg? I tried using
TracHelloWorld.* = enabeled but that didn't work. After I changed the
setup.py to the second one, and use helloworld.* = enabled, it worked.
3) What are considered packages when using find_packages? Are they the
folders that is in the same level as the setup.py?
4) How plugins are structured? I start to get confused when I tried to
create plugin. Does each module considered a plugin or the package is
considered a plugin? When I look at the trac code, I see that many .py
files under the same folder (package) such as ticket are included under [
trac.plugins]
5) If there are many plugin under same package, how can I distinguish
between a plugin and normal .py file. I think anything that is considered a
plugin should be in the setup file. What about the api.py, model.py, and
notification?
6) What would be your advice on how to design plugin? There are many
feature that I would like to create as plugin. I am not sure if I should do
it as one plugin or more. Currently, my rule of thumb is to let a plugin
have only one new menu.
5) Is it possible to modify the content of Trac's core using plugin? I
would like to enhance the results in milestone page for example. I would
like to add the capability to view progress by action. I think it is useful
to know how many ticket are new, assigned, fixed.
Thanks a lot in advance. I will try to incoperate my new knowlege into
the wiki so that it is easier to follow.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---