Roundup Tracker - Issues

Issue 2551167

classification
Running pip install in containerized environment buries shared files under site-packages
Type: behavior Severity: normal
Components: Installation Versions: devel
process
Status: fixed fixed
:
: rouilj : rouilj
Priority: normal :

Created on 2021-11-06 17:18 by rouilj, last changed 2021-11-07 17:20 by rouilj.

Messages
msg7356 Author: [hidden] (rouilj) Date: 2021-11-06 17:18
Issue 2551163 added support for docker containerization. If you built
using the 2.1.0 from pypi, the wheel that is built buries the tracker templates,
man pages etc. under the site-packages/usr/local/share/.... Where it is not found by roundup.

I have a workaround for the Dockerfile case (copy the tree to the right place), but
setup.py should not be creating it this way in the first place. make_data_files_absolute
or other changes in setup.py when using setuptools needs to be modified to fix this.
setup.py needs to work on non-containerized environments as well, so modifying the search
list to look under site-packages/usr/.../share/... isn't a good solution.

Note that putting things outside the site-packages tree can cause a conflict for
2 or more roundup deployments in virtualenv's or local hardware. The external
directory tree will be modified by both.
msg7357 Author: [hidden] (rouilj) Date: 2021-11-07 04:23
See also:

  https://discuss.python.org/t/should-there-be-a-new-standard-for-installing-arbitrary-data-
files/7853/72

and:

   https://stackoverflow.com/questions/36846260/can-python-setuptools-install-files-outside-
dist-packages

I have added:
 
    if 'bdist_wheel' in sys.argv:
        raise RuntimeError("This setup.py does not support wheels")

before the call to main() in setup.py and this forces pip to install using something
other than bdist_wheel which ignores all the work that was done to put data files
outside of the python system path.

Also as part of this, I need to make roundup look in site-packages/usr/.../share/...
for its templates otherwise issue 2551130 will not be possible.

Locale also needs to be found under site-packages/usr/.../share/....
msg7358 Author: [hidden] (rouilj) Date: 2021-11-07 06:11
Templates and locales can be found when installed using pip install resulting
in a wheel format. Reverted disabling bdist_wheel.

Fixed in changeset:   6524:f961dbbc3573.
msg7359 Author: [hidden] (rouilj) Date: 2021-11-07 17:20
Fixed up the code: changeset:   6527:5ad7fb912227
History
Date User Action Args
2021-11-07 17:20:13rouiljsetmessages: + msg7359
2021-11-07 06:11:25rouiljsetstatus: new -> fixed
assignee: rouilj
resolution: fixed
messages: + msg7358
2021-11-07 05:35:30rouiljsettitle: Runinng pip install in containerized environment buries shared files under site-packages -> Running pip install in containerized environment buries shared files under site-packages
2021-11-07 04:23:23rouiljsetmessages: + msg7357
2021-11-06 17:18:17rouiljcreate