What is setuptools-scm
mainsetuptools-scm is a tool that extracts Python package versions from git or hg (Mercurial) metadata. Instead of manually declaring a version string in your source code or a managed file, setuptools-scm infers it from your Version Control System (VCS) state.
Key Features:
- Automatic Versioning: Uses VCS tags and history to determine the current version.
- SCM-managed File Inclusion: Automatically adds all files tracked by your SCM to the source distribution (
sdist).
⚠️ Important Security/Cleanup Note:
Because it automatically includes all SCM-tracked files in your source distributions, any development files tracked in Git/Mercurial will be included in your package. To prevent unwanted files from being shipped, you must use a MANIFEST.in file to exclude them or configure Git archive settings.