-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
As #30913 makes sage-conf both (a) a PEP517/518 build_system
requires
and (b) an install-requires
of sagelib (sagemath-standard
), also a version of sage-conf must be made available on PyPI.
This version of sage-conf includes a copy of SAGE_ROOT
and SAGE_ROOT/build/**
in its source distribution. On installation (or wheel building) it establishes a python-less SAGE_LOCAL hierarchy (#31362) in ~/.sage/
by running configure
and make build-local
; and then installs the configured sage_conf.py
(#29038) as a Python module (and sage-config
, sage-env-config
).
There are no changes to how the Sage distribution is built. This ticket only provides an alternative and strictly optional way of installing (the non-Python bits of) Sage-the-distribution. It may be useful for some users who wish to use pip
to install everything they need.
To test:
./bootstrap && (cd pkgs/sage-conf_pypi/ && tox -r -v -v -v)
This test using tox
uses .sage
in an isolated directory within .tox
instead of in your home directory. At the end of the tox run, the installed sage-config
script is executed; it prints the configuration variables:
[10639] /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/pkgs/sage-conf_pypi$ /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/pkgs/sage-conf-pypi/.tox/python/bin/sage-config
VERSION=9.3.beta7
MAXIMA=/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/src/pkgs/sage_conf-pypi/.tox/python/.sage/sage-9.3.beta7-cpython-39-darwin/local/bin/maxima
ARB_LIBRARY=arb
SAGE_NAUTY_BINS_PREFIX=
CBLAS_PC_MODULES=cblas
MATHJAX_DIR=/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/src/pkgs/sage_conf-pypi/.tox/python/.sage/sage-9.3.beta7-cpython-39-darwin/local/share/mathjax
THREEJS_DIR=/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/src/pkgs/sage_conf-pypi/.tox/python/.sage/sage-9.3.beta7-cpython-39-darwin/local/share/threejs
SAGE_LOCAL=/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/src/pkgs/sage_conf-pypi/.tox/python/.sage/sage-9.3.beta7-cpython-39-darwin/local
SAGE_ROOT=/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/src/pkgs/sage_conf-pypi/.tox/python/.sage/sage-9.3.beta7-cpython-39-darwin
python finish: run-test after 0.17 seconds
To build a source distribution:
./sage -sh -c build/pkgs/sage_conf/spkg-src
(The source distribution has been uploaded to https://pypi.org/project/sage-conf/)
Follow-up steps:
- Make SAGE_ROOT configurable by the user (by passing
--prefix
tosetup.py
). - Optionally, it would create a venv that is used for building wheels.
- sage-conf_pypi: API for incremental builds #30036: Make the build more incremental: On installation of sage-conf, only run
configure
but do not install anything; rather, a Python entry point can be used by Python distribution packages such as sagemath-standard to install packages if present.
CC: @jhpalmieri @dimpase @kiwifb @vbraun
Component: build
Keywords: sd111
Author: Matthias Koeppe
Branch: 2a4a323
Reviewer: Dima Pasechnik, François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/29039