-
-
Notifications
You must be signed in to change notification settings - Fork 674
Description
The goal of this ticket is to be able to explain to experienced Unix users what sage-the-distribution is, as follows:
If you download sage-the-distribution and do
./configure --prefix=/SOMEWHERE && make
then that's the same as doing a sequence of about 100 times:
wget SOMEPACKAGE.tar.gz && tar xf SOMEPACKAGE.tar.gz && (cd SOMEPACKAGE \
&& ./configure --prefix=/SOMEWHERE && make && make install)
(and about a 50 times pip install SOMEPACKAGE
).
sage-the-distribution has figured out the right order of installing these packages, tricky configure options so that everything works, and on top has fixes for various outdated/handwritten/missing build systems of various packages.
Thus it is beyond the scope of this ticket:
- to separate
make
andmake install
. Ourmake install
is a no-op. ANY discussion of this needs to go to ticket Long-term task ticket: Support "make install" of the Sage distribution #21495, not here.
We will implement this goal without sacrificing any of the traditional convenience features that Sage-the-distribution has provided for the casual user (such as sage -i
for installing packages; and that ./configure
is an optional step of the installation process).
We have a separate task ticket for the following:
- Meta-ticket: Make sagelib a pip-installable Python source package, listed on PyPI #21507: Make sagelib (sage-the-Python-library) a normal Python package, installable by
setup.py
,pip
, etc. and eventually even via PyPI. We will NOT turn sagelib to an automake package (which was proposed in Transition to build system for sage (the library) #14807).
(There will be some interaction with some of the steps of that ticket.)
Included on this ticket are the following steps.
Implement standard features expected of an autotools build system.
- Choosing the installation hierarchy (
configure --prefix=SAGE_LOCAL
). Right now it is the subdirectorylocal
ofSAGE_ROOT
.- Allow SAGE_LOCAL to be customized #21501: Allow SAGE_LOCAL to be customized
- Allow SAGE_LOCAL to be customized - follow-up #21534: Allow SAGE_LOCAL to be customized - follow-up
- ./configure --prefix=SAGE_LOCAL #21479: ./configure --prefix=SAGE_LOCAL
- By allowing the user to choose the installation hierarchy, there are new requirements. What is installed there should run without requiring environment variables to be set. It should not refer to the environment variables
SAGE_LOCAL
, orSAGE_ROOT
(orSAGE_SRC_ROOT
). An exception could perhaps be made for the latter for "debugging" or "source inspection" facilities:- package autotools: Don't depend on $SAGE_LOCAL #21525: package
autotools
: Don't depend on$SAGE_LOCAL
- Improve Cython debugging #21509: Install cython_debug somewhere in SAGE_LOCAL
- package autotools: Don't depend on $SAGE_LOCAL #21525: package
- make V=0 should silence the build #21539:
make V=0
should silence the build - make distclean: Don't delete $SAGE_ROOT/local #21775: make distclean: Don't delete the install hierarchy (SAGE_LOCAL)
- Task ticket: Replace use of SAGE_ROOT by more specific environment variables #21591: Replace use of
SAGE_ROOT
by more specific environment variables - Enable VPATH builds (several independent build trees connected to one source tree) #21469: Enable VPATH builds (
SAGE_SRC_ROOT/configure --srcdir=SAGE_SRC_ROOT
) - ./configure CC=/path/to/gcc ... #22646:
./configure CC=/path/to/gcc ...
- Add --enable-OPTIONALSPKG options to configure #28095: Add --enable-OPTIONALSPKG options to configure (see also earlier ./configure --with-packages=... #21538)
- Reimplement
sage -i SPKG
for optional/experimental packages asconfigure --enable-SPKG && make build
#29113: Reimplementsage -i SPKG
for optional/experimental packages asconfigure --enable-SPKG && make build
(follow-up: Remove ./configure --enable-SPKG options for pip packages (for which this is not implemented) #29626) - Allow users to make
make V=0
the default by using./configure --enable-silent-rules
#21589: Makemake V=0
the default by./configure --enable-silent-rules
- Various other
configure
options, to replace use of environment variables that influence the build.
Clean up parts of the build system to make it more standard. This is to make it straightforward for developers familiar with the autotools system to contribute to sage.
- Create SAGE_LOCAL directory hierarchy during "make", not "configure" #21532: Create
SAGE_LOCAL
directory hierarchy duringmake
, notconfigure
- configure.ac: write build/make/Makefile within an AC_CONFIG_FILE, not during main configure #21524:
configure.ac
: writebuild/make/Makefile
within anAC_CONFIG_COMMANDS
, not during mainconfigure
Make the separation between sage-the-distribution and sagelib (sage-the-Python-library) clearer. This will be beneficial for distributions such as Debian etc.
- Install src/bin scripts by sagelib's setup.py, not make #21559: Move sage-the-distribution scripts from
src/bin
tobuild/bin
- Add src/README.txt and build/README.txt #21565: Add src/README.txt and build/README.txt
Following are workarounds to enable root-owned installation hierarchies (prefix
).
- If $SAGE_SUDO is set, use it whenever we do "make install" of a package. #21537: If
$SAGE_SUDO
is set, use it whenever we domake install
of a package. Subtickets:- Support splitting spkg install into
spkg-build
andspkg-install
(for SAGE_SUDO) #21726: Support splitting spkg install intospkg-build
andspkg-install
(for SAGE_SUDO)
- Support splitting spkg install into
- documentation: Recommend GNU stow to people who want to install to /usr/local #21536: documentation: Recommend GNU stow to people who want to install to
/usr/local
See also:
- Meta-meta-ticket: Build, packaging, testing improvements #29133 META-META-TICKET: Build, packaging, testing improvements
CC: @vbraun @jdemeyer @kiwifb @embray @dimpase @williamstein @mezzarobba @tobihan @timokau @jhpalmieri @seblabbe
Component: build
Author: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/21566