setuptools-git
Setuptools revision control system plugin for Git
What it is and what it does
setuptools-git is a setuptools plugin that teaches the build system to automatically discover and include all files tracked by git when creating package distributions (sdist, wheels, eggs, etc.). Instead of manually listing files in MANIFEST.in, you enable git integration by adding include_package_data=True to your setup() call, and the plugin queries git to determine what to package.
The plugin works by hooking into setuptools' file discovery process during package builds. It reads git's tracked file list and tells setuptools which files belong in the distribution. You can still exclude specific files using MANIFEST.in directives or exclude_package_data in setup(). The main gotcha is that git and git metadata must be present—if someone extracts your package from a tarball or clones without installing this plugin, the build will lack the information needed to know which files to include.
Use it for:
- Automatically include all source files, tests, and documentation tracked in git without maintaining a separate MANIFEST.in file.
- Ensure that binary package builds (wheels, eggs) include the same files as source distributions by querying git instead of hardcoding paths.
- Exclude specific files (e.g., .gitignore, build artifacts) from distributions using MANIFEST.in or exclude_package_data without losing other tracked files.
- Simplify setup.py for projects where git is the source of truth for what should be packaged.
- Optimize directory scanning by skipping git-ignored directories during package discovery.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A setuptools plugin that automatically includes all git-tracked files in Python package distributions, eliminating the need for manual MANIFEST.in specifications.
No. While the plugin solves a real problem and has low install friction, it has been abandoned since 2017-02-18 with no maintenance. Modern Python packaging has evolved significantly (setuptools, build backends, pyproject.toml), and there is no assurance this plugin works with current tooling. For new projects, use modern alternatives like setuptools' native include_package_data with explicit file lists, or build backends that handle this natively. Only consider it for legacy projects already relying on it.
Install
setuptools-git on PyPI
pip
pip install setuptools-gituv
uv add setuptools-gitpoetry
poetry add setuptools-gitInstalling setuptools-git
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2017-02-18, and the repository has received no active maintenance since then, which poses a risk for compatibility with modern Python or setuptools versions.
License in practice
Licensed under BSD (permissive), which places no restrictions on use, modification, or distribution in your own projects.
Quickstart
pip install setuptools-git
In setup.py:
from setuptools import setup, find_packages
setup(
packages=find_packages(),
include_package_data=True,
setup_requires=["setuptools_git >= 0.3"],
)
Requires git and git metadata to be available in the working directory; will not work on non-git distributions (e.g., extracted tarballs) or if the plugin is not installed in the build environment.
Verify before relying
- Compatibility with Python versions and setuptools versions released after 2017.
- Whether the package works with modern build backends (pyproject.toml, build).
- Known issues or breaking changes in setuptools that may affect this plugin's functionality.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,464 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 609,443/month — #5,772 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: setuptools_git-1.2-py2.py3-none-any.whl
Keywords: distutils, setuptools, git
Tags
More Version Control packages
Automatically extracts and manages Python…
permissive · top 1,000 on PyPI
dulwichDulwich provides pure Python access to Git…
unclear · top 1,000 on PyPI
setuptools-rustsetuptools-rust is a setuptools plugin that…
permissive · top 5,000 on PyPI
pygit2pygit2 provides Python bindings to libgit2,…
copyleft · top 5,000 on PyPI
poetry-dynamic-versioningA Poetry plugin that automatically derives and…
permissive · top 5,000 on PyPI
whatthepatchParses and applies patch files in multiple diff…
permissive · top 5,000 on PyPI
setuptools-downloadA setuptools plugin that downloads external…
permissive · top 5,000 on PyPI
setuptools-golangA setuptools extension that builds CPython…
permissive · top 5,000 on PyPI
setuptools-odooSetuptools-odoo automates packaging of Odoo…
copyleft · top 15,000 on PyPI
distributeDistribute is a legacy compatibility wrapper…
permissive · top 15,000 on PyPI
setuptools-git-versioningAutomatically generates PEP 440-compliant…
permissive · top 5,000 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
setuptools-protobufA setuptools plugin that automates compilation…
permissive · top 15,000 on PyPI
westWest is a meta-tool for managing multiple Git…
permissive · top 5,000 on PyPI
check-manifestValidates that a Python package's MANIFEST.in…
permissive · top 5,000 on PyPI