How to fix MANIFEST.in graft having no effect on Windows

Problem:

In your MANIFEST.in, you have a line like

graft src/

but when you run

python setup.py sdist

some file in src is not included in the archive

Solution:

This is due to the slash at the end of src/! The slash works fine on Linux, but on Windows, backslashes are used to separate directory names. You can just remove the slash after src, it doesn’t serve any purpose on Windows or Linux:

graft src

After that, retry and you should see your file being included in the sdist archive.