I have the following directory structure (pretty standard for a python distribution):
/some_dir
/common
file1.dat
file2.dat
/src
pkg1/
__init__.py
stuff.py
setup.py
What I want to achieve is package both pkg1
and common
into the same python egg. The setup.py
file is pretty standard (auto discover packages) and pkg1
is properly included, unfortunately I can't say the same about common
. I tried many things, like package_data
, package_data_files
, package_dir
, etc. Nothing seems to work. How can I achieve this?
I'm also not keen on keeping this structure, but I do need those files into a common directory, because I have to generate nodejs, python and java libraries that include them, thus moving the common/
directory inside python is not an option.
I think you should use a MANIFEST.in file and set include_package_data to True to register all the files you want to bundle with your package.
https://setupy.info/ gives a pretty good overview of all the options you might need.
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