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`.
Configuration:
- 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}`.
- We also want to support `./configure --with-python=no` which would suppress making any venv (#30896)
(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. Per #30719, we use existence of `install-requires.txt` or of `requirements.txt`.
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,,N/A,refactor through #30896,public/29013-use-py3-venv,9b93425dad001fe468e0f1551a9b55c0f8289d62,"#30719, #30657, #30622, #30724 | #22731, #30731, #30896",