Tool to check the completeness of MANIFEST.in for Python packages

Overview

check-manifest

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 MANIFEST.in:

$ 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:
  tests.py
  tox.ini
suggested MANIFEST.in rules:
  include *.py
  include tox.ini
updating MANIFEST.in

$ cat MANIFEST.in
include *.rst

# added by check_manifest.py
include *.py
include tox.ini

Command-line reference

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

Check a Python MANIFEST.in 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 MANIFEST.in if missing (default: False)
  -u, --update          append suggestions to MANIFEST.in (implies --create)
                        (default: False)
  -p PYTHON, --python PYTHON
                        use this Python interpreter for running setup.py 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: [])

Configuration

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
[tool.check-manifest]
ignore = [".travis.yml"]

# setup.cfg or tox.ini
[check-manifest]
ignore =
    .travis.yml

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

The following options are recognized:

ignore

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

PKG-INFO
*.egg-info
*.egg-info/*
setup.cfg
.hgtags
.hgsigs
.hgignore
.gitignore
.bzrignore
.gitattributes
.github/*
.travis.yml
Jenkinsfile
*.mo
ignore-default-rules
If set to true, your ignore patterns will replace the default ignore list instead of adding to it.
ignore-bad-ideas
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.

repos:
-   repo: https://github.com/mgedmin/check-manifest
    rev: "0.46"
    hooks:
    -   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.

repos:
-   repo: https://github.com/mgedmin/check-manifest
    rev: ...  # pick a valid tag / revision
    hooks:
    -   id: check-manifest
        args: [--no-build-isolation]
        additional_dependencies: [setuptools-scm]
Flake8 extension to provide force-check option

flake8-force Flake8 extension to provide force-check option. When this option is enabled, flake8 performs all checks even if the target file cannot be

Kenichi Maehashi 9 Oct 29, 2022
MonkeyType as a pytest plugin.

MonkeyType as a pytest plugin.

Marius van Niekerk 36 Nov 24, 2022
Flake8 Type Annotation Checking

flake8-annotations flake8-annotations is a plugin for Flake8 that detects the absence of PEP 3107-style function annotations and PEP 484-style type co

S. Co1 118 Jan 05, 2023
A plugin for Flake8 that provides specializations for type hinting stub files

flake8-pyi A plugin for Flake8 that provides specializations for type hinting stub files, especially interesting for linting typeshed. Functionality A

Łukasz Langa 58 Jan 04, 2023
Simple Python style checker in one Python file

pycodestyle (formerly called pep8) - Python style guide checker pycodestyle is a tool to check your Python code against some of the style conventions

Python Code Quality Authority 4.7k Jan 01, 2023
Convert relative imports to absolute

absolufy-imports A tool and pre-commit hook to automatically convert relative imports to absolute. Installation $ pip install absolufy-imports Usage a

Marco Gorelli 130 Dec 30, 2022
A static-analysis bot for Github

Imhotep, the peaceful builder. What is it? Imhotep is a tool which will comment on commits coming into your repository and check for syntactic errors

Justin Abrahms 221 Nov 10, 2022
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John F. Woods coala provides a

coala development group 3.4k Dec 29, 2022
Typed interface stubs for Pythonista iOS

Pythonista Stubs Stubs for the Pythonista iOS API. This allows for better error detection and IDE / editor autocomplete. Installation and Usage pip in

Harold Martin 12 Jul 14, 2020
Collection of awesome Python types, stubs, plugins, and tools to work with them.

Awesome Python Typing Collection of awesome Python types, stubs, plugins, and tools to work with them. Contents Static type checkers Dynamic type chec

TypedDjango 1.2k Jan 04, 2023
Flake8 extension for enforcing trailing commas in python

Flake8 Extension to enforce better comma placement. Usage If you are using flake8 it's as easy as: pip install flake8-commas Now you can avoid those a

Python Code Quality Authority 127 Sep 03, 2022
An extension for flake8 that forbids some imports statements in some modules.

flake8-obey-import-goat An extension for flake8 that forbids some imports statements in some modules. Important: this project is developed using DDD,

Ilya Lebedev 10 Nov 09, 2022
A Pylint plugin to analyze Flask applications.

pylint-flask About pylint-flask is Pylint plugin for improving code analysis when editing code using Flask. Inspired by pylint-django. Problems pylint

Joe Schafer 62 Sep 18, 2022
Pylint plugin for improving code analysis for when using Django

pylint-django About pylint-django is a Pylint plugin for improving code analysis when analysing code using Django. It is also used by the Prospector t

Python Code Quality Authority 544 Jan 06, 2023
Easy saving and switching between multiple KDE configurations.

Konfsave Konfsave is a config manager. That is, it allows you to save, back up, and easily switch between different (per-user) system configurations.

42 Sep 25, 2022
Tool to check the completeness of MANIFEST.in for Python packages

check-manifest Are you a Python developer? Have you uploaded packages to the Python Package Index? Have you accidentally uploaded broken packages with

Marius Gedminas 270 Dec 26, 2022
Unbearably fast O(1) runtime type-checking in pure Python.

Look for the bare necessities, the simple bare necessities. Forget about your worries and your strife. — The Jungle Book.

beartype 1.4k Jan 01, 2023
Type stubs for the lxml package

lxml-stubs About This repository contains external type annotations (see PEP 484) for the lxml package. Installation To use these stubs with mypy, you

25 Dec 26, 2022
Stubs with type annotations for ordered-set Python library

ordered-set-stubs - stubs with type annotations for ordered-set Python library Archived - now type annotations are the part of the ordered-set library

Roman Inflianskas 2 Feb 06, 2020
PEP-484 typing stubs for SQLAlchemy 1.4 and SQLAlchemy 2.0

SQLAlchemy 2 Stubs These are PEP-484 typing stubs for SQLAlchemy 1.4 and 2.0. They are released concurrently along with a Mypy extension which is desi

SQLAlchemy 139 Dec 30, 2022