I'm packaging an in-house python app. My dir structure is something like:
/config
\-- config.yaml
/app
\-- ... (python files here...)
I've created a MANIFEST.in containing:
include config/*.yaml
When I extract the tarball created after running ./setup.py sdist, there are 2 directories, config (containing my config.yaml file) and app containing my package. However, when I pip install my app, only the python code is installed in dist-packages.
How can I make pip/setuptools copy config/config.yaml to /etc/xdg/app/ when I run pip install app?
Alternatively how can I at least make the config.yaml file end up somewhere on the filesystem so I can copy it where I want it later (e.g. /usr/share or somewhere - I don't care where it ends up after being installed)?
The docs section Installing Additional Files Doc suggests:
You can set the relative real path into data_files.
setup(...,
data_files=[...,
('/etc/xdg/app/', ['config/config.yaml'])]
)
Obs: "Note that you can specify the directory names where the data files will be installed, but you cannot rename the data files themselves."
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