bitter-ability-32190
06/25/2023, 4:45 PMmain
)?
AFAICT, we could release the wheels as GitHub release artifacts, which is super easy to automate (especially since we're already using GHA š)
As best I can tell, we should be able to install from a URL here which would be the wheel.
All it takes is attaching the wheel to the releasebitter-ability-32190
06/25/2023, 4:45 PMhappy-kitchen-89482
06/25/2023, 5:55 PMhappy-kitchen-89482
06/25/2023, 5:55 PMhappy-kitchen-89482
06/25/2023, 5:55 PMbitter-ability-32190
06/25/2023, 6:09 PMbitter-ability-32190
06/25/2023, 6:10 PMbitter-ability-32190
06/26/2023, 12:12 AMhappy-kitchen-89482
06/26/2023, 2:25 AMhappy-kitchen-89482
06/26/2023, 2:26 AMhappy-kitchen-89482
06/26/2023, 2:26 AMbroad-processor-92400
06/26/2023, 6:05 AM--extra-index-url
somehow? I assume that's predictable/computable from inside Python fairly easily, but it'd be good to confirm
⢠I assume plugins can only depend on other PyPI packages, not URLs (git or direct wheel ones)? So a plugin published to PyPI must not specify a dependency on pantsbuild.pants
... I suspect that's okay functionally (since it'll be pants managing installing it, into an appropriate venv), but may be surprising to plugin authors, and means there's not a 'obvious' way to specify that a particular plugin version is only compatible with particular version(s) of pants?
Potential path forward?
1. Upload wheels to GH releases
2. Optional: Have a one off script that backfills wheels to GH releases for old releases
3. Adjust scie-pants to read from GH releases (either unconditionally, or fallback to PyPI, for too-old versions, depending on 2)
4. Communicate the deprecation/removal of installing from PyPI in some waybitter-ability-32190
06/26/2023, 11:27 AMbitter-ability-32190
06/26/2023, 11:27 AMbitter-ability-32190
06/26/2023, 11:28 AMbitter-ability-32190
06/26/2023, 11:38 AMbroad-processor-92400
06/26/2023, 12:05 PMFor 2: why do you assume that? A URL is a valid pip requirement specifier, no?PyPI doesn't have to accept all pip requirement specifiers. I know for sure that Rust's crates.io requires that all dependencies exist on crates.io, as an ecosystem assurance thing: reducing the risk of bitrot, when external URLs die (especially bad if some highly-depended-upon dep accidentally points to an external URL, kinda like left-pad). I don't know for sure for PyPI, but there's some hints it's similar, e.g. https://stackoverflow.com/a/54894359/1256624 and https://github.com/pypi/warehouse/blob/8d01d4bbe84d2235b2761ef5316a561e221cbc34/warehouse/forklift/legacy.py#L272-L275
bitter-ability-32190
06/26/2023, 7:01 PM--find-links
pointing to the releases page for a particular release doesn't "just work" (seems GitHub doesn't serve that page up)bitter-ability-32190
06/26/2023, 7:02 PMindex.html
redirectorbitter-ability-32190
06/26/2023, 7:14 PMbitter-ability-32190
06/26/2023, 7:54 PMbitter-ability-32190
06/26/2023, 7:59 PMpip
bitter-ability-32190
06/26/2023, 8:03 PMbitter-ability-32190
06/26/2023, 8:05 PMhappy-kitchen-89482
06/27/2023, 1:11 AMbroad-processor-92400
06/27/2023, 2:06 AMHmm, so bummer thatpointing to the releases page for a particular release doesn't "just work" (seems GitHub doesn't serve that page up)--find-links
We could, of course, host a littleI wondered if we could attach that as a release artifact too, e.g.redirectorindex.html
--find-links <https://github.com/pantsbuild/pants/releases/download/release_VERSION/wheel-links.html>
that contains the appropriate *.whl
links... the answer is no: github serves that with Content-Type: application/octet-stream
but pip
doesn't like this:
WARNING: Skipping page https://github.com/huonw/pants/releases/download/testing-pip-find-wheels-release-artifact/wheel-links.html because the GET request got Content-Type: application/octet-stream. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html(Experiment at https://github.com/huonw/pants/releases/tag/testing-pip-find-wheels-release-artifact) The content-type cannot be changed, AFAICT, so, if we're going the
--find-links
route, we'd have to upload the HTML file to S3, as you mention. This seems quite achievable, given pants already uploads to S3 as part of the release process?
(Alternatively, the set of supported platforms is pretty narrow, so deciding on the platform tags is probably not actually that hard. If we go with a non-universal PEX, we'd still have to decide on a per-platform tagging convention for scie-pants and pants to sync on... presumably much easier than reconstructing the wheel tags, though.)broad-processor-92400
06/27/2023, 2:10 AMwheel-links.html
release asset to a tempdir locally first, and then point --find-links
to that local copy.bitter-ability-32190
06/27/2023, 2:28 AMbroad-processor-92400
07/01/2023, 10:03 AM--find-links
, that actually points pip to <http://binaries.pantsbuild.org|binaries.pantsbuild.org>
for all the third-party wheels, having queried a listing of wheels from S3 directly: https://github.com/pantsbuild/scie-pants/blob/622df25b71c054fc0a7c58613d596e7e02bfcb88/tools/src/scie_pants/pants_version.py#L46
One could imagine adapting that process to read a pre-formed file from GH releases instead of <http://binaries.pantsbuild.org|binaries.pantsbuild.org>
bitter-ability-32190
07/01/2023, 12:13 PM