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-manifestNo compatibility data collected yet for this library.
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`.
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).
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.
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.
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`.
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.
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`.
Install the required version control system (e.g., Git) and ensure its executable is included in your system's PATH environment variable.
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.