I have a Python package where I want to include an empty directory as part of the source distribution. I tried adding
include empty_directory
to the MANIFEST.in
file, but when I run
python setup.py sdist
The empty directory is still not included. Any tips on how to do this?
According to the docs:
include pat1 pat2
- include all files matching any of the listed patternsexclude pat1 pat2
- exclude all files matching any of the listed patternsrecursive-include dir pat1 pat2
- include all files under dir matching any of the listed patternsrecursive-exclude dir pat1 pat2
- exclude all files under dir matching any of the listed patternsglobal-include pat1 pat2
- include all files anywhere in the source tree matching — & any of the listed patternsglobal-exclude pat1 pat2
- exclude all files anywhere in the source tree matching — & any of the listed patternsprune dir
- exclude all files under dirgraft dir
- include all files under dir
So seems like you want graft
, not include
.
Also, it seems you can't include empty directories. You have to create a "empty.txt
" file or something like this inside the directory to force its inclusion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With