setuptools incorporating dependency into own package using -'python,setuptools'

setuptools incorporating dependency into own package  using -'python,setuptools'

I have two setuptools packages (managed via which imports and calls setuptools.setup()). Both share the same base namespace packages: and The second depends on the first, and is listed in install_requires. The package is organized with all items under src/, which just grafts src/, and then recursively excludes *.pyc and __pycache__/**. namespace_packages is set as ['foo', ''] for both packages.

It works as expected. I can build a sdist, push it up to a private PyPI, pip install from that, etc. However, when the second package requires the first, and I run any python command (test, develop, install, etc.), it totally bombs.

Weirdly enough, when I fire up the CPython interpreter after develop fails, the first package is there. However, any packages that the first package depends on (like more-itertools), causes attempts to load those packages to error. Somehow, the code is being incorporated, but the dependencies are not.

Finally, if I turn on DISTUTILS_DEBUG=1 and SETUPTOOLS_DEBUG=1, I see the fetch from the private PyPI. I see the attempt to package the bdist_egg. Here's where it's weird: right after the bdist_egg output line, there's no more mention of this package?

I've been wracking my brain and searching constantly. Has anyone run into anything like this?

asked Sep 7, 2015 by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.