Reputation: 18107
Trying to use a MANIFEST.in file (contains one line):
recursive-include etc *
To install some files for systemd (yea, I'm holding my nose about that part)
I see the files get added to the tarball by sdist, but nothing will cause them to install.
setup.py contains the following lines
packages=find_packages(),
include_package_data=True,
Then if I add this to setup.py and remove the MANIFEST.in
data_files=[
('etc/systemd/system/', ['etc/systemd/system/uwsgi.service'])
],
they install as expected. Is there something missing that I need to add for MANIFEST.in to work instead of enumerating all the files by name in setup.py?
Upvotes: 5
Views: 3154
Reputation: 57470
package_data
and data_files
are not the same thing. package_data
are files that are stored & installed in the same directory as your *.py
files (hence the "package" part); include_package_data
thus only marks data files it finds inside your package directories (emphasis added) as package data. Unless your code is stored under etc/
in your package source, none of your files will be treated as package data. In order to install files outside your Python package directory, you need to use data_files
, and there is no shortcut as there is with include_package_data
.
Upvotes: 7