<#19443 Proposal: Make GitHub Releases our primary...
# github-notifications
c
#19443 Proposal: Make GitHub Releases our primary (and only) distribution of Pants wheels New discussion created by thejcannon As a solution for #11614 we've talked about getting off PyPI by getting on GitHub Releases. Technical Bits (Precursor) Automating Releases As a precursor to this, in order to ensure releases exist to have assets be uploaded, we need to automate the release being created from the tag. Implementation: Roughly
gh releases create ...
Uploading wheels on new releases We already build wheels as part of the release, they just need uploading. Implementation: Roughly
gh releases upload ...
Uploading wheels on prior releases Although not strictly necessary, it'd be nice to upload the wheels to older releases. Implementation: A script that downloads them from PyPI and uploads them to the release.
pants_requirements
target (and plugin support)
The
pants_requirements
target will now generate a
python_requirement
target that points directly to the GitHub Release assets for the wheels, with the necessary platform requirements: E.g. (scroll to the end to see the markers)
Copy code
pantsbuild.pants @ <https://github.com/pantsbuild/pants/releases/download/release_{PANTS_SEMVER}/pantsbuild.pants-{PANTS_SEMVER}-cp{PY_VER}-cp{PY_VER}-{plat_tag}_{machine}.whl> ; sys_platform == "linux" and platform_machine == "x86_64"
...
pantsbuild.pants @ <https://github.com/pantsbuild/pants/releases/download/release_{PANTS_SEMVER}/pantsbuild.pants-{PANTS_SEMVER}-cp{PY_VER}-cp{PY_VER}-{plat_tag}_{machine}.whl> ; sys_platform == "darwin" and platform_machine == "arm64" and platform_release == "11.0"
This would change the behavior of pinning loosely to pinning the exact version of Pants being run. Scie-pants
scie-pants
will be changed such that if the version being requested is
>
the version is is added in, it will use the wheel from the relevant GitHub Release. (E.g. `pip install pantsbuild.pants --find-links https://github.com/pantsbuild/pants/eleases/expanded_assets/release_&lt;version&gt;`). We could have this unconditionally use the GitHub release (instead of looking at the version) if we backport. That is up for discussion. Further changes could have us uploading a PEX and using that. That will happen in a separate discussion. The breaking changes Sunsetting PyPI As a result of this effort, we will stop uploading packages to PyPI. No proposal is made to yank/remove existing releases. Sunsetting
<http://binaries.pantsbuild.org|binaries.pantsbuild.org>
for wheels/`index.html`
As a result of this effort, we will stop uploading wheels to PyPI as well as generating/uploading
index.html (for
--find-links` support). Sunsetting
PANTS_SHA
support
Additionally to facilitate this change, we will deprecate usage of
PANTS_SHA
for any Pants non-stable release version. Since the release process is getting streamlined and automated, if a user needs a wheel build we''ll just produce a stable release build for them. Potential Future Changes Adding release notes GitHub supports release notes, which we likely should be uploading. We can shift the changelog process from our current PyPI-focused one to put the notes in the release. This process will be automated as part of release creation. It will likely come after the wheel uploading change, but before true PyPI sunsetting. Generating and hosting a simple cheeseshop HTML index To facilitate easier installing of wheels (both in-release by avoiding the need for platform markers, and across-releases) we could generate a simple HTML document with links to each release. Then users could point to it from pip's
--find-links
option. pantsbuild/pants