Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"setup.py install" does not coexist nicely with "pip install" for namespace packages #960

Closed
theacodes opened this issue Feb 2, 2017 · 4 comments

Comments

@theacodes
Copy link
Member

An exhaustive test of how namespace package installation works across pip install, pip install -e, python setup.py install, and python setup.py devlop reveals that the following cases fail:

  1. Installing one package in the namespace using setup.py and the other using pip (order does not matter).
  2. Installing one package in the namespace using setup.py develop and the other using setup.py install (order does not matter).

You can see the entire matrix of scenarios here. Note that pep420 packages are failing on 2.x presumably because of #406.

Context: pypa/packaging.python.org#265 (comment)

@jaraco
Copy link
Member

jaraco commented Feb 3, 2017

Thanks for investing the time to catalog these shortcomings.

That's right. setup.py install invokes the egg protocol which was famously deprecated. I'd say it's unsupported to support mixed-method environments. It's difficult enough trying to support namespace packages in just one or the other modes.

First and foremost, I want to support pip install ., pip install -e .. Secondarily, I want to support pure non-pip installs through setup.py install and setup.py develop, although I consider that model (soft) deprecated and will eventually be superseded by pip entirely.

There's a proposal to actually replace easy_install with pip install in #917, which if that's viable would eliminate these differences.

I welcome others to dive in and work on #917 or otherwise try to make these modes work together, but to what advantage? Can you see any reason not to cut our losses and focus on the future?

@theacodes
Copy link
Member Author

That's right. setup.py install invokes the egg protocol which was famously deprecated. I'd say it's unsupported to support mixed-method environments. It's difficult enough trying to support namespace packages in just one or the other modes.

Cool - this was basically the guidance I was looking for. When I add documentation to the user guide about namespace packages I want to be able to authoritatively assert that this is unsupported.

First and foremost, I want to support pip install ., pip install -e .

Looks like that case works. :) (except for pep420 packages in 2.7)

Secondarily, I want to support pure non-pip installs through setup.py install and setup.py develop

That case seems to be failing.

There's a proposal to actually replace easy_install with pip install in #917, which if that's viable would eliminate these differences.

Cool, I'll keep an eye on this.

Can you see any reason not to cut our losses and focus on the future?

I actually would love to live in a world where pip install and pip install -e is all we have to worry about. My goal here is to figure out what works today and what doesn't and what we plan on supporting in the future so that I can write an authoritative guide on how to do namespace packages in Python.

@jaraco
Copy link
Member

jaraco commented Feb 3, 2017

Thanks for this help, and good luck. I'm going to close this ticket, but feel free (anyone) to file a ticket about the outstanding issues with non-pip installs. I personally used these extensively until I recently re-tooled my workflows to rely on pip.

@jaraco jaraco closed this as completed Feb 3, 2017
@theacodes
Copy link
Member Author

Thanks for this help, and good luck.

Thank you! Python packaging is complicated and I'm happy people like you are around.

(& I'll probably need the luck)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants