[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-distutils-sig
Subject:    [Distutils] bdist_wheel alters namespace packages paths:
From:       Brian Allen Vanderburg II via Distutils-SIG <distutils-sig () python ! org>
Date:       2016-07-04 15:49:39
Message-ID: 577A8593.9090309 () aim ! com
[Download RAW message or body]

In a manor similar to my previous messages about path manipulation from
the .pth files, I've noticed that a wheel created by bdist_wheel also
performs some path manipulation issues for namespace packages:

First it seems that setup.py when creating the wheel does not install
the __init__.py namespace file.  When the nspkg.pth file gets loaded by
site.py, it creates the dummy namespace module in sys.modules and sets
the __path__ to contain where it was found.

There seem to be couple issue with this:

Every namespace package under the same namespace must use the same
method to register it's path.  That is, every namespace package under
the same namespace will need an nspkg.pth file to extend the module
path.  This also prevents loading any namespace packages from the
current directory, such as for testing purposes, since the dummy module
is created by the nspkg.pth and seems to prevent the normal scanning of
sys.path for namespace packages during import.


Brian Allen Vanderburg II

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic