@@ -65,25 +65,22 @@ conda-forge/sage-feedstock <https://github.com/conda-forge/sage-feedstock/issues
65
65
Using conda to provide system packages for the Sage distribution
66
66
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
67
68
- If Conda is installed (check by typing ``conda info ``), there are two ways to
69
- prepare for installing SageMath from source:
68
+ If Conda is installed (check by typing ``conda info ``), one can install SageMath
69
+ from source as follows :
70
70
71
71
- If you are using a git checkout::
72
72
73
- $ ./bootstrap
73
+ $ ./bootstrap-conda
74
74
75
- - Create a new empty environment and activate::
75
+ - Create a new conda environment including all standard packages
76
+ recognized by sage, and activate it::
76
77
77
- $ conda create -n sage-build
78
+ $ conda env create --file environment.yml --name sage-build
78
79
$ conda activate sage-build
79
80
80
- - Install standard packages recognized by sage's ``spkg-configure `` mechanism::
81
-
82
- $ conda env update --file environment.yml -n sage-build
83
-
84
- - Or install all standard and optional packages recognized by sage::
85
-
86
- $ conda env update --file environment-optional.yml -n sage-build
81
+ Alternatively, use ``environment-optional.yml `` in place of
82
+ ``environment.yml `` to create an environment with all standard and optional
83
+ packages recognized by sage.
87
84
88
85
- Then the SageMath distribution will be built using the compilers provided by Conda
89
86
and using many packages installed by Conda::
@@ -114,38 +111,34 @@ Here we assume that you are using a git checkout.
114
111
115
112
$ export SAGE_NUM_THREADS=24
116
113
117
- - As a recommended step, install the ``mamba `` package manager. If
114
+ - As a recommended step, install the ``mamba `` package manager. If
118
115
you skip this step, replace ``mamba `` by ``conda `` in the
119
116
following steps::
120
117
121
118
$ conda install mamba
122
119
123
- - Create and activate a new conda environment that provides the
124
- bootstrapping prerequisites. You can replace 3.9 by another Python
125
- version::
126
-
127
- $ mamba create -n sage-build python=3.9 \
128
- gettext autoconf automake libtool pkg-config
129
- $ conda activate sage-build
130
-
131
- - Run ``bootstrap ``; this generates the files ``src/environment*.yml `` used
120
+ - Generate the conda environment files ``src/environment*.yml `` used
132
121
in the next step::
133
122
134
- $ ./bootstrap
135
-
136
- - Populate the conda environment with the dependencies of Sage::
123
+ $ ./bootstrap-conda
137
124
138
- $ mamba env update -n sage-build -f src/environment.yml # alternatively, use
125
+ - Create and activate a new conda environment with the dependencies of Sage
126
+ and a few additional developer tools::
139
127
140
- Alternatively, you can use `` src/environment-optional .yml``, which will
141
- install some additional packages.
128
+ $ mamba env create --file src/environment-dev .yml --name sage-dev
129
+ $ conda activate sage-dev
142
130
143
- - Activate the conda environment again::
131
+ Alternatively, you can use ``src/environment.yml `` or
132
+ ``src/environment-optional.yml ``, which will only install standard
133
+ (and optional) packages without any additional developer tools.
144
134
145
- $ conda activate sage-build
135
+ By default, the most recent version of Python supported by Sage is
136
+ installed. You can use the additional option ``python=3.9 `` in the above
137
+ ``env create `` command to select another Python version (here 3.9).
146
138
147
139
- Run the ``configure `` script::
148
140
141
+ $ ./bootstrap
149
142
$ ./configure --with-python=$CONDA_PREFIX/bin/python \
150
143
--prefix=$CONDA_PREFIX \
151
144
$(for pkg in $(./sage -package list :standard: \
@@ -154,20 +147,17 @@ Here we assume that you are using a git checkout.
154
147
echo --with-system-$pkg=force; \
155
148
done)
156
149
157
- - Install the build prerequisites of the Sage library::
158
-
159
- $ pip install --no-build-isolation -v -v --editable pkgs/sage-conf pkgs/sage-setup
160
-
161
- - Install the Sage library::
150
+ - Install the build prerequisites and the Sage library::
162
151
163
- $ pip install --no-build-isolation -v -v --editable src
152
+ $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf ./pkgs/sage-setup
153
+ $ pip install --no-build-isolation -v -v --editable ./src
164
154
165
155
- Verify that Sage has been installed::
166
156
167
157
$ sage -c 'print(version())'
168
158
SageMath version 9.6.beta5, Release Date: 2022-03-12
169
159
170
- Note that ``make `` is not used at all. All dependencies
160
+ Note that ``make `` is not used at all. All dependencies
171
161
(including all Python packages) are provided by conda.
172
162
173
163
Thus, you will get a working version of Sage much faster. However,
@@ -179,6 +169,6 @@ library is installed in editable mode. This means that when you only
179
169
edit Python files, there is no need to rebuild the library; it
180
170
suffices to restart Sage.
181
171
182
- After editing any Cython files, rebuild by repeating the command ::
172
+ After editing any Cython files, rebuild the Sage library using ::
183
173
184
174
$ pip install --no-build-isolation -v -v --editable src
0 commit comments