---
id: setuptools-scm
version: "10.2.1"
license: MIT
license_treatment: permissive
maintenance: active
---
# setuptools-scm — the blessed package to manage your versions by scm tags
License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI
## Install
pip install setuptools-scm
uv add setuptools-scm
poetry add setuptools-scm
## Description
# setuptools-scm
[](https://github.com/pypa/setuptools-scm/actions/workflows/python-tests.yml)
[](https://setuptools-scm.readthedocs.io/en/latest/?badge=latest)
[ ](https://tidelift.com/subscription/pkg/pypi-setuptools-scm?utm_source=pypi-setuptools-scm&utm_medium=readme)
## about
[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][git-archive-docs].
> **⚠️ 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...
## AI interpretation — verify before relying
setuptools-scm extracts Python package versions automatically from git or Mercurial metadata during build, eliminating manual version declarations and automatically including all SCM-tracked files in source distributions.
Verdict: setuptools-scm is a mature, actively maintained tool (951 GitHub stars, no known vulnerabilities) that simplifies Python package versioning by deriving it from VCS metadata. Its low install friction and permissive MIT license make it a safe choice for build pipelines, though users must be aware that it automatically includes all SCM-tracked files in distributions—exclusions must be configured explicitly via MANIFEST.in.
[View on SkillFed](https://skillfed.io/packages/setuptools-scm) · [View on PyPI](https://pypi.org/project/setuptools-scm/)