Skip to content

spkg-configure.m4 for python3 #27824

@dimpase

Description

@dimpase

Do not install python3 if a sufficiently new version is available in $PATH. This could be a system python3, or the python3 from within a venv.

As suggested in #29032, we make $SAGE_LOCAL a venv (https://docs.python.org/3/library/venv.html) over the system python3 -- if a suitable system python3 is found -- by using the venv.EnvBuilder API.

This is done by the new script build/bin/sage-venv, which we use both during configure (to make sure that we select a system python3 for which venvs work correctly) and during make.

The venv does not include the system site-packages: We continue to install all Python packages into our venv using the existing build infrastructure. We keep the task of using system site-packages for the follow-up ticket #29023.

(Note, we use venv (new since Python 3.3), not virtualenv. So this change is limited to Python 3 builds of Sage.)

CC: @jdemeyer @embray @vbraun @kiwifb @jhpalmieri @videlec

Component: build: configure

Author: Matthias Koeppe, Erik Bray

Branch: 1c845a4

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/27824

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions