-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[email protected]: bootstrap with ensurepip #67030
Conversation
0d7ea57
to
2ac9b33
Compare
2ac9b33
to
e2532ff
Compare
10.14
Nothing too new (#66450). Except the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we still have the following?
resource "setuptools" do
url "https://files.pythonhosted.org/packages/12/e1/b9a2926a3c5a3fb055b8f85052f5baa890106a0e21b64a977c10affea751/setuptools-51.0.0.zip"
sha256 "029c49fd713e9230f6a41c0298e6e1f5839f2cde7104c0ad5e053a37777e7688"
end
resource "pip" do
url "https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz"
sha256 "43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2"
end
resource "wheel" do
url "https://files.pythonhosted.org/packages/d4/cf/732e05dce1e37b63d54d1836160b6e24fb36eeff2313e93315ad047c7d90/wheel-0.36.1.tar.gz"
sha256 "aaef9b8c36db72f8bf7f1e54f85f875c4d466819940863ca0b3f3f77f0a1646f"
end
I assume that these files are later used by the call to system bin/"pip3", "install", …
, but why not just run something like:
pip3 install --upgrade setuptools==51.0.0
pip3 install --upgrade pip==20.3.1
pip3 install --upgrade wheel==0.36.1
I imagine that pip should always return a consistent binary for every package & version pair.
If we install a version of pip for people to use, we should be able to trust that it will download correct packages to install.
If we don't trust it to install correct packages of versions, why are we installing it?
Does |
I haven't read it all, but here's https://pip.pypa.io/en/stable/reference/pip_install/#hashes-from-pypi |
I think we want a local hash, so |
That's disturbing indeed, since the CI post-install "gate" should still be shut according to the current formula. Both my local Homebrew instance and the formula file embedded in a freshly-downloaded bottle ( @Homebrew/core, is |
We should be able to use a I've used Homebrew-installed |
Actually, it looks like what you're asking is essentially what is already happening in the Without the resource blocks, then there is no |
While this could work, I don't really see how this is particularly beneficial over the
The new I aimed to be fairly conservative in my changes here. The key change is really that we bootstrap |
It sounds like it's fine to keep the But, just FYI, I think that if we had pip download the package updates instead of having |
So if it produces the exact same result using code that is different from all the other formulae and less familiar to maintainers and contributors (and hence requires special attention, is more difficult to maintain, etc), why do it? |
11.0
I think all the errors so far is already documented at #66450, with the exception of Seems like this can close #59802 already. |
Thanks @alebcay for working on this! |
I already mentioned:
So I was fine with not changing the formula to download the packages via I was just trying to discuss how |
Getting errors trying to install. I followed the instructions to try postinstall and tried the instructions from ensurepip to do pip upgrade then tried again. It looks like a fair amount of the postinstall isn't happening because of ensurepip failing. I briefly looked through some of the discussion and linked issues and saw discussion related to hashes that seem like it could be related but I don't see info on fixing. If this is expected maybe there should be some more detailed info about how to fix? If it's not, should i create a new issue for this?
I don't see anything wrong with my system that would be responsible but I'm no expert.
|
@xaocon please provide a full report as a new issue, with all the information requested, including full logs. Thanks! |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?This will (hopefully) address the original issue mentioned in #59802. We now use
ensurepip
to bootstrap an older version ofsetuptools
/pip
before installing our desired version ofsetuptools
,pip
, andwheel
using the bootstrappedpip
.The result is essentially that the
pip
script is no longer version locked and should not break if the user attempts to upgradepip
on their own (pip install -U pip
). See the linked issue for more details on that breaking behavior.This PR does not patch
ensurepip
to provide our chosen version ofsetuptools
andpip
(as some other package managers do) for end users who useensurepip
(e.g. in the process of creating avenv
). If we deem that a desirable change, it should happen in a different PR.If/when this gets merged, it may also be prudent to backport to
[email protected]
and[email protected]
.