简体   繁体   中英

Pip 7.0.1 not installing included files from package

I have a python package as a .tar.gz. I have been using pip 6.1.1 without error for sometime. When installing the package, pip install mypackage.tar.gz , distutils ensure that certain files in the package are put into this /var/www/myfolder location.

Pip 6.1.1 and Pip 1.2.1 follow this behaviorcorrectly, however pip 7.0.1 does not. Pip 7.0.1 does not move the files in the "myfolder" directory at all.

At first I though its was a distutils issue, however now that I realize the only scenario in which mypackage.tar.gz does not move files into the /var/www/myfolder location is when it is installed by pip withversion 7.0.1 I conclude its a pip issue.

I haven't found anything of significance in the change docs between the version of pip, but I'm not sure what I may be looking for.

Any idea what could be happening?

Note it is not a permissions issue as I run the pip commands with sudo.

Starting with version 7.0.0 pip builds wheels from sdists and installs these wheels instead of installing directly from sdists. There's a known difference in where data_files are installed between installing from wheel and from sdist. Citing from Packaging and Distributing Projects :

setuptools allows absolute “data_files” paths, and pip honors them as absolute, when installing from sdist. This is not true when installing from wheel distributions. Wheels don't support absolute paths, and they end up being installed relative to “site-packages”. For discussion see wheel Issue #92 .

See also:

Wheel issue 92: bdist_wheel makes absolute data_files relative to site-packages
PyPI Metadata Formats issue 13: Add a new subdirectory to allow wheels to bypass installation schemes
Python Packaging User Guide pull 212: Fix section on data_files
Presentation by Ionel Cristian Mărieș - Less known packaging features and tricks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM