vaticle / bazel-distribution

Bazel rules for assembling and deploying software distributions (see @vaticle for usage example)
https://bazel.build
Apache License 2.0
155 stars 53 forks source link

pass twine publish args in deploy_pip #411

Open mgosk opened 3 months ago

mgosk commented 3 months ago

What is the goal of this PR?

Be able to pass twine args eg --skip-existing , "--non-interactive"

What are the changes implemented in this PR?

Pass twine publish args in deploy_pip function

Live tested on private repository together with other waiting PRs https://github.com/mgosk/bazel-distribution/tree/bzlmod-with-pypi

alexjpwalker commented 3 weeks ago

hi @mgosk , thank you for the contribution!

This change would be more explicit and aligned with the other rules in bazel_distribution if the arguments supported by twine were each individually configurable in the rule's arguments.

Something like

        "skip_existing": attr.bool(
            default = False,
            doc = "Continue uploading files if one already exists. (Only valid when uploading to PyPI. Other implementations may not support this.)"
        ),