The deploy_pip rule was modified by #368 to allow deploying wheels and targz packages to repositories provided by a pypirc file. However, this broke this repository's consistent design: every deploy_* rule provides all possible repositories to upload to (eg. using snapshot or release), then selects which one to deploy to at run time using arguments.
This PR revert some changes to the deploy_pip rule to make it conform to this consistent design. We also fix some bugs during the upload process.
Finally, we extend the doc strings for each of the deploy rules to indicate how to select the repository to deploy to.
deploy_pip changes
The deploy_pip rule is changed to take multiple different destination repositories to upload to. These are provided, as before, using the existing snapshot or release attributes. The additional attribute of pypirc_repository (renamed from pypi_profile) is made available in the same way, rather than with an exclusive-or logic.
The pypirc_repository attribute refers the name of a repository declared in a pyripc file. This configuration file is an external file normally exists in a standard location such as $HOME/.pypirc.
After this change, deployment looks like this:
bazel run //:some-deploy-pip -- [pypirc|snapshot|release]
All deployment rules in this repository should continue to support declaring multiple target repositories in this manner, for the time being.
What are the changes implemented in this PR?
Add doc strings to show how to use deployment rules for either snapshot or release
Refactor deploy_pip to be consistent with the existing style, in which all potential deployment repositories are declared by attribute and the relevant one is selected as an argument to bazel run //... -- [arg]
Fix the upload of the .tar.gz and .whl packages to the target repository, which was failing because of non-existent paths
Downgrade setuptools to version 65.0.0, which still allows non-semantic versioned packages to distributed
and is a requirement for Vaticle for now
What is the goal of this PR?
The
deploy_pip
rule was modified by #368 to allow deploying wheels and targz packages to repositories provided by apypirc
file. However, this broke this repository's consistent design: everydeploy_*
rule provides all possible repositories to upload to (eg. usingsnapshot
orrelease
), then selects which one to deploy to at run time using arguments.This PR revert some changes to the
deploy_pip
rule to make it conform to this consistent design. We also fix some bugs during the upload process.Finally, we extend the doc strings for each of the deploy rules to indicate how to select the repository to deploy to.
deploy_pip
changesThe
deploy_pip
rule is changed to take multiple different destination repositories to upload to. These are provided, as before, using the existingsnapshot
orrelease
attributes. The additional attribute ofpypirc_repository
(renamed frompypi_profile
) is made available in the same way, rather than with an exclusive-or logic.Now we declare
deploy_pip
targets like this:The
pypirc_repository
attribute refers the name of a repository declared in a pyripc file. This configuration file is an external file normally exists in a standard location such as$HOME/.pypirc
.After this change, deployment looks like this:
All deployment rules in this repository should continue to support declaring multiple target repositories in this manner, for the time being.
What are the changes implemented in this PR?
deploy_pip
to be consistent with the existing style, in which all potential deployment repositories are declared by attribute and the relevant one is selected as an argument tobazel run //... -- [arg]
.tar.gz
and.whl
packages to the target repository, which was failing because of non-existent pathssetuptools
to version65.0.0
, which still allows non-semantic versioned packages to distributed and is a requirement for Vaticle for now