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

Implement ./setup.py install --pip #529

Closed
embray opened this issue Apr 1, 2016 · 14 comments
Closed

Implement ./setup.py install --pip #529

embray opened this issue Apr 1, 2016 · 14 comments
Labels
enhancement Needs Discussion Issues where the implementation still needs to be discussed. wontfix

Comments

@embray
Copy link
Contributor

embray commented Apr 1, 2016

Back in December I proposed adding an opt-in --pip option to ./setup.py install that will force using pip to install a package, rather than using easy_install. This would address existing requests to stop using easy_install by default for packages that use setuptools, without breaking backward compatibility where needed. The full proposal is here: https://mail.python.org/pipermail/distutils-sig/2015-December/027900.html

Individual projects can enable pip-installation by default by setting

[install]
pip = True

in their setup.cfg. Users may also install all projects with pip by default by setting the same in their pydistutils.cfg or equivalent. Of course, we should be discouraging ./setup.py install in the first place, but the idiom is stubbornly persistent in the wider Python universe. (A global setting would be somewhat dangerous as there are still some packages that won't install from pip at all, but they are less common).

It hasn't been discussed really since then that I can see, but had positive feedback at the time. I just didn't follow through with it due to the distraction of moving to a new country :)

The sample implementation I provided should be a good starting point. Still to be resolved is the issue of using pip for setup_requires as well, and will take a little more work.

I just wanted to post an issue so that the idea isn't lost. I intend to post a PR with tests soon.

@marscher
Copy link

marscher commented Apr 13, 2016

Thank you for this great suggestion, it will solve a lot of easy_install related problems.

@jaraco
Copy link
Member

jaraco commented Apr 16, 2016

I'd like to see a fix for #250 before accepting a patch to use pip for installing packages, especially if individual packages are allowed to opt in to the behavior (limiting control by the user invoking the commands).

@petmakris
Copy link

Maybe this needs to be discussed more. setuptools should use pip more.
For example, why it cannot use pip to resolve install_requires dependencies?

@jaraco
Copy link
Member

jaraco commented Apr 16, 2016

why it cannot use pip to resolve install_requires dependencies

I think that's what's being proposed here.

@embray
Copy link
Contributor Author

embray commented Apr 18, 2016

Yes, that's part of the idea here. More importantly, the point here is that by default projects that use setuptools use easy_install (as opposed to the vanilla 'install' command from distutils, or even anything resembling it). to implement the ./setup.py install command, which is now generally disfavored. This allows projects to opt in to ./setup.py install--which still has a lot of cultural cache--to be handled by pip instead.

@embray
Copy link
Contributor Author

embray commented Apr 18, 2016

@jaraco I'm not totally sure what the interaction is between this and #250 though I'm sure you have something in mind. Unless you're just saying you'd rather I spent my time fixing #250 in which case you probably have a good point there too :) Totally forgot about that one. Looks like it needs a patch in pip too (which actually might answer my first question).

@jaraco
Copy link
Member

jaraco commented Apr 18, 2016

I'm not totally sure what the interaction is between this and #250.

The interaction isn't specifically your involvement (though welcomed), but rather lessening the most egregious disparity between pip installs and easy_installs. I'd like to be at a place where I can comfortably recommend using pip exclusively, and #250 is the main blocker for doing so.

@embray
Copy link
Contributor Author

embray commented Apr 18, 2016

Sounds reasonable.

@petmakris
Copy link

Anything new on this issue?

@embray
Copy link
Contributor Author

embray commented Jun 14, 2016

@petmakris I (or somebody) still needs to address #250 . I've been meaning to get to it. I might be able to this week if I get some other things out of the way first.

If someone else would like to take a stab at it, as I wrote here, I experimented with the second suggested fix here, with the simplification that in my experiments the lexicographic order for the .nspkg filename didn't matter.

If I rummage around I should still have a copy of the change I made somewhere, but I just never got around to outputting it as a patch!

@embray
Copy link
Contributor Author

embray commented Jun 14, 2016

(Part of the hold up is that I changed jobs earlier this year, and the work I was doing on setuptools was on my computer at my old job--I have everything backed up though so I just need to pull it up again. Fixing this is still definitely relevant to my interests.)

@pradyunsg
Copy link
Member

@pypa/setuptools-developers Hi!

With #250 resolved, is there interest in moving this forward? I do think setuptools should move the installations over to use pip more (maybe even exclusively, at some point in the future).

@pganssle pganssle added Needs Triage Issues that need to be evaluated for severity and status. enhancement Needs Discussion Issues where the implementation still needs to be discussed. and removed Needs Triage Issues that need to be evaluated for severity and status. labels Oct 19, 2018
@pganssle
Copy link
Member

I am inclined to say that we should move forward with #917, but not implement this change.

My thinking is that we probably don't want people invoking setup.py install anyway, and they should be using pip install instead.

@jaraco
Copy link
Member

jaraco commented Oct 22, 2021

Indeed. We're deprecating setup.py commands, including install, and relying on pip and other standards.

@jaraco jaraco closed this as completed Oct 22, 2021
@jaraco jaraco added the wontfix label Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Needs Discussion Issues where the implementation still needs to be discussed. wontfix
Projects
None yet
Development

No branches or pull requests

6 participants