Tool to check the completeness of for Python packages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hugo van Kemenade 6d9533cd2c Fix isort 4 months ago
.github pypy3 means 3.6 on GitHub Actions, we need >= 3.7 7 months ago
.coveragerc Refactor UI code to avoid global state 2 years ago
.gitignore Rewrite the IgnoreList logic to be more distutils-like 2 years ago
.pre-commit-hooks.yaml Add 'language_version: python3' to .pre-commit-hooks.yaml 2 years ago
CHANGES.rst docs: update changes 6 months ago
LICENSE.rst Rename LICENCE to LICENSE 6 years ago Remove unused .travis.yml 2 years ago
Makefile Automate the version update in the README 2 years ago
README.rst Preparing release 0.48 7 months ago
appveyor.yml Drop Python 3.6 support 7 months ago feat: exclude some more non-dist files 6 months ago Update to newer 1 year ago
setup.cfg Workaround for mypy 0.800 ignoring setup.cfg 2 years ago Use stdlib mock instead of backport package for Python 3.8+ 4 months ago Fix isort 4 months ago
tox.ini Drop Python 3.6 support 7 months ago



buildstatus_ appveyor_ coverage_

Are you a Python developer? Have you uploaded packages to the Python Package Index? Have you accidentally uploaded broken packages with some files missing? If so, check-manifest is for you.

Quick start

$ pip install check-manifest

$ cd ~/src/mygreatpackage
$ check-manifest

You can ask the script to help you update your

$ check-manifest -u -v
listing source files under version control: 6 files and directories
building an sdist: check-manifest-0.7.tar.gz: 4 files and directories
lists of files in version control and sdist do not match!
missing from sdist:
suggested rules:
  include *.py
  include tox.ini

$ cat
include *.rst

# added by
include *.py
include tox.ini

Command-line reference

$ check-manifest --help
usage: check-manifest [-h] [--version] [-v] [-c] [-u] [-p PYTHON]
                      [--ignore patterns]

Check a Python file for completeness

positional arguments:
  source_tree           location for the source tree (default: .)

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         more verbose output (default: False)
  -c, --create          create a if missing (default: False)
  -u, --update          append suggestions to (implies --create)
                        (default: False)
  -p PYTHON, --python PYTHON
                        use this Python interpreter for running sdist
                        (default: /home/mg/.venv/bin/python)
  --ignore patterns     ignore files/directories matching these comma-
                        separated patterns (default: None)
  --ignore-bad-ideas patterns
                        ignore bad idea files/directories matching these
                        comma-separated patterns (default: [])


You can configure check-manifest to ignore certain file patterns using a [tool.check-manifest] section in your pyproject.toml file or a [check-manifest] section in either setup.cfg or tox.ini. Examples:

# pyproject.toml
ignore = [".travis.yml"]

# setup.cfg or tox.ini
ignore =

Note that lists are newline separated in the setup.cfg and tox.ini files.

The following options are recognized:


A list of filename patterns that will be ignored by check-manifest. Use this if you want to keep files in your version control system that shouldn't be included in your source distributions. The default ignore list is :


If set to true, your ignore patterns will replace the default ignore list instead of adding to it.


A list of filename patterns that will be ignored by check-manifest's generated files check. Use this if you want to keep generated files in your version control system, even though it is generally a bad idea.

Version control integration

With pre-commit, check-manifest can be part of your git-workflow. Add the following to your .pre-commit-config.yaml.

-   repo:
    rev: "0.48"
    -   id: check-manifest

If you are running pre-commit without a network, you can utilize args: [--no-build-isolation] to prevent a pip install reaching out to PyPI. If you have additional build-system.requires outside of pip / setuptools / wheel you will want to list those in additional_dependencies.

-   repo:
    rev: ...  # pick a valid tag / revision
    -   id: check-manifest
        args: [--no-build-isolation]
        additional_dependencies: [setuptools-scm]