setup-py-generation

Options to control how setup.py is generated from a python_distribution target.

Backend: pants.backend.python
Config section: [setup-py-generation]

Basic options

generate_setup_default

--[no-]setup-py-generation-generate-setup-default

PANTS_SETUP_PY_GENERATION_GENERATE_SETUP_DEFAULT

default: True

The default value for the generate_setup field on python_distribution targets. Can be overridden per-target by setting that field explicitly. Set this to False if you mostly rely on handwritten setup files (setup.py, setup.cfg and similar). Leave as True if you mostly rely on Pants generating setup files for you.


first_party_dependency_version_scheme

--setup-py-generation-first-party-dependency-version-scheme=<FirstPartyDependencyVersionScheme>

PANTS_SETUP_PY_GENERATION_FIRST_PARTY_DEPENDENCY_VERSION_SCHEME

one of: exact, compatible, any
default: exact

What version to set in install_requires when a python_distribution depends on other python_distributions. If exact, will use ==. If compatible, will use ~=. If any, will leave off the version. See https://www.python.org/dev/peps/pep-0440/#version-specifiers.


Advanced options

None

Deprecated options

None


Did this page help you?