I've a got a question over setup.py/pip install installation directories. I've written a setup.py script that should copy some files during installation. I've done this via setup.py script strings:
setup(name='funny_package',
....
data_files=[('destination_dir1',
['file1']),
('destination_dir2',
['file2'])],
...
)
And files are copied.
But when i run package's modules it is found out that modules are run from virtualenv_name/lib/site-packages/python3.5/funny_package
and package itself is installed at virtualenv_name/funny_package
.
The question is how to make setup.py/pip install to copy necessary files also to virtualenv_name/lib/site-packages/python3.5/funny_package
not only to virtualenv_name/funny_package
???
UPD. file1 and file2 are generated during installation.
UPD2. The difference between the question is that my files that should be stored were generated during installation stage. But the problem is quite similar to that without MANIFEST.
SOLUTION.
Solution is to use package_data
. thanks to @AlexanderReynolds