Registry / devops / check-manifest

check-manifest

JSON →
library0.51pypypiunverified

check-manifest is a command-line tool designed to verify the completeness of the `MANIFEST.in` file in Python source packages, helping developers avoid accidentally omitting files from source distributions. It does this by comparing files under version control with those included in a generated source distribution. The current version is 0.51, and the project maintains an active release cadence, often aligning updates with new Python version support and essential bug fixes.

pip install check-manifest
INSTALL
IMPORT
SIG · CHECK-MANIFEST
C
check-manifest
devopspythonv0.51
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

check-manifest is primarily used as a command-line tool. This quickstart demonstrates how to run it within a Python script to verify a project's `MANIFEST.in` (or generate one if missing). It sets up a temporary project with `git` to simulate a real-world scenario, then runs `check-manifest` to identify missing files and subsequently uses the `-u` flag to automatically update the `MANIFEST.in`.

import subprocess import os import shutil # Create a dummy project structure for demonstration project_dir = "my_package_to_check" os.makedirs(f"{project_dir}/my_package", exist_ok=True) with open(f"{project_dir}/setup.py", "w") as f: f.write("from setuptools import setup\nsetup(name='my_package', version='0.1.0')\n") with open(f"{project_dir}/my_package/__init__.py", "w") as f: f.write("import os\n __version__ = '0.1.0'\n") with open(f"{project_dir}/README.md", "w") as f: f.write("# My Package") print(f"Created dummy project in {project_dir}/") # Simulate initial git init and add/commit for check-manifest to work # check-manifest needs a VCS to compare against. subprocess.run(["git", "init", "-b", "main"], cwd=project_dir, capture_output=True, text=True) subprocess.run(["git", "add", "."], cwd=project_dir, capture_output=True, text=True) subprocess.run(["git", "commit", "-m", "Initial commit"], cwd=project_dir, capture_output=True, text=True) print("\n--- Running check-manifest (expecting no MANIFEST.in, so it will suggest one) ---") # Run check-manifest without updating initially result = subprocess.run( ["check-manifest"], cwd=project_dir, capture_output=True, text=True, check=False ) print(result.stdout) print(result.stderr) if result.returncode != 0: print("check-manifest detected issues (as expected without MANIFEST.in).") print("\n--- Running check-manifest with -u to update MANIFEST.in ---") result_update = subprocess.run( ["check-manifest", "-u"], cwd=project_dir, capture_output=True, text=True, check=False ) print(result_update.stdout) print(result_update.stderr) if result_update.returncode == 0: print("check-manifest -u successfully created/updated MANIFEST.in.") with open(f"{project_dir}/MANIFEST.in", "r") as f: print("\n--- Generated MANIFEST.in content ---") print(f.read()) else: print("check-manifest -u failed.") # Cleanup shutil.rmtree(project_dir) print(f"\nCleaned up dummy project directory: {project_dir}")
check-manifest --version
Debug
Known issues
breakingcheck-manifest version 0.51 dropped support for Python 3.7. Earlier versions (e.g., 0.45) also dropped Python 3.5 support. Ensure your development environment uses Python 3.8 or newer for compatibility.
fix
Upgrade your Python interpreter to version 3.8 or higher. If you must use an older Python, pin check-manifest to a compatible version (e.g., `<0.51` for Python 3.7).
affects: >=0.51 (drops Python 3.7), >=0.45 (drops Python 3.5)
gotchaUsers have reported significant performance degradation, particularly starting from version 0.41 and continuing in later releases. This can lead to slower CI/CD pipelines or local checks, especially in larger projects.
fix
While there's no direct fix within user configuration, be aware of potential performance impacts. Consider running `check-manifest` less frequently or in separate steps if it becomes a bottleneck. Monitor its execution time in your CI/CD.
affects: >=0.41
gotchacheck-manifest relies on the state of your Version Control System (VCS), like Git. Uncommitted changes, particularly deleted files, can cause `check-manifest` to report them as 'missing from sdist' until these changes are committed to your VCS.
fix
Always ensure your working directory changes are committed (or at least staged) in your VCS before running `check-manifest` to get accurate results. If a file is genuinely meant to be removed, commit its deletion first.
affects: All versions
Errors
Common errors & fixes
error: file <filename> is not in MANIFEST.in
This error occurs when a file that is present in your version control system (e.g., Git) is not listed in your `MANIFEST.in` file, meaning it will be omitted from your source distribution.
fix
Add the missing file or a pattern that includes it to your `MANIFEST.in` file. For example, to include a specific file: `include <filename>` or to include a type of file: `graft <directory>` or `include *.py`.
MANIFEST.in is missing
The `check-manifest` tool expects a `MANIFEST.in` file to exist in your project's root directory to verify source distribution completeness, and will warn if it's absent.
fix
Create a `MANIFEST.in` file in your project's root. You can use `check-manifest --create` to generate a starting `MANIFEST.in` file based on your version-controlled files.
IOError: [Errno 2] No such file or directory: '<filename>'
This `IOError` indicates that `check-manifest` found a file listed in version control or `MANIFEST.in` but could not locate it on the filesystem when attempting to build the source distribution.
fix
Ensure the file specified in the error message exists at the expected path. If the file was deleted, remove it from version control (e.g., `git rm <filename>`) and update your `MANIFEST.in` if necessary. If it's a temporary or generated file, add it to your `check-manifest` ignore patterns in `setup.cfg` or `pyproject.toml`.
error: command 'git' not found
The `check-manifest` tool relies on your project's version control system (like Git) to compare files. This error means the necessary VCS command is not available in your system's PATH.
fix
Install the required version control system (e.g., Git) and ensure its executable is included in your system's PATH environment variable.
`check-manifest` became super slow
While not a direct error message, users report significant performance degradation with `check-manifest`, often when run via `pre-commit` hooks, especially with larger projects or specific `pyproject.toml` configurations.
fix
Try using the `--verbose` flag for more insight into the slowdown. Consider updating `check-manifest` to the latest version, as performance improvements are often included. For `pre-commit` users, investigate if specific `args` like `--no-build-isolation` or `additional_dependencies` are affecting performance, or if the slowness is related to `pyproject.toml` parsing, which has been an area of optimization for the tool.
Upgrade
Version history
0.51latest on PyPI · released Oct 15, 2025
Audit
Dependencies
buildrequiredRequired for building source distributions during checks.
mockrequiredLikely used for testing internal components. Explicitly listed as a runtime dependency.
setuptoolsrequiredEssential for Python package building and interaction with `setup.py`.
tomlirequiredUsed for parsing `pyproject.toml` configuration files, especially for Python versions < 3.11 where `tomllib` is built-in.
pytestoptionalOptional dependency, typically for running tests if contributing to the library.
wheeloptionalOptional dependency, used for building wheel distributions. May be pulled in by `build`.
Agent activity
15 hits · last 30 days
node
10
OpenAI (training)
1
Resources
check-manifest — pip install check-manifest · libregistry