-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve
pants_requirements
from direct wheel links to GitHub Releas…
…e assets (#19432) After #19431 is merged and we're releasing wheels as GitHub Release assets, if/when we stop publishing to PyPI we need an alternate solution for pants plugin requirements. This change switches the `pants_requirements` target generator in two ways: - Allows for a version to be specified (defaulting to the current running version) which is matched exactly - Populates a private `_find_links` field with a value pointing to the relevant assets list for the release Then, the necessary plumbing is done for the new `_find_links` field, and testing. Local testing: ```console josh@cephandrius:~/work/techlabs$ cat pants-plugins/BUILD.pants | head -n6 pants_requirements( name = "pants", resolve = "pants-plugins", version="2.16.0.dev5", testutil=False ) josh@cephandrius:~/work/techlabs$ PANTS_SOURCE=../pants pants generate-lockfiles --resolve=pants-plugins Pantsd has been turned off via Env. 21:13:13.20 [INFO] Completed: Generate lockfile for pants-plugins 21:13:13.21 [INFO] Wrote lockfile for the resolve `pants-plugins` to 3rdparty/python/lockfiles/pants-plugins.lock josh@cephandrius:~/work/techlabs$ grep -v '^//' 3rdparty/python/lockfiles/pants-plugins.lock | jq '.locked_resolves[0].locked_requirements[] | select(.project_name == "pantsbuild-pants")' { "artifacts": [ { "algorithm": "sha256", "hash": "ea66ac27d983d4c7b3252845fbea635f4ae49ebd5fd5d139a167eb173a5dc5e0", "url": "https://github.com/pantsbuild/pants/releases/download/release_2.16.0.dev5/pantsbuild.pants-2.16.0.dev5-cp39-cp39-manylinux2014_x86_64.whl" }, { "algorithm": "sha256", "hash": "5428b46f33d824a8066a6d5c44379bce678cd3c504a07e06d214a6665fa8604a", "url": "https://github.com/pantsbuild/pants/releases/download/release_2.16.0.dev5/pantsbuild.pants-2.16.0.dev5-cp39-cp39-macosx_10_15_x86_64.whl" }, { "algorithm": "sha256", "hash": "f97f91ecf9913f0b1d2898f03326ac567e0e5e7df5bd1638536e1e87a566cd47", "url": "https://github.com/pantsbuild/pants/releases/download/release_2.16.0.dev5/pantsbuild.pants-2.16.0.dev5-cp39-cp39-macosx_11_0_arm64.whl" }, { "algorithm": "sha256", "hash": "c7e4e9a1a88f6ee1fac2d62fc52caebcb66029458fe1c1978b730b7a5bc8823a", "url": "https://github.com/pantsbuild/pants/releases/download/release_2.16.0.dev5/pantsbuild.pants-2.16.0.dev5-cp39-cp39-manylinux2014_aarch64.whl" } ], "project_name": "pantsbuild-pants", "requires_dists": [ "PyYAML<7.0,>=6.0", "ansicolors==1.1.8", "chevron==0.14.0", "fasteners==0.16.3", "humbug==0.2.7", "ijson==3.1.4", "importlib-resources==5.0.*", "packaging==21.3", "pex==2.1.120", "psutil==5.9.0", "python-lsp-jsonrpc==1.0.0", "setproctitle==1.3.2", "setuptools<64.0,>=63.1.0", "toml==0.10.2", "types-PyYAML==6.0.3", "types-setuptools==62.6.1", "types-toml==0.10.8", "typing-extensions==4.3.0" ], "requires_python": "<3.10,>=3.7", "version": "2.16.0.dev5" } ```
- Loading branch information
1 parent
6ebe0f5
commit 8c501f9
Showing
6 changed files
with
85 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters