• Stars
    star
    282
  • Rank 141,946 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 11 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.49"
    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]

More Repositories

1

objgraph

Visually explore Python object graphs
Python
686
star
2

profilehooks

Python decorators for profiling/tracing/timing a single function
Python
315
star
3

restview

ReStructuredText viewer
Python
210
star
4

indicator-netspeed

Stupid network speed indicator for Unity, inspired by the old netspeed GNOME applet
C
104
star
5

findimports

Static analysis of Python import statements
Python
103
star
6

dozer

WSGI middleware for profiling CPU/memory and inspecting logs
Python
86
star
7

irclog2html

Convert IRC logs to HTML
Python
80
star
8

coverage-highlight.vim

Vim plugin to highlight Python source code lines that lack test coverage
Python
56
star
9

strace-process-tree

Tool to help me make sense out of `strace -f` output.
Python
50
star
10

pdf2html

Wrapper for pdftohtml that tries to extract paragraph structure
Python
49
star
11

python-imports.vim

Vim plugin that adds Python import statements semi-automatically
Vim Script
47
star
12

imgdiff

Compare two images side-by-side
Python
44
star
13

ghcloneall

Script to clone/update all user/organization repos from GitHub
Python
34
star
14

zodbbrowser

ZODB browser
Python
18
star
15

check-python-versions

Check that supported Python versions in a setup.py match tox.ini, .travis.yml and a bunch of other files
Python
18
star
16

scripts

My ~/bin
Shell
16
star
17

bootable-iso

Bootable USB disk that lets you choose an ISO image
Python
16
star
18

memgraphinator

Graph the memory usage of a single process
Python
16
star
19

dotvim

My ~/.vim
Vim Script
15
star
20

dotfiles

My personal Linux shell settings
Shell
12
star
21

gitlab-jobs

Show a summary of GitLab job durations
Python
11
star
22

mgp2pdf

MagicPoint to PDF converter
Python
8
star
23

taghelper.vim

vim plugin that shows the current function/tag in the statusline
Python
7
star
24

chelper.vim

Vim plugin that shows the current C function name in the status line
Python
7
star
25

webtreemap-du

Visualize disk usage using web-based treemaps
Python
7
star
26

project-summary

Script to generate a summary page for all my projects.
JavaScript
6
star
27

vboxpanel

Simple webapp to control headless VirtualBox machines
Python
6
star
28

pyspacewar

A game with Newtonian mechanics
Python
5
star
29

Inupy

Abandoned fork to turn Dozer into Pylons debug tool
JavaScript
5
star
30

test-switcher.vim

Vim plugin that switches between code and tests
Python
4
star
31

eazysvn

Subversion branching and merging made a bit easier
Python
4
star
32

ztk-py3-status

Produce a list of Zope Foundation packages and Python versions they support
Python
3
star
33

qml-time-tracker

A prototype user interface of a time tracking application for the Nokia N9
C++
3
star
34

pytag.vim

Vim plugin: a smarter :tag for Python projects
Python
3
star
35

python-project-skel

Reusable Makefile rules for automating Python package releases
Makefile
3
star
36

gitlab-trace

Show a GitLab pipeline status or job trace
Python
3
star
37

ppa-copy-packages

Copy Ubuntu PPA packages from one release pocket to another
Python
3
star
38

source-locator.vim

Vim plugin to find the source line from filename + line number
Python
2
star
39

ubuntu-images

Makefile that downloads Ubuntu ISO images and verifies them
Makefile
2
star
40

SnakeMUD

A 48-hour game for the Global Game Jam 2012
JavaScript
2
star
41

planet-mg

Blogs I read
JavaScript
2
star
42

gedmin.as

Blogofile source for http://gedmin.as/
Mako
2
star
43

py-test-runner.vim

Run (Python) unit tests under cursor
Python
2
star
44

adventofcode2020

Python
1
star
45

zcml-tool

Hacks to parse and analyze ZCML files because I got sick of tracing them by hand
Python
1
star
46

ShoppingList

A mobile web app for my own use
Python
1
star
47

vim-plugins

ghcloneall config for Vim plugins I maintain
Shell
1
star
48

ep2013-dojo

EuroPython 2013 coding dojo: write a Scorched Earth clone in 60 minutes
Python
1
star
49

letsencrypt-java

Adding LetsEncrypt root certificates to the Java keystore on Windows. Obsolete.
Batchfile
1
star
50

check-pypi-wheels

Check if PyPI has the right wheels available for a set of packages
Python
1
star
51

repozo-testcases

Some ad-hoc functional testcases to reproduce repozo (the ZODB online backup tool) bugs
Python
1
star
52

python-refactorings.vim

Vim plugin for a bunch of hacky random Python code refactorings
Vim Script
1
star