Skip to content

Commit 5f74854

Browse files
authored
Make sage-conf optional
As noted in sagemath#37024 and in sagemath#36489, `sage-conf` is actually not needed on a few systems now. For this reason, we make the installation of it optional (as there are no optional install requires as far as I know, this means we remove it from `pyproject.toml` and `setup.cfg`). We also remove it from "install all dependencies via conda" as its not needed there.
1 parent f16eb4b commit 5f74854

File tree

7 files changed

+12
-14
lines changed

7 files changed

+12
-14
lines changed

.devcontainer/onCreate-conda.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ conda init bash
88

99
# Build sage
1010
conda run -n sage-dev ./bootstrap
11-
conda run -n sage-dev ./configure --with-python=/opt/conda/envs/sage-dev/bin/python --prefix=/opt/conda/envs/sage-dev
12-
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
11+
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-setup
1312
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src

.github/workflows/ci-conda.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,17 @@ jobs:
7777
conda info
7878
conda list
7979
80-
- name: Configure
80+
- name: Bootstrap
8181
shell: bash -l {0}
8282
continue-on-error: true
8383
run: |
8484
./bootstrap
85-
echo "::add-matcher::.github/workflows/configure-systempackage-problem-matcher.json"
86-
./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX --enable-system-site-packages $(for pkg in $(./sage -package list :standard: --has-file spkg-configure.m4 --has-file distros/conda.txt --exclude rpy2); do echo --with-system-$pkg=force; done)
87-
echo "::remove-matcher owner=configure-system-package-warning::"
88-
echo "::remove-matcher owner=configure-system-package-error::"
8985
9086
- name: Build
9187
shell: bash -l {0}
9288
run: |
9389
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda.
94-
pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
90+
pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-setup
9591
pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src
9692
env:
9793
SAGE_NUM_THREADS: 2

.gitpod.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ tasks:
1111
&& conda config --append envs_dirs $(pwd)
1212
&& conda activate $(pwd)/venv
1313
&& ./bootstrap
14-
&& ./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX
15-
&& pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
14+
&& pip install --no-build-isolation -v -v -e ./pkgs/sage-setup
1615
&& pip install --no-build-isolation -v -v -e ./src
1716
# Activate conda environment, set up Trac remote
1817
# RestructuredText extension recommends python extension, although we have already installed it

pkgs/sage-conf/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ sage_conf for conda
8787

8888
The version of the distribution package in the directory
8989
`pkgs/sage-conf_conda <https://github.com/sagemath/sage/tree/develop/pkgs/sage-conf_conda/>`_
90-
is used in an experimental installation method of SageMath, where all packages
90+
may be used in an installation method of SageMath, where all packages
9191
are provided by conda. This method is described in
9292
https://doc.sagemath.org/html/en/installation/conda.html#using-conda-to-provide-all-dependencies-for-the-sage-library-experimental
9393

src/doc/en/installation/conda.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,15 @@ Here we assume that you are using a git checkout.
138138
- Bootstrap the source tree and install the build prerequisites and the Sage library::
139139

140140
$ ./bootstrap
141-
$ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf_conda ./pkgs/sage-setup
141+
$ pip install --no-build-isolation -v -v --editable ./pkgs/sage-setup
142142
$ pip install --no-build-isolation --config-settings editable_mode=compat -v -v --editable ./src
143143

144+
If you encounter any errors, try to install the ``sage-conf`` package first::
145+
146+
$ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf_conda
147+
148+
and then run the last command again.
149+
144150
- Verify that Sage has been installed::
145151

146152
$ sage -c 'print(version())'

src/pyproject.toml.m4

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ requires = [
66
# Note that PEP517/518 have no notion of optional sage_spkg dependencies:
77
# https://github.com/pypa/pip/issues/6144
88
esyscmd(`sage-get-system-packages install-requires-toml \
9-
sage_conf \
109
setuptools \
1110
wheel \
1211
sage_setup \

src/setup.cfg.m4

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ include(`setup_cfg_metadata.m4')dnl'
1111
[options]
1212
python_requires = >=3.9, <3.13
1313
install_requires =
14-
SPKG_INSTALL_REQUIRES_sage_conf
1514
SPKG_INSTALL_REQUIRES_six
1615
dnl From build/pkgs/sagelib/dependencies
1716
SPKG_INSTALL_REQUIRES_conway_polynomials

0 commit comments

Comments
 (0)