I have a python package structured as below:
mypackage ├───build ├───dist ├───mypackage-------> file1.py, file2.py │ └───templates-->temp.html └───test └───MANIFEST.in └───setup.py what I'm trying to do is to include the templates folder. Here is the relevant part of my setup.py
setup( packages=find_packages(), include_package_data=True, package_data = {'mypackages': ['templates/*.html']}, and here is my MANIFEST.in
include mypackage/templates recursive-include mypackage/ *.html To produce the zip file, I use this command:
python setup.py sdist Any ideas why the templates folder does not get included?
__init__.pyin the templates folder? And this: scotttorborg.com/python-packaging/non-code-files.html__init__.pyin the template folder. I had tried putting it there but that only causes the folder to be included without the temp.html inside that folder. As for the manifest, I updated my post. It already includes mypackage/templates