I created and published a Python package, but I just can't get it to include a text file.
Here is the repository: https://github.com/void4/gimpscm
The file I need to include is procdump.txt, located in the gimpscm-directory.
So the layout is like this:
setup.py
setup.cfg
MANIFEST.in
gimpscm/
/__index__.py
/procdump.txt
/(other .py files)
I tried:
- including a package_data directive in setup.py
- various MANIFEST.in directives
The current setup.py includes:
package_data = {"gimpscm": ["gimpscm/procdump.txt"]},
include_package_data=True,
And MANIFEST.in contains:
recursive-include gimpscm *.txt
The txt file is included like the .py files in the gimpscm subdirectory of the zip in the dist directory. But when I pip install gimpscm
, the file simply isn't installed.
I publish the package this way:
python setup.py sdist
twine upload dist/*
On the pypi website, the uploaded package DOES include the txt file, it just isn't included on the pip install
.
This process so far has been extremely frustrating, and Stackoverflow and other sites do not give a clear answer. I've tried both the MANIFEST.in and setup.py directive approaches, in every combination. It still doesn't work. The Python docs are also too convoluted and unclear for me.