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?
Follow the below steps to install the Setuptools package on Linux using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from the website. Step 3: Go to the setuptools-60.5. 0 folder and enter the following command to install the package.
you generally don't need to worry about setuptools - either it isn't really needed, or the high-level installers will make sure you have a recent enough version installed; in this last case, as long as the operations they have to do are simple enough generally they won't fail.
setuptools in Python setuptools is a library which is built on top of distutils that has been deprecated (and up for removal as of Python 3.12).
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
.
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