Hi Everybody,
I'm going to change Trac to have more than one inherit.plugins_dir
because I'm really concerned about Trac plugins in system wide
site-packages but would like to keep domestic plugins separated from
third-party ones.
Unfortunately it's not as easy as it should be because
1) project-local 'plugins' and shared 'inherit.plugin_dirs' handled
differently and ever these names hardcoded in different places.
2) PathOption class do path normalization at time of 'get' but not at
time of assignment as result it a) wasting comp power b) not flexible
(see my case) c) PathOption couldn't be used outside of config file
context - so you need to repeat path normalization code.
So what do you think about changes like below:
1. change load_components to:
def load_components(env, loaders= .. ):
search_path = env.plugin_dirs
for loadfunc in loaders:
loadfunc(env, search_path, auto_enable=search_path[0])
2. change shared_plugins_dir to
plugin_dirs =
[ PathOption.fromString(os.path.join(env.path,'plugins') ]
+
# return a list of PathOption objects
PathOption.fromConfigList( 'inherit','plugin_dirs' )
3. change PathOption to have fromConfigList, fromConfig,
fromString methods.
-Dmitry
--
Dmitry Samersoff
[email protected], http://devnull.samersoff.net
* I do want to change the world, I don't want the world to change me
--
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.