Skip to content

Commit 5ba29aa

Browse files
authored
Merge pull request #80 from kwankyu/p/streamline-installation-guide
P/streamline installation guide
2 parents c118397 + 67ec7b4 commit 5ba29aa

File tree

13 files changed

+1258
-1241
lines changed

13 files changed

+1258
-1241
lines changed

README.md

Lines changed: 173 additions & 571 deletions
Large diffs are not rendered by default.

build/bin/sage-print-system-package-command

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ do
3333
PROMPT="${1#--prompt=}"
3434
;;
3535
--prompt)
36-
PROMPT=' $ '
37-
CONTINUATION=' '
36+
PROMPT='$ '
37+
CONTINUATION=''
3838
;;
3939
--continuation=*)
4040
CONTINUATION="${1#--continuation=}"

src/doc/bootstrap

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,48 +35,48 @@ for SYSTEM in arch debian fedora homebrew opensuse void; do
3535
RECOMMENDED_SYSTEM_PACKAGES=
3636
DEVELOP_SYSTEM_PACKAGES=
3737
for PKG_BASE in $(sage-package list --has-file distros/$SYSTEM.txt); do
38-
PKG_SCRIPTS=build/pkgs/$PKG_BASE
39-
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
40-
PKG_SYSTEM_PACKAGES=$(sage-get-system-packages $SYSTEM $PKG_BASE)
41-
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
42-
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
43-
case "$PKG_BASE:$PKG_TYPE" in
44-
*:standard)
45-
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
46-
;;
47-
$DEVELOP_SPKG_PATTERN:*)
48-
DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
49-
;;
50-
$RECOMMENDED_SPKG_PATTERN:*)
51-
RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
52-
;;
53-
*)
54-
OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
55-
;;
56-
esac
57-
else
58-
case "$PKG_BASE:$PKG_TYPE" in
59-
$DEVELOP_SPKG_PATTERN:*)
60-
DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
61-
;;
62-
*:standard)
63-
SAGELIB_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
64-
;;
65-
*)
66-
SAGELIB_OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
67-
;;
68-
esac
69-
fi
70-
fi
38+
PKG_SCRIPTS=build/pkgs/$PKG_BASE
39+
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
40+
PKG_SYSTEM_PACKAGES=$(sage-get-system-packages $SYSTEM $PKG_BASE)
41+
if [ -n "$PKG_SYSTEM_PACKAGES" ]; then
42+
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
43+
case "$PKG_BASE:$PKG_TYPE" in
44+
*:standard)
45+
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
46+
;;
47+
$DEVELOP_SPKG_PATTERN:*)
48+
DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
49+
;;
50+
$RECOMMENDED_SPKG_PATTERN:*)
51+
RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
52+
;;
53+
*)
54+
OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
55+
;;
56+
esac
57+
else
58+
case "$PKG_BASE:$PKG_TYPE" in
59+
$DEVELOP_SPKG_PATTERN:*)
60+
DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
61+
;;
62+
*:standard)
63+
SAGELIB_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
64+
;;
65+
*)
66+
SAGELIB_OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
67+
;;
68+
esac
69+
fi
70+
fi
7171
done
7272

7373
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
7474
echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt"
7575
fi
76-
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt
77-
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt
78-
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt
79-
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt
76+
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo "$SYSTEM_PACKAGES" | xargs -n 1 echo | sort | uniq))" > "$OUTPUT_DIR"/$SYSTEM.txt
77+
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo "$OPTIONAL_SYSTEM_PACKAGES" | xargs -n 1 echo | sort | uniq))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt
78+
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo "$RECOMMENDED_SYSTEM_PACKAGES" | xargs -n 1 echo | sort | uniq))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt
79+
echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo "$DEVELOP_SYSTEM_PACKAGES" | xargs -n 1 echo | sort | uniq))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt
8080
done
8181

8282
OUTPUT_DIR="src/doc/en/reference/spkg"

src/doc/en/installation/binary.rst

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,57 @@
11
.. _sec-installation-from-binaries:
22

3-
Install from Pre-Built Binaries
4-
===============================
3+
Install from Prebuilt Binaries
4+
==============================
5+
6+
.. _sec-installation-linux:
57

68
Linux
79
-----
810

