[Distutils] Setuptools 3.0b1 available for preview

PJ Eby pje at telecommunity.com
Thu Feb 13 19:03:31 CET 2014


On Wed, Feb 12, 2014 at 11:11 AM, Sebastien Douche <sdouche at gmail.com> wrote:
> On Wed, Feb 12, 2014 at 5:09 AM, Jason R. Coombs <jaraco at jaraco.com> wrote:
>
> Hi Jason
>
>> This backward-incompatible release contains the changes detailed in the
>> CHANGES.txt file:
>
> Issue #148: When building (bdist_egg), setuptools no longer adds
>   ``__init__.py`` files to namespace packages. Any packages that rely on this
>   behavior will need to create ``__init__.py`` files and include the
>   ``declare_namespace()``.
>
> Thing like:
>
> try:
>     __import__('pkg_resources').declare_namespace(__name__)
> except ImportError:
>     from pkgutil import extend_path
>     __path__ = extend_path(__path__, __name__)
> __init__.py (END)
>
> are theses lines good?

Yes.  The main idea is just that the __init__.py must set up the
namespace package, and not rely on setuptools doing the declaration
implicitly/automatically.


More information about the Distutils-SIG mailing list