Skip to content

Commit

Permalink
Merge branch 'tox_voidlinux' into python_3_13
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jan 4, 2024
2 parents 8e27a8e + 1cae3d4 commit 5724da3
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 33 deletions.
2 changes: 1 addition & 1 deletion build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ EOF
;;
void*)
# https://hub.docker.com/r/voidlinux/masterdir-x86_64-musl
UPDATE="xbps-install -Su &&"
UPDATE="xbps-install -Suy &&"
EXISTS="xbps-query"
INSTALL="xbps-install --yes"
;;
Expand Down
12 changes: 12 additions & 0 deletions build/pkgs/_prereq/distros/void.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@ perl
python3
tar
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
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 10.2, these modules are as follows: ``sqlite3``, ``ctypes``, ``math``,
``hashlib``, ``crypt``, ``socket``, ``zlib``, ``ssl``, ``ensurepip``.
``hashlib``, ``socket``, ``zlib``, ``ssl``, ``ensurepip``.
For Python >= 3.12, also ``setuptools`` is required; for older Python versions,
``distutils.core`` is required. These modules will be checked for by the ``configure``
script.
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, ssl, ensurepip"
check_modules="sqlite3, ctypes, math, hashlib, socket, zlib, ssl, ensurepip"
AC_CACHE_CHECK([for python3 >= ]MIN_VERSION[, < ]LT_VERSION[ with modules $check_modules and setuptools/distutils], [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
11 changes: 7 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

0 comments on commit 5724da3

Please sign in to comment.