Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox.ini: Update voidlinux, update installation guide #36957

Merged
merged 14 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ EOF
ENDRUN=\'
;;
void*)
# https://hub.docker.com/r/voidlinux/masterdir-x86_64-musl
UPDATE="xbps-install -Su &&"
EXISTS="xbps-query"
UPDATE="xbps-install -Suy &&"
EXISTS="xbps-query -R"
INSTALL="xbps-install --yes"
;;
opensuse*)
Expand Down
15 changes: 15 additions & 0 deletions build/pkgs/_prereq/distros/void.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,19 @@ make
perl
python3
tar
bash
which
# needed by gfortran
diffutils
# needed by ppl
gzip
# void may need special patches for musl libc support in python3,
# so require full python 3 and its prereqs
python3-devel
bzip2-devel
xz
liblzma-devel
libffi-devel
zlib-devel
# to build python3 with the crypto module; there may be other packages that need it
libxcrypt-devel
1 change: 1 addition & 0 deletions build/pkgs/_python3.11/distros/void.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3.11-devel
2 changes: 1 addition & 1 deletion build/pkgs/python3/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can also use ``--with-python=/path/to/python3_binary`` to tell Sage to use
``/path/to/python3_binary`` to set up the venv. Note that setting up the venv requires
a number of Python modules to be available within the Python in question. Currently,
as of Sage 9.7, these modules are as follows: ``sqlite3``, ``ctypes``, ``math``,
``hashlib``, ``crypt``, ``socket``, ``zlib``, ``distutils.core``, ``ssl`` -
``hashlib``, ``socket``, ``zlib``, ``distutils.core``, ``ssl`` -
they will be checked for by the ``configure`` script.

