PIP seems to delete data_files on upgrade when those same files already exist, but works with --no-cache-dir option.
I've overridden the cmdclass install as to provide a pre-install check, but haven't explored that option to the end.
`pip install <package>`
* All is well
`pip install --upgrade <package>`
* All data files are missing as well as the directories. Seemed to have deleted files when existing files present
`pip install --no-cache-dir <package>`
Data files are back
What is the exact package your trying to install?
It's my own. modislock.
data_files=[('/etc/supervisor/conf.d', ['deploy/modis_admin.conf']), ('/etc/nginx/sites-available' ['deploy/admin_site']), ('/etc/nginx/sites-available', ['deploy/supervisord_site']), ('/etc/nginx/sites-available', ['deploy/admin_site_demo'])]
Yes, they are being copied to protected areas. Raised priviledges are used to install.
With --verbose option I do see a "Files already exist" message scroll by. When going to the directory after a normal upgrade, the files are missing. With --no-cache-dir the files are where they should be.
Two issues that I can see:
data_files
are not supported by the wheel formatReally, it looks like what you're after is creating a distribution package, not a Python package (setuptools/wheel/pip is not suited for that).
See #4993 for a similar issue.
You might be right. I am pushing things to the limit of what setuptools can do. I'll look into building a distro package. Thank you very much for responding.
Closing since OP's concerns seem to have been addressed. Thanks @benoit-pierre.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.