When I run python setup.py sdist
in my project directory and check the contents with tar --list -f .\dist\my_project_name-1.0.tar.gz
I expected to see one important python file (manage.py
) and a couple of directories such as templates
which contains .html files, and static
containing .css files. However, these files are all missing from the tar archive.
I've looked at many questions: Q1 Q2 Q3 Q4
but adding a MANIFEST.in
or adding the following lines to my setup.py
didn't change anything. And what about my manage.py
? Shouldn't python files be included by default with sdist
?
include_package_data=True,
data_files=[('templates','my_app/templates/my_app/*.html']),
('static', ['my_app/static/my_app/static/css/*.css'])]
Also, I get the same exact result with python setup.py sdist bdist_wheel
(although I'm not sure what's the difference with the two commands).