I've heard it told that namespace packages are a little tricky, though the main requirement I've seen is just that your __init__.pys are empty.
TG itself uses a very low-tech solution. If you look at fastdata, you'll see that it defines an entry_point in setup.py that shows it as a TG plugin. The plugin file itself, plugin.py, defines tgsymbols which returns a dictionary of names that get loaded into the turbogears namespace. The only reason I set that up like that, though, was to deal with backwards compatibility. I'd probably just start packages off with some prefix rather than trying to do a namespace package sort of thing, in general. Kevin On Sep 19, 2006, at 12:18 PM, Elvelind Grandin wrote: > > http://peak.telecommunity.com/DevCenter/setuptools#namespace- > packages perhaps :) > > On 9/19/06, Ksenia Marasanova <[EMAIL PROTECTED]> wrote: >> >> Hi all, >> >> Pardon me if this is a silly question, I am just starting to >> understand setuptools :-) >> Is it possible to have several turbogears applications that can be >> imported as a subpackage? >> I am sure it's unclear, I'll try to explain it :) >> >> My directory structure is: >> /www >> /www/app1 >> /www/app2 >> /www/app3 >> >> All the apps are regular TG applications created with quickstart. >> When >> i run "python setup.py develop" in app1, I can import it from any >> other project as: >> >> from app1 import foo >> >> >> What I'd like to do, is to import it like this: >> from mycompanyname.app1 import foo >> >> The reason: name collision with other python packages and clear >> visual >> distinction between "own" code and third party. >> >> I tried to modify package name in setup.py, but without much >> succes... >> Any hints? >> >> Thanks a lot >> Ksenia. >> >>> >> > > > -- > cheers > elvelind grandin > > > -- Kevin Dangoor TurboGears / Zesty News email: [EMAIL PROTECTED] company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears -~----------~----~----~----~------~----~------~--~---

