Reputation: 151
I can't figure out why when I run pip install ../path_to_my_proj/ (from a virtualenv) none of the data files are copied across to the sitepackage/myproj/ folder. The python packages are copied across correctly.
python version 3.4.4
My project directory is like this:
├── myproj
│ ├── __init__.py
│ ├── module1.py
│ └── module2.py
├── data_files
| ├── subfolder1
│ | ├── datafile.dll
│ | └── datafile2.dll
| └── subfolder2
│ ├── datafile3.dll
│ └── datafile4.dll
|
├── MANIFEST.in
└── setup.py
And my MANIFEST.in looks like
recursive-include data_files *
include README.md
my setup looks like:
setup(
name='myproj',
version='0.1.1',
install_requires=['requirement'],
packages=['myproj'],
include_package_data=True,
)
Upvotes: 14
Views: 5493
Reputation: 18084
I encountered the same problem and asked about it on https://gitter.im/pypa/setuptools. The result? You just can't do that. data_files
must live under myproj
.
You can fake it by putting an empty __init__.py
in data_files
, but then it will get put into PYTHONHOME\Lib\site-packages
along side myproj
at same level, polluting the name space.
Upvotes: 20