You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setuptools-scm extracts Python package versions from git or hg metadata
instead of declaring them as the version argument
or in a Source Code Managed (SCM) managed file.
Additionally setuptools-scm provides setuptools with a list of
files that are managed by the SCM
(i.e. it automatically adds all the SCM-managed files to the sdist).
Unwanted files must be excluded via MANIFEST.in
or configuring Git archive.
⚠️ Important: Installing setuptools-scm automatically enables a file finder that includes all SCM-tracked files in your source distributions. This can be surprising if you have development files tracked in Git/Mercurial that you don't want in your package. Use MANIFEST.in to exclude unwanted files. See the documentation for details.
pyproject.toml usage
The preferred way to configure setuptools-scm is to author
settings in a tool.setuptools_scm section of pyproject.toml.
This feature requires setuptools 61 or later.
First, ensure that setuptools-scm is present during the project's
build step by specifying it as one of the build requirements.
If you need to confirm which version string is being generated or debug the configuration,
you can install setuptools-scm directly in your working environment and run:
$ python -m setuptools_scm
# To explore other options, try:
$ python -m setuptools_scm --help
Some enterprise distributions like RHEL7
ship rather old setuptools versions.
In those cases its typically possible to build by using an sdist against setuptools-scm<2.0.
As those old setuptools versions lack sensible types for versions,
modern setuptools-scm is unable to support them sensibly.
It's strongly recommended to build a wheel artifact using modern Python and setuptools,
then installing the artifact instead of trying to run against old setuptools versions.
Code of Conduct
Everyone interacting in the setuptools-scm project's codebases, issue
trackers, chat rooms, and mailing lists is expected to follow the
PSF Code of Conduct.
Security Contact
To report a security vulnerability, please use the
Tidelift security contact.
Tidelift will coordinate the fix and disclosure.
About
the blessed package to manage your versions by scm tags