Use the ``configure`` option ``--without-system-python3`` in case you want Python 3
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/python3/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SAGE_SPKG_CONFIGURE([python3], [
dnl Check if we can do venv with a system python3
dnl instead of building our own copy.
dnl Trac #31160: We no longer check for readline here.
check_modules="sqlite3, ctypes, math, hashlib, crypt, socket, zlib, distutils.core, ssl, ensurepip"
check_modules="sqlite3, ctypes, math, hashlib, socket, zlib, distutils.core, ssl, ensurepip"
AC_CACHE_CHECK([for python3 >= ]MIN_VERSION[, < ]LT_VERSION[ with modules $check_modules], [ac_cv_path_PYTHON3], [
AS_IF([test x"$ac_path_PYTHON3" != x], [dnl checking explicitly specified $with_python
AC_MSG_RESULT([])
Expand Down
2 changes: 1 addition & 1 deletion src/doc/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ shopt -s extglob
RECOMMENDED_SPKG_PATTERN="@(_recommended$(for a in $(head -n 1 build/pkgs/_recommended/dependencies); do echo -n "|"$a; done))"
DEVELOP_SPKG_PATTERN="@(_develop$(for a in $(head -n 1 build/pkgs/_develop/dependencies); do echo -n "|"$a; done))"

for SYSTEM in arch debian fedora homebrew opensuse; do
for SYSTEM in arch debian fedora homebrew opensuse void; do
SYSTEM_PACKAGES=
OPTIONAL_SYSTEM_PACKAGES=
SAGELIB_SYSTEM_PACKAGES=
Expand Down
8 changes: 4 additions & 4 deletions src/doc/en/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ Linux
- No development: **Do you have root access (sudo)?**

- **Yes, root access:** Then the easiest way to install SageMath is
through a Linux distribution that provides it as a package. Most
major Linux distributions have up-to-date versions of SageMath,
through a Linux distribution that provides it as a package. Some
Linux distributions have up-to-date versions of SageMath,
see `repology.org: sagemath
<https://repology.org/project/sagemath/versions>`_ for an
overview. See :ref:`sec-GNU-Linux` for additional information.

If you are on an older version of your distribution and a recent
version of SageMath is only available on a newer version of the
distribution, consider upgrading your distribution.
In particular, do not install a version of Sage older than 9.2.
In particular, do not install a version of Sage older than 9.5.

- **No root access, or on an older distribution** Install SageMath from
- **No root access, or on an older distribution:** Install SageMath from
the `conda-forge <https://conda-forge.org/>`_ project, as described in section
:ref:`sec-installation-conda`.

Expand Down
24 changes: 14 additions & 10 deletions src/doc/en/installation/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ Linux Package Managers
SageMath is available from various distributions and can be installed
by package managers.

See `the _sagemath dummy package <../reference/spkg/_sagemath.html>`_
for the names of packages that provide a standard installation of
SageMath, including documentation and Jupyter.
As of Sage 10.2, we can recommend the following distributions, which
provide well-maintained and up-to-date SageMath packages:
`Arch Linux <https://archlinux.org/>`_
and `Void Linux <https://voidlinux.org/>`_.

See also `repology.org: sagemath
<https://repology.org/project/sagemath/versions>`_ for information
about versions of SageMath packages in various distributions.
**Do not install a version of Sage older than 9.2.**
Gentoo users might want to give a try to
`sage-on-gentoo <https://github.com/cschwan/sage-on-gentoo>`_.

**Do not install a version of Sage older than 9.5.**
If you are on an older version of your distribution and a recent
version of SageMath is only available on a newer version of the
distribution, consider upgrading your distribution.

Gentoo users might want to give a try to
`sage-on-gentoo <https://github.com/cschwan/sage-on-gentoo>`_.
See `the _sagemath dummy package <../reference/spkg/_sagemath.html>`_
for the names of packages that provide a standard installation of
SageMath, including documentation and Jupyter. See also `repology.org: sagemath
<https://repology.org/project/sagemath/versions>`_ for information
about versions of SageMath packages in various distributions.

The `GitHub wiki page Distribution <https://github.com/sagemath/sage/wiki/Distribution>` collects information
The `GitHub wiki page Distribution <https://github.com/sagemath/sage/wiki/Distribution>`_ collects information
regarding packaging and distribution of SageMath.
45 changes: 34 additions & 11 deletions src/doc/en/installation/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ installed by Sage.
When the ``./configure`` script runs, it will check for the presence of many
packages (including the above) and inform you of any that are
missing or have unsuitable versions. **Please read the messages that
``./configure`` prints:** It will inform you which additional system packages
./configure prints:** It will inform you which additional system packages
you can install to avoid having to build them from source. This can save a lot of
time.

Expand Down Expand Up @@ -183,6 +183,29 @@ install:

.. literalinclude:: opensuse-optional.txt

Void Linux package installation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On Void Linux, we recommend that you install:

.. literalinclude:: void.txt

If you wish to do Sage development, we recommend that you additionally
install the following:

.. literalinclude:: void-develop.txt

For all users, we recommend that you install the following system packages,
which provide additional functionality and cannot be installed by Sage:

.. literalinclude:: void-recommended.txt

In addition to these, if you don't want Sage to build optional packages that might
be available from your OS, cf. the growing list of such packages on :trac:`27330`,
install:

.. literalinclude:: void-optional.txt

.. _section_macprereqs:

macOS prerequisites
Expand Down Expand Up @@ -275,8 +298,8 @@ Sage can be installed onto Linux running on Windows Subsystem for Linux (WSL). T
From this point on, follow the instructions in the :ref:`sec-installation-from-sources-linux-recommended-installation` section.
It is strongly recommended to put the Sage source files in the Linux file system, for example, in the ``/home/username/sage`` directory, and not in the Windows file system (e.g. ``/mnt/c/...``).

WSL permission denied error when building `packaging` package.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WSL permission denied error when building ``packaging`` package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You may encounter permission errors of the kind ``"[Errno 13] Permission denied: 'build/bdist.linux-x86_64/wheel/<package>.dist-info'"`` during ``make``.
This usually comes from a permission conflict between the Windows and Linux file system.
Expand Down Expand Up @@ -305,19 +328,19 @@ Notes on using conda

If you don't want conda to be used by sage, deactivate conda (for the current shell session).

- Type::
- Type::

$ conda deactivate
$ conda deactivate

- Repeat the command until ``conda info`` shows::
- Repeat the command until ``conda info`` shows::

$ conda info
$ conda info

active environment : None
...
active environment : None
...

Then SageMath will be built either using the compilers provided by the
operating system, or its own compilers.
Then SageMath will be built either using the compilers provided by the
operating system, or its own compilers.


Tcl/Tk (and system's Python)
Expand Down
14 changes: 10 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ setenv =
almalinux: IGNORE_MISSING_SYSTEM_PACKAGES=yes
almalinux-8: BASE_TAG=8
almalinux-9: BASE_TAG=9
#
# https://hub.docker.com/r/sheerluck/sage-on-gentoo-stage4/tags
#
gentoo: SYSTEM=gentoo
Expand All @@ -348,11 +349,13 @@ setenv =
slackware-current: BASE_TAG=current
slackware: IGNORE_MISSING_SYSTEM_PACKAGES=no
#
# https://hub.docker.com/r/voidlinux/
# https://github.com/orgs/void-linux/packages?repo_name=void-containers
#
voidlinux: SYSTEM=void
voidlinux: BASE_IMAGE=voidlinux/masterdir-x86_64-musl
voidlinux: BASE_TAG=20200104
voidlinux: SYSTEM=void
voidlinux: BASE_IMAGE=ghcr.io/void-linux/void-glibc-full
voidlinux-musl: BASE_IMAGE=ghcr.io/void-linux/void-musl-full
voidlinux-minimal: BASE_IMAGE=ghcr.io/void-linux/void-glibc
voidlinux-musl-minimal: BASE_IMAGE=ghcr.io/void-linux/void-musl
voidlinux: IGNORE_MISSING_SYSTEM_PACKAGES=no
#
# https://hub.docker.com/_/alpine/
Expand Down Expand Up @@ -681,6 +684,9 @@ setenv =

sitepackages: IGNORE_MISSING_SYSTEM_PACKAGES=yes

# https://docs.docker.com/engine/reference/commandline/buildx_build/#progress
docker: BUILDKIT_PROGRESS=plain

# environment will be skipped if regular expression does not match against the sys.platform string
platform =
local-macos: darwin
Expand Down
Loading