9-
SageMath used to provide pre-built binaries for several Linux flavors.
10-
This has been discontinued, as most major Linux distributions have
11-
up-to-date distribution packages providing SageMath.
12-
See :ref:`sec-GNU-Linux` for information.
11+
Sage is available from various distributions and can be installed
12+
by package managers.
13+
14+
As of Sage 10.2, we can recommend the following distributions, which
15+
provide well-maintained and up-to-date Sage packages:
16+
`Arch Linux <https://archlinux.org/>`_
17+
and `Void Linux <https://voidlinux.org/>`_.
18+
19+
Gentoo users might want to give a try to
20+
`sage-on-gentoo <https://github.com/cschwan/sage-on-gentoo>`_.
21+
22+
**Do not install a version of Sage older than 9.5.**
23+
If you are on an older version of your distribution and a recent
24+
version of Sage is only available on a newer version of the
25+
distribution, consider upgrading your distribution.
1326

27+
See `the _sagemath dummy package <../reference/spkg/_sagemath.html>`_
28+
for the names of packages that provide a standard installation of
29+
Sage, including documentation and Jupyter. See also `repology.org: sagemath
30+
<https://repology.org/project/sagemath/versions>`_ for information
31+
about versions of Sage packages in various distributions.
32+
33+
The `GitHub wiki page Distribution <https://github.com/sagemath/sage/wiki/Distribution>`_
34+
collects information regarding packaging and distribution of Sage.
35+
36+
.. _sec-installation-mac:
1437

1538
macOS
1639
-----
1740

18-
macOS binaries are available `from the 3-manifolds project
19-
<https://github.com/3-manifolds/Sage_macOS/releases/>`_. These
20-
have been signed and notarized, eliminating various errors caused by
21-
Apple's gatekeeper antimalware protections.
41+
macOS binaries are available from `the 3-manifolds project <https://github.com/3-manifolds/Sage_macOS/releases/>`_.
42+
It is a signed and notarized app, which works for macOS 10.12 and newer. It is
43+
completely self-contained and provides the standard Sage distribution together
44+
with many optional packages. Additional optional Python packages can be
45+
installed with the ``%pip`` magic command and will go into your ``~/.sage``
46+
directory.
2247

23-
SageMath used to provide pre-built binaries for macOS on its mirrors.
48+
Sage used to provide prebuilt binaries for macOS on its mirrors.
2449
This has been discontinued, and the old binaries that are still available
2550
there are no longer supported.
2651

52+
Windows
53+
-------
2754

28-
Microsoft Windows
29-
-----------------
30-
31-
SageMath used to provide pre-built binaries for Windows based on Cygwin.
55+
Sage used to provide prebuilt binaries for Windows based on Cygwin.
3256
This has been discontinued, and the old binaries that can be found
3357
are no longer supported. Use Windows Subsystem for Linux instead.

src/doc/en/installation/conda.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Install from conda-forge
44
========================
55

6-
SageMath can be installed on Linux and macOS via Conda from the
7-
`conda-forge <https://conda-forge.org>`_ conda channel.
6+
Sage can be installed via Conda from the `conda-forge
7+
<https://conda-forge.org>`_ conda channel.
88

99
Both the ``x86_64`` (Intel) architecture and the ``arm64``/``aarch64``
1010
architectures (including Apple Silicon, M1, M2, M3, M4) are supported.
@@ -33,10 +33,11 @@ which uses a faster dependency solver than ``conda``.
3333

3434
.. _sec-installation-conda-binary:
3535

36-
Installing all of SageMath from conda (not for development)
37-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
Installing all of Sage from conda
37+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3838

39-
Create a new conda environment containing SageMath, either with ``mamba`` or ``conda``:
39+
This is a quick way to install Sage for non-developer users. Create a new conda
40+
environment containing Sage, either with ``mamba`` or ``conda``:
4041

4142
.. tab:: mamba
4243

@@ -55,7 +56,7 @@ where ``X`` is version of Python, e.g. ``3.9``.
5556
To use Sage from there,
5657

5758
* Enter the new environment: ``conda activate sage``
58-
* Start SageMath: ``sage``
59+
* Start Sage: ``sage``
5960

6061
If there are any installation failures, please report them to
6162
the conda-forge maintainers by opening a `GitHub Issue for

0 commit comments

Comments
 (0)