How to make setuptools fail if it can't find some of the files declared in MANIFEST.in?

Viewed 75

Had some files declared in MANIFEST.in, half of them were missing from the project directory. When I ran python3 setup.py install it has copied files that were present and gave no warning or error about the missing ones.

How to make it fail when some of the include_package_data files are missing?

1 Answers

Well, the only think I found is to parse output from python setup.py dist_info:

python setup.py dist_info 2>&1 >/dev/null |
    grep '^warning: no files found matching'

Can be used as a condition:

if python setup.py dist_info 2>&1 >/dev/null | grep '^warning: no files found matching'; then
    echo "Error: missing files" >&2
    exit 1
fi
Related