Ask a Question
Advertise on boostr.in
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 setup.py which imports and calls setuptools.setup()). Both share the same base namespace packages: foo.bar.util and foo.bar.service. The second depends on the first, and is listed in install_requires. The package is organized with all MANIFEST.in items under src/, which just grafts src/, and then recursively excludes *.pyc and __pycache__/**. namespace_packages is set as ['foo', 'foo.bar'] 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 setup.py 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?
Sep 7, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please