I don't know much about namespace packages, but I'd avoid them as they
lead to occasional problems on some systems. For instance, I can't
install Pyramid without --no-site-packages on some versions of Ubuntu,
because the "zope." namespace is split between the system
site-packages and the virtualenv's, and Python apparently can't handle
this. Py2exe is not Setuptools aware yet, so it may not be compatible
with namespace packages. (So far I haven't had a problem with Pylons
and Py2exe -- including SQLAlchemy -- as long as all imports are
listed explicitly rather than using Routes "autoload", but it may be
when I switch an application to Pyramid.)

On Sat, Apr 14, 2012 at 2:40 PM, Michael Bayer <[email protected]> wrote:
> it seems like my entire concept of having "root" and "root.subpackage", the 
> way "sqlalchemy" and "sqlalchemy.orm" do, is just entirely wrong from a 
> "namespace package" point of view.  While I think what I'm doing does 
> actually work, this is not what anyone had in mind with "namespace packages".
>
> I'm tempted to just merge these two things together.   But I think I'll just 
> move "dogpile" into "dogpile.core" and just get in line with everyone else.
>
>
>
> On Apr 14, 2012, at 4:08 PM, Michael Bayer wrote:
>
>> I think I released the dogpile.cache stuff incorrectly, actually installing 
>> the packages it seems like I got the namespace package stuff wrong.    I 
>> have the "pkg_resources.declare_namespace" directive in the 
>> dogpile/__init__.py of dogpile.cache but not of dogpile, and it appears that 
>> this needs to be exactly the opposite.
>>
>> Can someone help me set up dogpile and dogpile.cache correctly?  Here's a 
>> paste of what *seems* to work:
>>
>> http://paste.pocoo.org/show/581532/
>>
>> the questions I have are:
>>
>> 1. Is it OK if I have "__version__" and a few other things in 
>> dogpile/__init__.py of the root project ?  this seems to work, as "dogpile" 
>> is always imported first, but the docs at 
>> http://packages.python.org/distribute/setuptools.html#namespace-packages 
>> might suggest otherwise:
>>
>> "You must NOT include any other code and data in a namespace package’s 
>> __init__.py. Even though it may appear to work during development, or when 
>> projects are installed as .egg files, it will not work when the projects are 
>> installed using “system” packaging tools – in such cases the __init__.py 
>> files will not be installed, let alone executed."
>>
>> 2. since "dogpile" is always imported first it seems like I don't need 
>> anything in the dogpile/__init__.py of that of dogpile.cache ?
>>
>> 3. or is "dogpile" not always imported first in this scenario ?    how would 
>> I see that ?
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "pylons-discuss" 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/pylons-discuss?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" 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/pylons-discuss?hl=en.
>



-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to