skillfed

setuptools-git

Setuptools revision control system plugin for Git

setuptools-git v1.2 609.4K downloads/30d#5,772 on PyPI34
Permissive license BSD Abandoned released

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-git

uv

uv add setuptools-git

poetry

poetry add setuptools-git

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.1Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Software Development :: Version Control

Tags

setuptools git integrationinclude git tracked files in packageautomated manifest from gitsetuptools plugin gitpython package distribution gitgit-aware setup.pydistribute tracked files automatically
abandonedlegacy-packaging

More Version Control packages