id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
29013 Support installation of Python packages into separate venvs depending on the python version mkoeppe "#27824 made `$SAGE_LOCAL` a venv if a suitable system python3 is found.
In this ticket, we add support for installing several python versions into the same `SAGE_LOCAL`:
- keeping install records for Python packages in `$SAGE_VENV/var/lib/sage/{installed,scripts,wheels}`, separate from those of non-Python packages (`$SAGE_LOCAL/var/lib/sage/{installed,scripts}`)
- likewise for `$SAGE_LOCAL/var/tmp/sage/build`
- here `$SAGE_VENV` defaults to `$SAGE_LOCAL`, but can be overridden to an arbitrary directory that will be used as the wheel-building venv, for example `$SAGE_LOCAL/var/lib/sage/venv/$PYTHON_TAG`.
This is activated by running, for example, `make PYTHON_FOR_VENV=""/usr/bin/python3.8"" SAGE_VENV=""$SAGE_LOCAL/var/lib/sage/venv/python3.8""`.
(This could also be a configure variable ([[https://github.com/autotools-mirror/autoconf/blob/master/lib/autoconf/general.m4#L601|installation directory option]]) defaulting to `${prefix}`.)
(Tricky case: When system python3 is not in use and SAGE_VENV != SAGE_LOCAL, then both a real `$SAGE_LOCAL/bin/python3` needs to be built and a venv in SAGE_VENV created.)
To implement this, an SPKG needs an indication that it is a Python package - for example #30024.
This is mainly for #29039; but also facilitates testing with several Python versions without having to rebuild the Sage distribution.
This depends on:
- #30534 Repackage `pynac` as a pip-installable package
" enhancement needs_work major sage-9.3 build dimpase jdemeyer embray vbraun jhpalmieri Matthias Koeppe, Erik Bray N/A public/29013-use-py3-venv 208c7e68c24c1fe896a5e6573c6aae5399056431 #22731