[TIP] Single source bilingual namespace packages with dependencies

Marius Gedminas marius at gedmin.as
Thu Feb 9 09:38:00 PST 2017

On Thu, Feb 09, 2017 at 12:03:22PM -0500, Barry Warsaw wrote:
> I'm posting this here since I discovered the problem while running tox, but it
> may just be a more general packaging issue.  I submitted an issue to tox:
> https://github.com/tox-dev/tox/issues/453
> Let's say I have a package which lives in a namespace, supports both Python 2
> and 3 from a single source, and is dependent on another package in the same
> namespace.  In my case, I was porting lazr.config to Python 3.6 and it's
> dependent on lazr.delegates.
> Has anyone else encountered this problem?

I've seen this with zope.configuration:

Note that we already have a src/ subdirectory, but the test runner
(which is part of setuptools in this case -- the setup.py test
subcommand) helpfully inserts it to the front of sys.path anyway.

We eventually decided something's maybe breaking inside setuptools, or
we're just doing things we're not supposed to be doing (mixing PEP-420
namespace packages with old-style namespace packages).

I still don't understand why this problem shows up only on Python 3.5 and
newer, but not on 3.3 or 3.4, which also had PEP-420 namespace packages.

The workaround I personally settled on is using `usedevelop = true` in

There's a setuptools bug open about this and Jason is trying valiantly
to understand what's going on: https://github.com/pypa/setuptools/issues/912

Marius Gedminas
A: Because it makes the logic of the discussion difficult to follow.
Q: Why shouldn't I top post?
A: No.
Q: Should I top post?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20170209/0c23f2e3/attachment.pgp>

More information about the testing-in-python mailing list