Skip to content

Commit

Permalink
sagemathgh-38408: Fix layout of conda installation instructions
Browse files Browse the repository at this point in the history
This fixes two layout errors in the documentation.

##### Before
![image](https://github.com/user-
attachments/assets/833a9b4b-da41-4734-9d42-f98daf6249fa)

##### After
![image](https://github.com/user-
attachments/assets/f4352c94-99be-4b93-9e5a-e9c8b0ed5c26)

##### Before
![image](https://github.com/user-
attachments/assets/07f25208-391d-4702-9ccc-c9335ea3fa97)

##### After
![image](https://github.com/user-
attachments/assets/5a33c08c-e878-49ed-8269-0f38b62e28a9)

URL: sagemath#38408
Reported by: Julian Rüth
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Jul 25, 2024
2 parents 29e8b8a + 237c7b6 commit 234d18b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=442147504b01035e9cc36d5a726c454fbebd05ba
sha256=ebd714e56d0435cfd0e8faf94d3e9fc27c91a3d7dfeb42efb5b796fda1567a64
sha1=d21dcef9ea75fb52a89af8592796f8a2d97d3f2f
sha256=ce97f7eecff470cc7dc4c6dce7f0e5e7e85382c2411b23bc6eb9c6934b002ada
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
238f042e65932c80a81e6841c10e6abcf8ed6e4f
f473d0954b37ab99d3530145c0f4536e4f0d88c9
102 changes: 51 additions & 51 deletions src/doc/en/installation/conda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ follows. In a terminal,

* Change channel priority to strict: ``conda config --set channel_priority strict``

If you installed Miniforge (or Mambaforge), we recommend to use
`mamba <https://mamba.readthedocs.io/en/latest/index.html>`_ in the following,
If you installed Miniforge (or Mambaforge), we recommend to use
`mamba <https://mamba.readthedocs.io/en/latest/index.html>`_ in the following,
which uses a faster dependency solver than ``conda``.

.. _sec-installation-conda-binary:
Expand Down Expand Up @@ -70,27 +70,27 @@ Using conda to provide system packages for the Sage distribution
If Conda is installed (check by typing ``conda info``), one can install SageMath
from source as follows:

- Create a new conda environment including all standard packages
recognized by sage, and activate it::
- Create a new conda environment including all standard packages
recognized by sage, and activate it::

$ conda env create --file environment-3.11-linux.yml --name sage-build
$ conda activate sage-build
$ conda env create --file environment-3.11-linux.yml --name sage-build
$ conda activate sage-build

If you use a different architecture, replace ``linux`` by ``macos``.
Alternatively, use ``environment-optional-3.11-linux.yml`` in place of
``environment-3.11-linux.yml`` to create an environment with all standard and optional
packages recognized by sage.
If you use a different architecture, replace ``linux`` by ``macos``.
Alternatively, use ``environment-optional-3.11-linux.yml`` in place of
``environment-3.11-linux.yml`` to create an environment with all standard and optional
packages recognized by sage.

A different Python version can be selected by replacing ``3.11`` by ``3.9``
or ``3.10`` in these commands.
A different Python version can be selected by replacing ``3.11`` by ``3.9``
or ``3.10`` in these commands.

- Then the SageMath distribution will be built using the compilers provided by Conda
and using many packages installed by Conda::
- Then the SageMath distribution will be built using the compilers provided by Conda
and using many packages installed by Conda::

$ ./bootstrap
$ ./configure --with-python=$CONDA_PREFIX/bin/python \
--prefix=$CONDA_PREFIX
$ make
$ ./bootstrap
$ ./configure --with-python=$CONDA_PREFIX/bin/python \
--prefix=$CONDA_PREFIX
$ make


.. _sec-installation-conda-develop:
Expand All @@ -105,51 +105,51 @@ environment for Sage development.

Here we assume that you are using a git checkout.

- Optionally, set the build parallelism for the Sage library. Use
whatever the meaningful value for your machine is - no more than
the number of cores::
- Optionally, set the build parallelism for the Sage library. Use
whatever the meaningful value for your machine is - no more than
the number of cores::

$ export SAGE_NUM_THREADS=24
$ export SAGE_NUM_THREADS=24

- Create and activate a new conda environment with the dependencies of Sage
and a few additional developer tools::
- Create and activate a new conda environment with the dependencies of Sage
and a few additional developer tools:

.. tab:: mamba
.. code-block:: shell
$ mamba env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev
.. tab:: conda
.. code-block:: shell
$ conda env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev
.. tab:: mamba

Alternatively, you can use ``src/environment-3.11-linux.yml`` or
``src/environment-optional-3.11-linux.yml``, which will only install standard
(and optional) packages without any additional developer tools.
.. code-block:: shell
A different Python version can be selected by replacing ``3.11`` by ``3.9``
or ``3.10`` in these commands.
$ mamba env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev
- Bootstrap the source tree and install the build prerequisites and the Sage library::
.. tab:: conda

$ ./bootstrap
$ pip install --no-build-isolation --config-settings editable_mode=compat -v -v --editable ./src
.. code-block:: shell
If you encounter any errors, try to install the ``sage-conf`` package first::
$ conda env create --file src/environment-dev-3.11-linux.yml --name sage-dev
$ conda activate sage-dev
$ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf_conda
Alternatively, you can use ``src/environment-3.11-linux.yml`` or
``src/environment-optional-3.11-linux.yml``, which will only install standard
(and optional) packages without any additional developer tools.

and then run the last command again.
A different Python version can be selected by replacing ``3.11`` by ``3.9``
or ``3.10`` in these commands.

- Verify that Sage has been installed::
- Bootstrap the source tree and install the build prerequisites and the Sage library::

$ sage -c 'print(version())'
SageMath version 10.2.beta4, Release Date: 2023-09-24
$ ./bootstrap
$ pip install --no-build-isolation --config-settings editable_mode=compat -v -v --editable ./src

If you encounter any errors, try to install the ``sage-conf`` package first::

$ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf_conda

and then run the last command again.

- Verify that Sage has been installed::

$ sage -c 'print(version())'
SageMath version 10.2.beta4, Release Date: 2023-09-24

Note that ``make`` is not used at all. All dependencies
(including all Python packages) are provided by conda.
Expand Down

0 comments on commit 234d18b

Please sign in to comment.