-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spkg-configure.m4 for python3 #27824
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:3
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9). |
comment:4
For Python packages when installing using the system Python we definitely need a well thought out approach, likely with different options for handling questions such as where to install additional Python packages.
|
comment:5
See #29013 - "In a python3 build, install all Python packages into a venv" |
This comment has been minimized.
This comment has been minimized.
Dependencies: #29013 |
comment:6
Narrowed the ticket to py3. |
comment:8
Here's a version that works. The venv is created in New commits:
|
Commit: |
Author: Matthias Koeppe |
comment:10
how about checking for Py3 deps: |
comment:11
On Gentoo Python 3 does not have sqlite module by default. I had to do |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
I've reduced the scope of the ticket, excluding the use of system site packages. |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
I tried this on gentoo (after a usual struggle to get sqlite3 module built in Python)
even though |
comment:93
Breaks python 2 builds |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:96
Ready for review |
comment:97
New tests at https://github.com/mkoeppe/sage/actions/runs/60877259; see also #29367 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:99
Tests at https://github.com/mkoeppe/sage/actions/runs/61077298 |
comment:100
Let's move this, looks good to me. |
Reviewer: Dima Pasechnik |
comment:101
Thanks! |
Changed branch from public/27824-python3-spkg-configure to |
Changed commit from |
comment:103
Hello everyone, When trying to upgrade to 9.1.rc5, I'm seeing an issue that I suspect could be a side effect of this ticket. For some reason my The overall Sage build still fails with an error about six not being found while building setuptools that I haven't yet investigated. |
comment:104
if you switch to py3 from py2, you probably need to run it is not clear what version you were on, but the changes to the build system were very substantial, so ymmv. |
comment:105
Yes, this is a known limitation. I have created #29708 (Fix switching between --with-system-python3 and --without-system-python3) for it. We shall fix it in 9.2. |
Remove crypt from the list of modules that we try to import when checking whether a given system python will work for our purposes, since: - It doesn't work on Windows (so it prevents us from running sagemath on Windows) - Searching the entire repo doesn't find any uses of crypt - crypt is deprecated anyways (PEP 594 has its removal scheduled for Python 3.13) The check for crypt was added at the same time as the other modules being checked, but neither the commit message for 6fcd7cd nor the discussion in Trac sagemath#27824 mentions why crypt specifically was added (Most of the relevant discussion in that ticket is about the distutils check).
Remove crypt from the list of modules that we try to import when checking whether a given system python will work for our purposes, since: - It doesn't work on Windows (so it prevents us from running sagemath on Windows) - Searching the entire repo doesn't find any uses of crypt - crypt is deprecated anyways (PEP 594 has its removal scheduled for Python 3.13) The check for crypt was added at the same time as the other modules being checked, but neither the commit message for 6fcd7cd nor the discussion in Trac sagemath#27824 mentions why crypt specifically was added (Most of the relevant discussion in that ticket is about the distutils check).
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 duringconfigure
(to make sure that we select a system python3 for which venvs work correctly) and duringmake
.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), notvirtualenv
. 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
The text was updated successfully, but these errors were encountered: