twine
The utility for publishing Python distributions to PyPI and other Python repositories.
This version of Pants uses twine
version 4.0.2 by default. Use a dedicated lockfile and the install_from_resolve
option to control this.
Backend: pants.backend.experimental.python
Config section: [twine]
Basic options
args
--twine-args="[<shell_str>, <shell_str>, ...]"
PANTS_TWINE_ARGS
[twine]
args = [
<shell_str>,
<shell_str>,
...,
]
[]
Arguments to pass directly to Twine, e.g. --twine-args='--skip-existing'
.
skip
--[no-]twine-skip
PANTS_TWINE_SKIP
[twine]
skip = <bool>
False
If true, don't use Twine when running pants publish
.
Advanced options
ca_certs_path
--twine-ca-certs-path=<str>
PANTS_TWINE_CA_CERTS_PATH
[twine]
ca_certs_path = <str>
<inherit>
Path to a file containing PEM-format CA certificates used for verifying secure connections when publishing python distributions.
Uses the value from [GLOBAL].ca_certs_path
by default. Set to "<none>"
to not use any certificates.
Even when using the docker_environment
and remote_environment
targets, this path will be read from the local host, and those certs will be used in the environment.
This option cannot be overridden via environment targets, so if you need a different value than what the rest of your organization is using, override the value via an environment variable, CLI argument, or .pants.rc
file. See https://www.pantsbuild.org/2.25/docs/using-pants/key-concepts/options.
config
--twine-config=<file_option>
PANTS_TWINE_CONFIG
[twine]
config = <file_option>
None
Path to a .pypirc config file to use. (https://packaging.python.org/specifications/pypirc/)
Setting this option will disable [twine].config_discovery
. Use this option if the config is located in a non-standard location.
config_discovery
--[no-]twine-config-discovery
PANTS_TWINE_CONFIG_DISCOVERY
[twine]
config_discovery = <bool>
True
If true, Pants will include all relevant config files during runs (.pypirc
).
Use [twine].config
instead if your config is in a non-standard location.
console_script
--twine-console-script=<str>
PANTS_TWINE_CONSOLE_SCRIPT
[twine]
console_script = <str>
twine
The console script for the tool. Using this option is generally preferable to (and mutually exclusive with) specifying an --entry-point
since console script names have a higher expectation of staying stable across releases of the tool. Usually, you will not want to change this from the default.