From 4c2c379f4c8765c2836d236bc56369f2833fd7c8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 25 Nov 2024 11:45:01 +0800 Subject: [PATCH 01/66] Use meson project for building sagelib --- build/pkgs/sagelib/dependencies | 2 +- build/pkgs/sagelib/spkg-install.in | 9 ++++----- build/pkgs/sagelib/src | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 120000 build/pkgs/sagelib/src diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies index b1ebfd0825e..fb937dbfe08 100644 --- a/build/pkgs/sagelib/dependencies +++ b/build/pkgs/sagelib/dependencies @@ -1,4 +1,4 @@ -FORCE $(SCRIPTS) boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran +FORCE $(SCRIPTS) boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) meson_python $(PYTHON) pythran ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index 5c78e3459c8..2856a33094b 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -1,15 +1,14 @@ if [ "$SAGE_EDITABLE" = yes ]; then - cd "$SAGE_SRC" + cd ../../.. else - cd src + cd ../../.. # Issue #34181: Do not allow scripts with shebang lines from old # venvs leak into new venvs. (Changes only seem to be necessary # for non-editable builds.) rm -rf build/scripts-* fi -## All sagelib-building is done by setup.py. -## This is so that sagelib can be installed by standard Python procedures, -## such as "./setup.py install" or "pip install ." +## All sagelib-building is using standard Python procedures, +## such as "pip install ." ## ## We poison all environment variables that have paths to the sage source and build directories. ## In this way we make sure that all of the sagelib build's source paths are communicated through diff --git a/build/pkgs/sagelib/src b/build/pkgs/sagelib/src deleted file mode 120000 index 0aa4dc12060..00000000000 --- a/build/pkgs/sagelib/src +++ /dev/null @@ -1 +0,0 @@ -../../../pkgs/sagemath-standard \ No newline at end of file From bceddbe00ad3cdeae9e7a54d568cf39b6af44fe1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 25 Nov 2024 11:45:54 +0800 Subject: [PATCH 02/66] Remove unneeded sagemath-standard package --- pkgs/sagemath-standard/.gitignore | 1 - pkgs/sagemath-standard/LICENSE.txt | 1 - pkgs/sagemath-standard/MANIFEST.in | 1 - pkgs/sagemath-standard/Pipfile | 1 - pkgs/sagemath-standard/Pipfile-dist | 1 - pkgs/sagemath-standard/Pipfile-dist.m4 | 1 - pkgs/sagemath-standard/Pipfile.m4 | 1 - pkgs/sagemath-standard/README.rst | 33 --- pkgs/sagemath-standard/VERSION.txt | 1 - pkgs/sagemath-standard/bin | 1 - pkgs/sagemath-standard/constraints_pkgs.txt | 21 -- pkgs/sagemath-standard/pyproject.toml | 1 - pkgs/sagemath-standard/requirements.txt | 1 - pkgs/sagemath-standard/requirements.txt.m4 | 1 - pkgs/sagemath-standard/sage | 1 - pkgs/sagemath-standard/sage_setup | 1 - pkgs/sagemath-standard/setup.cfg | 1 - pkgs/sagemath-standard/setup.cfg.m4 | 1 - pkgs/sagemath-standard/setup.py | 99 --------- pkgs/sagemath-standard/tox.ini | 218 -------------------- 20 files changed, 387 deletions(-) delete mode 100644 pkgs/sagemath-standard/.gitignore delete mode 120000 pkgs/sagemath-standard/LICENSE.txt delete mode 120000 pkgs/sagemath-standard/MANIFEST.in delete mode 120000 pkgs/sagemath-standard/Pipfile delete mode 120000 pkgs/sagemath-standard/Pipfile-dist delete mode 120000 pkgs/sagemath-standard/Pipfile-dist.m4 delete mode 120000 pkgs/sagemath-standard/Pipfile.m4 delete mode 100644 pkgs/sagemath-standard/README.rst delete mode 120000 pkgs/sagemath-standard/VERSION.txt delete mode 120000 pkgs/sagemath-standard/bin delete mode 100644 pkgs/sagemath-standard/constraints_pkgs.txt delete mode 120000 pkgs/sagemath-standard/pyproject.toml delete mode 120000 pkgs/sagemath-standard/requirements.txt delete mode 120000 pkgs/sagemath-standard/requirements.txt.m4 delete mode 120000 pkgs/sagemath-standard/sage delete mode 120000 pkgs/sagemath-standard/sage_setup delete mode 120000 pkgs/sagemath-standard/setup.cfg delete mode 120000 pkgs/sagemath-standard/setup.cfg.m4 delete mode 100755 pkgs/sagemath-standard/setup.py delete mode 100644 pkgs/sagemath-standard/tox.ini diff --git a/pkgs/sagemath-standard/.gitignore b/pkgs/sagemath-standard/.gitignore deleted file mode 100644 index ac3f595461d..00000000000 --- a/pkgs/sagemath-standard/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/setup.cfg diff --git a/pkgs/sagemath-standard/LICENSE.txt b/pkgs/sagemath-standard/LICENSE.txt deleted file mode 120000 index e2c3aad55a8..00000000000 --- a/pkgs/sagemath-standard/LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -../../src/LICENSE.txt \ No newline at end of file diff --git a/pkgs/sagemath-standard/MANIFEST.in b/pkgs/sagemath-standard/MANIFEST.in deleted file mode 120000 index 00f2f3dd9e9..00000000000 --- a/pkgs/sagemath-standard/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -../../src/MANIFEST.in \ No newline at end of file diff --git a/pkgs/sagemath-standard/Pipfile b/pkgs/sagemath-standard/Pipfile deleted file mode 120000 index 5005c3dd05a..00000000000 --- a/pkgs/sagemath-standard/Pipfile +++ /dev/null @@ -1 +0,0 @@ -../../src/Pipfile \ No newline at end of file diff --git a/pkgs/sagemath-standard/Pipfile-dist b/pkgs/sagemath-standard/Pipfile-dist deleted file mode 120000 index 19a48455254..00000000000 --- a/pkgs/sagemath-standard/Pipfile-dist +++ /dev/null @@ -1 +0,0 @@ -../../Pipfile \ No newline at end of file diff --git a/pkgs/sagemath-standard/Pipfile-dist.m4 b/pkgs/sagemath-standard/Pipfile-dist.m4 deleted file mode 120000 index 93f4bfa88eb..00000000000 --- a/pkgs/sagemath-standard/Pipfile-dist.m4 +++ /dev/null @@ -1 +0,0 @@ -../../Pipfile.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/Pipfile.m4 b/pkgs/sagemath-standard/Pipfile.m4 deleted file mode 120000 index 553967c6e09..00000000000 --- a/pkgs/sagemath-standard/Pipfile.m4 +++ /dev/null @@ -1 +0,0 @@ -../../src/Pipfile.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/README.rst b/pkgs/sagemath-standard/README.rst deleted file mode 100644 index b5d44eb1f9b..00000000000 --- a/pkgs/sagemath-standard/README.rst +++ /dev/null @@ -1,33 +0,0 @@ -================================================================= - Sage: Open Source Mathematics Software: Standard Python Library -================================================================= - -About SageMath --------------- - - "Creating a Viable Open Source Alternative to - Magma, Maple, Mathematica, and MATLAB" - - Copyright (C) 2005-2024 The Sage Development Team - - https://www.sagemath.org - -SageMath fully supports all major Linux distributions, recent versions of macOS, and Windows (Windows Subsystem for Linux). - -See https://doc.sagemath.org/html/en/installation/index.html -for general installation instructions. - - -About this pip-installable distribution package ------------------------------------------------ - -This pip-installable source distribution `sagemath-standard` is a -distribution of the Sage Library. - -Building `sagemath-standard` has a large number of system packages as prerequisites. -See https://doc.sagemath.org/html/en/installation/source.html#linux-recommended-installation -for partial lists for various systems. - -The connection to the system environment is facilitated through the https://pypi.org/project/sage-conf/ distribution package; for step-by-step installation instructions, see https://github.com/sagemath/sage/blob/develop/README.md#alternative-installation-using-pypi - -A modularization effort is in progress with the goal of making it possible to install parts of the Sage Library with fewer prerequisites. https://github.com/sagemath/sage/issues/29705 diff --git a/pkgs/sagemath-standard/VERSION.txt b/pkgs/sagemath-standard/VERSION.txt deleted file mode 120000 index 43f4773d7de..00000000000 --- a/pkgs/sagemath-standard/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -../../src/VERSION.txt \ No newline at end of file diff --git a/pkgs/sagemath-standard/bin b/pkgs/sagemath-standard/bin deleted file mode 120000 index 2f8b9b30ee7..00000000000 --- a/pkgs/sagemath-standard/bin +++ /dev/null @@ -1 +0,0 @@ -../../src/bin \ No newline at end of file diff --git a/pkgs/sagemath-standard/constraints_pkgs.txt b/pkgs/sagemath-standard/constraints_pkgs.txt deleted file mode 100644 index 139aae58f86..00000000000 --- a/pkgs/sagemath-standard/constraints_pkgs.txt +++ /dev/null @@ -1,21 +0,0 @@ -# This "constraints file" can be used for forcing pip -# (and any tools that delegate to pip, such as pypa/build) -# to install the dependencies of sagemath-standard that are -# distribution packages included in the SageMath monorepository -# only from their source trees in SAGE_ROOT/pkgs/ -# instead of from PyPI. -# -# Example: -# -# [alice@localhost sage]$ ./bootstrap -# [alice@localhost sage]$ ./configure -# [alice@localhost sage]$ export MAKE="make -j16" SAGE_NUM_THREADS=16 -# [alice@localhost sage]$ make all-sage-local -# [alice@localhost sage]$ export PIP_CONSTRAINT="$(pwd)/pkgs/sagemath-standard/constraints_pkgs.txt" -# [alice@localhost sage]$ ./sage -sh -c 'python3 -m build -v -v pkgs/sagemath-standard' -# -# Reference on the format: -# https://pip.pypa.io/en/stable/user_guide/#constraints-files -# -sage_conf @ file://${SAGE_ROOT}/pkgs/sage-conf -sage_setup @ file://${SAGE_ROOT}/pkgs/sage-setup diff --git a/pkgs/sagemath-standard/pyproject.toml b/pkgs/sagemath-standard/pyproject.toml deleted file mode 120000 index ef15d0eea45..00000000000 --- a/pkgs/sagemath-standard/pyproject.toml +++ /dev/null @@ -1 +0,0 @@ -../../src/pyproject.toml \ No newline at end of file diff --git a/pkgs/sagemath-standard/requirements.txt b/pkgs/sagemath-standard/requirements.txt deleted file mode 120000 index 41cff1c5d99..00000000000 --- a/pkgs/sagemath-standard/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -../../src/requirements.txt \ No newline at end of file diff --git a/pkgs/sagemath-standard/requirements.txt.m4 b/pkgs/sagemath-standard/requirements.txt.m4 deleted file mode 120000 index 7e82604f467..00000000000 --- a/pkgs/sagemath-standard/requirements.txt.m4 +++ /dev/null @@ -1 +0,0 @@ -../../src/requirements.txt.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/sage b/pkgs/sagemath-standard/sage deleted file mode 120000 index e0da5daa6f2..00000000000 --- a/pkgs/sagemath-standard/sage +++ /dev/null @@ -1 +0,0 @@ -../../src/sage \ No newline at end of file diff --git a/pkgs/sagemath-standard/sage_setup b/pkgs/sagemath-standard/sage_setup deleted file mode 120000 index 88b8133df49..00000000000 --- a/pkgs/sagemath-standard/sage_setup +++ /dev/null @@ -1 +0,0 @@ -../../src/sage_setup \ No newline at end of file diff --git a/pkgs/sagemath-standard/setup.cfg b/pkgs/sagemath-standard/setup.cfg deleted file mode 120000 index ba9b315730a..00000000000 --- a/pkgs/sagemath-standard/setup.cfg +++ /dev/null @@ -1 +0,0 @@ -../../src/setup.cfg \ No newline at end of file diff --git a/pkgs/sagemath-standard/setup.cfg.m4 b/pkgs/sagemath-standard/setup.cfg.m4 deleted file mode 120000 index 8934d7b5955..00000000000 --- a/pkgs/sagemath-standard/setup.cfg.m4 +++ /dev/null @@ -1 +0,0 @@ -../../src/setup.cfg.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/setup.py b/pkgs/sagemath-standard/setup.py deleted file mode 100755 index 95c1609cf1c..00000000000 --- a/pkgs/sagemath-standard/setup.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import time -# Import setuptools before importing distutils, so that setuptools -# can replace distutils by its own vendored copy. -import setuptools -from distutils import log -from setuptools import setup - -# Work around a Cython problem in Python 3.8.x on macOS -# https://github.com/cython/cython/issues/3262 -if os.uname().sysname == 'Darwin': - import multiprocessing - multiprocessing.set_start_method('fork', force=True) - -# If build isolation is not in use and setuptools_scm is installed, -# then its file_finders entry point is invoked, which we don't need. -# Workaround from ​https://github.com/pypa/setuptools_scm/issues/190#issuecomment-351181286 -try: - import setuptools_scm.integration - setuptools_scm.integration.find_files = lambda _: [] -except ImportError: - pass - -# Different workaround: disable `walk_revctrl` in setuptools -# This is needed for setuptools_scm >= 8, should work for any version -import setuptools.command.egg_info -setuptools.command.egg_info.walk_revctrl = lambda: () - -######################################################### -### Set source directory -######################################################### - -# PEP 517 builds do not have . in sys.path -sys.path.insert(0, os.path.dirname(__file__)) - -import sage.env -sage.env.SAGE_SRC = os.getcwd() -from sage.env import * - -######################################################### -### Configuration -######################################################### - -from sage_setup.excepthook import excepthook -sys.excepthook = excepthook - -from sage_setup.setenv import setenv -setenv() - -from sage_setup.command.sage_build_cython import sage_build_cython -from sage_setup.command.sage_build_ext import sage_build_ext -from sage_setup.command.sage_install import sage_develop, sage_install - -cmdclass = dict(build_cython=sage_build_cython, - build_ext=sage_build_ext, - develop=sage_develop, - install=sage_install) - -######################################################### -### Discovering Sources -######################################################### - -if any(x in sys.argv - for x in ['build', 'build_ext', 'bdist_wheel', 'install']): - log.info("Generating auto-generated sources") - from sage_setup.autogen import autogen_all - autogen_all() - -# TODO: This should be quiet by default -print("Discovering Python/Cython source code....") -t = time.time() -distributions = ['sagemath-categories', - 'sagemath-environment', - 'sagemath-objects', - 'sagemath-repl', - ''] -log.warn('distributions = {0}'.format(distributions)) -from sage_setup.find import find_python_sources -python_packages, python_modules, cython_modules = find_python_sources( - SAGE_SRC, ['sage'], distributions=distributions) - -log.debug('python_packages = {0}'.format(python_packages)) -log.debug('python_modules = {0}'.format(python_modules)) -log.debug('cython_modules = {0}'.format(cython_modules)) - -print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t)) - -######################################################### -### Distutils -######################################################### - -code = setup( - packages=python_packages, - cmdclass=cmdclass, - ext_modules=cython_modules, -) diff --git a/pkgs/sagemath-standard/tox.ini b/pkgs/sagemath-standard/tox.ini deleted file mode 100644 index 0ac97f8a021..00000000000 --- a/pkgs/sagemath-standard/tox.ini +++ /dev/null @@ -1,218 +0,0 @@ -# All tests require an installation of the non-Python components of the Sage distribution -# in SAGE_LOCAL. -# -# See envlist below for different environments. -# -# To build and test in the tox environment using the concrete Python dependencies specified -# by requirements.txt, using the wheels built and stored by the Sage distribution: -# (Using 'sage -sh' in combination with 'sagepython-...' tox environments -# ensures that we use the same Python as the one that we built the wheels -# for. This can also be done ensured manually by using the tox environment py38-sagewheels etc.) -# -# Afterwards, to test interactively: -# -# pkgs/sagemath-standard/.tox/ENVIRONMENT/bin/python -# pkgs/sagemath-standard/.tox/ENVIRONMENT/bin/sage -# -[tox] -envlist = - # Build and test without using the concrete dependencies specified by requirements.txt, - # using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only: - # Still use ONLY the wheels built and stored by the Sage distribution (no PyPI). - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-nopypi-norequirements)' - # - sagepython-sagewheels-nopypi-norequirements - # - # OTHER SUPPORTED ENVIRONMENTS: - # - # Build dependencies according to requirements.txt (all versions fixed). - # Use ONLY the wheels built and stored by the Sage distribution (no PyPI): - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-nopypi)' - # - # Build and test without using the concrete dependencies specified by requirements.txt, - # using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only: - # Install the distribution packages included in the SageMath monorepository only from - # their source trees in SAGE_ROOT/pkgs/ (not from PyPI). - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-constraints_pkgs-norequirements)' - # - # Build dependencies according to requirements.txt (all versions fixed). - # Install the distribution packages included in the SageMath monorepository only from - # their source trees in SAGE_ROOT/pkgs/ (not from PyPI). - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-constraints_pkgs)' - # - # EXPERIMENTAL ENVIRONMENTS: - # - # Build dependencies according to requirements.txt (all versions fixed). - # Use the wheels built and stored by the Sage distribution, - # and additionally allow packages from PyPI. - # Because all versions are fixed, we "should" end up using the prebuilt wheels. - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels)' - # - # Likewise, but using pipenv using Pipfile-dist (= SAGE_ROOT/Pipfile). - # This also fixes the concrete dependencies (at least for some packages). - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-pipenv-dist)' - # - # Build using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only. - # Use the wheels built and stored by the Sage distribution, - # and additionally allow packages from PyPI. - # - # Because the version ranges will allow for packages to come in from PyPI (in source or wheel form), - # this is likely to fail because we do not have control over the configuration of these packages. - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-norequirements)' - # - # Likewise, but using pipenv - # - # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-pipenv)' - # - -requires = - # Auto-provision a modern tox. - # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance - # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2 - tox<4.14.1 - -[pkgenv] -# Environment in which to build the sdist. -# https://tox.wiki/en/latest/upgrading.html#packaging-environments -passenv = - # Variables set by .homebrew-build-env - CPATH - LIBRARY_PATH - PKG_CONFIG_PATH - # Parallel build - SAGE_NUM_THREADS - SAGE_NUM_THREADS_PARALLEL - MAKEFLAGS - # SAGE_VENV only for referring to the basepython or finding the wheels - sagepython, sagewheels: SAGE_VENV - # Used as an environment variable in constraints_pkgs.txt - constraints_pkgs: SAGE_ROOT - # Location of the wheels - sagewheels: SAGE_SPKG_WHEELS - -setenv = - # We supply pip options by environment variables so that they - # apply both to the installation of the dependencies and of the package - sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels} - nopypi: PIP_NO_INDEX=true - constraints_pkgs: PIP_CONSTRAINT={toxinidir}/constraints_pkgs.txt - # No build isolation for PEP 517 packages - use what is already in the environment - # Note that this pip env "NO" variable uses inverted logic: - # PIP_NO_BUILD_ISOLATION=False means don't use build isolation. - # See https://github.com/conda/conda-build/blob/8f1b3517fd0c816ec78b6dadf4a912b849ecd58a/conda_build/build.py#L2574 - nobuildisolation: PIP_NO_BUILD_ISOLATION=false - # Do not write or use Pipfile.lock -- we cannot seem to set its location, - # so we cannot isolate it in the tox environment. - pipenv: PIPENV_SKIP_LOCK=true - -[testenv] -deps = - pipenv: pipenv - !pipenv-!norequirements: -rrequirements.txt - ## Needed for fpylll - norequirements: Cython - norequirements: cysignals - -sitepackages = - sitepackages: True - !sitepackages: False - -extras = test - -passenv = {[pkgenv]passenv} - -setenv = {[pkgenv]setenv} - # Sage scripts such as sage-runtests like to use $HOME/.sage - HOME={envdir} - -allowlist_externals = - bash - -# Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. -# So we change to another directory when running commands. -change_dir = {env_tmp_dir} - -commands = - python -c 'import sage.all; print(sage.all.__file__)' - - # We check that the "sage" script invokes the correct Python. - sage -c 'import sys; print("sys.path =", sys.path); import sage.all; print(sage.all.__file__)' - - sage -t -p --all - -[testenv:.tox] -# Allow access to PyPI for auto-provisioning a suitable tox version -passenv = -setenv = PIP_NO_INDEX=false - -[testenv:.pkg-sagepython] -# Environment in which to build the sdist. -# inherits from [pkgenv] - https://tox.wiki/en/latest/upgrading.html#packaging-environments -basepython = {env:SAGE_VENV}/bin/python3 - -[testenv:.pkg-sagepython-sagewheels-nopypi] -passenv = {[pkgenv]passenv} - SAGE_VENV - SAGE_SPKG_WHEELS - -setenv = {[pkgenv]setenv} - PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels} - PIP_NO_INDEX=true - -basepython = {env:SAGE_VENV}/bin/python3 - -[testenv:.pkg-sagepython-constraints_pkgs] -passenv = {[pkgenv]passenv} - SAGE_VENV - # Location of constraints_pkgs.txt - SAGE_ROOT - -setenv = {[pkgenv]setenv} - PIP_CONSTRAINT={env:SAGE_ROOT}/constraints_pkgs.txt - -basepython = {env:SAGE_VENV}/bin/python3 - -[testenv:sagepython] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython - -[testenv:sagepython-sagewheels-nopypi] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython-sagewheels-nopypi - -[testenv:sagepython-sagewheels] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython - -[testenv:sagepython-sagewheels-pipenv-dist] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython - -[testenv:sagepython-sagewheels-norequirements] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython - -[testenv:sagepython-sagewheels-pipenv] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython - -[testenv:sagepython-constraints_pkgs] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython-constraints_pkgs - -[testenv:sagepython-constraints_pkgs-norequirements] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython-constraints_pkgs - - -[testenv:sagepython-sagewheels-nopypi-norequirements] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython-sagewheels-nopypi From 0d8ab454b93bb5ad51b3cb79300f7a6edb020078 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 25 Nov 2024 11:48:09 +0800 Subject: [PATCH 03/66] Remove old build infrastructure --- src/MANIFEST.in | 76 ---------------------- src/VERSION.txt | 1 - src/pyproject.toml | 89 -------------------------- src/requirements.txt.m4 | 58 ----------------- src/setup.cfg.m4 | 138 ---------------------------------------- src/setup.py | 134 -------------------------------------- 6 files changed, 496 deletions(-) delete mode 100644 src/MANIFEST.in delete mode 100644 src/VERSION.txt delete mode 100644 src/pyproject.toml delete mode 100644 src/requirements.txt.m4 delete mode 100644 src/setup.cfg.m4 delete mode 100755 src/setup.py diff --git a/src/MANIFEST.in b/src/MANIFEST.in deleted file mode 100644 index f6231401294..00000000000 --- a/src/MANIFEST.in +++ /dev/null @@ -1,76 +0,0 @@ -include VERSION.txt - -recursive-include sage *.pxi *.pxd *.h *.hpp - -prune sage/ext/interpreters # In particular, __init__.py must not be present in the distribution; or sage_setup.autogen.interpreters.rebuild will not generate the code -prune sage_docbuild -prune doc - -# include sage_setup -recursive-include sage_setup * -prune sage_setup/autogen/flint* -exclude sage_setup/autogen/flint* -exclude sage_setup/autogen/giacpy* - -# -# Most C and C++ files are generated by Cython and should not -# be included in the sdist. -# -global-exclude *.c -global-exclude *.cpp - -# -# List of C and C++ files that are actual source files, -# NOT generated by Cython. The same list appears in SAGE_ROOT/.gitignore -# -include sage/cpython/debugimpl.c -include sage/graphs/base/boost_interface.cpp -include sage/graphs/cliquer/cl.c -include sage/libs/eclib/wrap.cpp -include sage/libs/linkages/padics/relaxed/flint_helper.c -include sage/misc/inherit_comparison_impl.c -include sage/modular/arithgroup/farey.cpp -include sage/modular/arithgroup/sl2z.cpp -include sage/rings/bernmm/bern_modp.cpp -include sage/rings/bernmm/bern_modp_util.cpp -include sage/rings/bernmm/bern_rat.cpp -include sage/rings/bernmm/bernmm-test.cpp -include sage/rings/padics/transcendantal.c -include sage/rings/polynomial/weil/power_sums.c -include sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp -include sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp -include sage/stats/distributions/dgs_bern.c -include sage/stats/distributions/dgs_gauss_dp.c -include sage/stats/distributions/dgs_gauss_mp.c -include sage/symbolic/ginac/*.cpp -# Also actual C++ source files. -include sage/geometry/triangulation/triangulations.cc -include sage/geometry/triangulation/data.cc -include sage/geometry/triangulation/functions.cc - -# Exclude extension modules shipped by optional packages -exclude sage/graphs/bliss.p* -prune sage/graphs/bliss_cpp -prune sage/libs/coxeter3 -exclude sage/graphs/mcqd.p* -exclude sage/libs/meataxe.p* -exclude sage/libs/sirocco.p* -exclude sage/matrix/matrix_gfpn_dense.p* -exclude sage/graphs/graph_decompositions/tdlib.p* - -# Exclude all__*.py files belonging to distributions related to optional packages -global-exclude all__sagemath_bliss.py -global-exclude all__sagemath_coxeter3.py -global-exclude all__sagemath_mcqd.py -global-exclude all__sagemath_meataxe.py -global-exclude all__sagemath_sirocco.py -global-exclude all__sagemath_tdlib.py - -global-exclude __pycache__ -global-exclude *.py[co] -global-exclude *.bak -global-exclude *.so -global-exclude *~ -prune .tox -prune build -prune dist diff --git a/src/VERSION.txt b/src/VERSION.txt deleted file mode 100644 index d2205320557..00000000000 --- a/src/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -10.5.rc1 diff --git a/src/pyproject.toml b/src/pyproject.toml deleted file mode 100644 index 4b70dc133d1..00000000000 --- a/src/pyproject.toml +++ /dev/null @@ -1,89 +0,0 @@ -[build-system] -# Minimum requirements for the build system to execute. -requires = [ - # 68.1.0 Promote pyproject.toml's [tool.setuptools] out of beta. - # 68.1.1 Fix editable install finder handling of nested packages - 'setuptools >= 68.1.1', - # version constraint for macOS Big Sur support (see https://github.com/sagemath/sage/issues/31050) - 'wheel >=0.36.2', - 'cypari2 >=2.1.1', - 'cysignals >=1.10.2', - # Exclude 3.0.3 because of https://github.com/cython/cython/issues/5748 - 'cython >=3.0, != 3.0.3, <4.0', - 'gmpy2 ~=2.1.b999', - 'memory_allocator', - 'numpy >=1.19', - 'pkgconfig', - 'jinja2', -] -build-backend = "setuptools.build_meta" - -[tool.conda-lock] -platforms = [ - 'osx-64', 'linux-64', 'linux-aarch64', 'osx-arm64' -] - -[external] -# External dependencies in the format proposed by https://peps.python.org/pep-0725 -# In the future, sage-the-distribution can read this information -build-requires = [ - "virtual:compiler/c", - "virtual:compiler/cpp", - "pkg:generic/pkg-config" -] - -host-requires = [ - "virtual:interface/blas", - "pkg:generic/boost", - "pkg:generic/brial", - "pkg:generic/cddlib", - "pkg:generic/cliquer", - "pkg:generic/ecl", - "pkg:generic/eclib", - "pkg:generic/ecm", - "pkg:generic/fflas-ffpack", - "pkg:generic/fplll", - "pkg:generic/flint", - "pkg:generic/libgd", - "pkg:generic/gap", - "pkg:generic/gfan", - "pkg:generic/giac", - "pkg:generic/givaro", - "pkg:generic/glpk", - "pkg:generic/gmp", - "pkg:generic/gsl", - "pkg:generic/iml", - "pkg:generic/lcalc", - "pkg:generic/libbraiding", - "pkg:generic/libhomfly", - "pkg:generic/linbox", - "pkg:generic/lrcalc", - "pkg:generic/m4ri", - "pkg:generic/m4rie", - "pkg:generic/maxima", - "pkg:generic/mpc", - "pkg:generic/mpfi", - "pkg:generic/mpfr", - "pkg:generic/nauty", - "pkg:generic/ntl", - "pkg:generic/palp", - "pkg:generic/pari", - "pkg:generic/pari-elldata", - "pkg:generic/pari-galdata", - "pkg:generic/pari-seadata", - "pkg:generic/planarity", - "pkg:generic/ppl", - "pkg:generic/primesieve", - "pkg:generic/primecount", - "pkg:generic/qhull", - "pkg:generic/rw", - "pkg:generic/singular", - "pkg:generic/symmetrica", - "pkg:generic/sympow", -] - -dependencies = [ - "pkg:generic/tachyon", - "pkg:generic/sagemath-polytopes-db", - "pkg:generic/sagemath-elliptic-curves", -] diff --git a/src/requirements.txt.m4 b/src/requirements.txt.m4 deleted file mode 100644 index 34c42860cf1..00000000000 --- a/src/requirements.txt.m4 +++ /dev/null @@ -1,58 +0,0 @@ -## requirements.txt for creating venvs with sagelib -## -## Usage: -## -## $ ../sage -sh -## (sage-sh) $ python3 -m venv venv1 -## (sage-sh) $ source venv1/bin/activate -## (venv1) (sage-sh) $ pip install -r requirements.txt -## (venv1) (sage-sh) $ pip install -e . - -dnl FIXME: Including the whole package-version.txt does not work for packages that have a patchlevel.... -dnl We need a better tool to format this information. - -sage-conf==esyscmd(`printf $(sed "s/[.]p.*//;" ../sage_conf/package-version.txt)') -dnl sage_setup # Will be split out later. - -dnl From build/pkgs/sagelib/dependencies -cypari2==esyscmd(`printf $(sed "s/[.]p.*//;" ../cypari/package-version.txt)') -dnl ... but building bdist_wheel of cypari2 fails with recent pip... https://github.com/sagemath/cypari2/issues/93 -cysignals==esyscmd(`printf $(sed "s/[.]p.*//;" ../cysignals/package-version.txt)') -Cython==esyscmd(`printf $(sed "s/[.]p.*//;" ../cython/package-version.txt)') -gmpy2==esyscmd(`printf $(sed "s/[.]p.*//;" ../gmpy2/package-version.txt)') -importlib_metadata==esyscmd(`printf $(sed "s/[.]p.*//;" ../importlib_metadata/package-version.txt)') -importlib_resources==esyscmd(`printf $(sed "s/[.]p.*//;" ../importlib_resources/package-version.txt)') -jinja2==esyscmd(`printf $(sed "s/[.]p.*//;" ../jinja2/package-version.txt)') -dnl ... for sage_setup.autogen.interpreters -jupyter_core==esyscmd(`printf $(sed "s/[.]p.*//;" ../jupyter_core/package-version.txt)') -lrcalc==esyscmd(`printf $(sed "s/[.]p.*//;" ../lrcalc_python/package-version.txt)') -memory_allocator==esyscmd(`printf $(sed "s/[.]p.*//;" ../memory_allocator/package-version.txt)') -numpy==esyscmd(`printf $(sed "s/[.]p.*//;" ../numpy/package-version.txt)') -dnl ... already needed by sage.env -pkgconfig==esyscmd(`printf $(sed "s/[.]p.*//;" ../pkgconfig/package-version.txt)') -pplpy==esyscmd(`printf $(sed "s/[.]p.*//;" ../pplpy/package-version.txt)') -primecountpy==esyscmd(`printf $(sed "s/[.]p.*//;" ../primecountpy/package-version.txt)') -requests==esyscmd(`printf $(sed "s/[.]p.*//;" ../requests/package-version.txt)') -typing_extensions==esyscmd(`printf $(sed "s/[.]p.*//;" ../typing_extensions/package-version.txt)') - -dnl From Makefile.in: SAGERUNTIME -ipython==esyscmd(`printf $(sed "s/[.]p.*//;" ../ipython/package-version.txt)') -pexpect==esyscmd(`printf $(sed "s/[.]p.*//;" ../pexpect/package-version.txt)') - -dnl From Makefile.in: DOC_DEPENDENCIES -sphinx==esyscmd(`printf $(sed "s/[.]p.*//;" ../sphinx/package-version.txt)') -networkx==esyscmd(`printf $(sed "s/[.]p.*//;" ../networkx/package-version.txt)') -scipy==esyscmd(`printf $(sed "s/[.]p.*//;" ../scipy/package-version.txt)') -sympy==esyscmd(`printf $(sed "s/[.]p.*//;" ../sympy/package-version.txt)') -matplotlib==esyscmd(`printf $(sed "s/[.]p.*//;" ../matplotlib/package-version.txt)') -pillow==esyscmd(`printf $(sed "s/[.]p.*//;" ../pillow/package-version.txt)') -mpmath==esyscmd(`printf $(sed "s/[.]p.*//;" ../mpmath/package-version.txt)') -ipykernel==esyscmd(`printf $(sed "s/[.]p.*//;" ../ipykernel/package-version.txt)') -jupyter_client==esyscmd(`printf $(sed "s/[.]p.*//;" ../jupyter_client/package-version.txt)') -ipywidgets==esyscmd(`printf $(sed "s/[.]p.*//;" ../ipywidgets/package-version.txt)') - -dnl Other Python packages that are standard spkg, used in doctests -cvxopt==esyscmd(`printf $(sed "s/[.]p.*//;" ../cvxopt/package-version.txt)') -rpy2==esyscmd(`printf $(sed "s/[.]p.*//;" ../rpy2/package-version.txt)') -fpylll==esyscmd(`printf $(sed "s/[.]p.*//;" ../fpylll/package-version.txt)') -dnl pycryptosat # Sage distribution installs it as part of cryptominisat. According to its README on https://pypi.org/project/pycryptosat/: "The pycryptosat python package compiles while compiling CryptoMiniSat. It cannot be compiled on its own, it must be compiled at the same time as CryptoMiniSat." diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4 deleted file mode 100644 index 969793209c8..00000000000 --- a/src/setup.cfg.m4 +++ /dev/null @@ -1,138 +0,0 @@ -include(`sage_spkg_versions.m4')dnl' -*- conf-unix -*- -[metadata] -name = sagemath-standard -version = file: VERSION.txt -description = Sage: Open Source Mathematics Software: Standard Python Library -long_description = file: README.rst -long_description_content_type = text/x-rst -license_files = LICENSE.txt -include(`setup_cfg_metadata.m4')dnl' - -[options] -python_requires = >=3.9, <3.13 -install_requires = - SPKG_INSTALL_REQUIRES_six -dnl From build/pkgs/sagelib/dependencies - SPKG_INSTALL_REQUIRES_conway_polynomials - SPKG_INSTALL_REQUIRES_cypari - SPKG_INSTALL_REQUIRES_cysignals - SPKG_INSTALL_REQUIRES_cython - SPKG_INSTALL_REQUIRES_gmpy2 - SPKG_INSTALL_REQUIRES_importlib_metadata - SPKG_INSTALL_REQUIRES_importlib_resources - SPKG_INSTALL_REQUIRES_jupyter_core - SPKG_INSTALL_REQUIRES_lrcalc_python - SPKG_INSTALL_REQUIRES_memory_allocator - SPKG_INSTALL_REQUIRES_numpy - SPKG_INSTALL_REQUIRES_pkgconfig - SPKG_INSTALL_REQUIRES_pplpy - SPKG_INSTALL_REQUIRES_primecountpy - SPKG_INSTALL_REQUIRES_requests - SPKG_INSTALL_REQUIRES_typing_extensions -dnl From Makefile.in: SAGERUNTIME - SPKG_INSTALL_REQUIRES_ipython - SPKG_INSTALL_REQUIRES_pexpect -dnl From Makefile.in: DOC_DEPENDENCIES - sphinx >=5.2, <9 - SPKG_INSTALL_REQUIRES_networkx - SPKG_INSTALL_REQUIRES_scipy - SPKG_INSTALL_REQUIRES_sympy - SPKG_INSTALL_REQUIRES_matplotlib - SPKG_INSTALL_REQUIRES_pillow - SPKG_INSTALL_REQUIRES_mpmath - SPKG_INSTALL_REQUIRES_ipykernel - SPKG_INSTALL_REQUIRES_jupyter_client - SPKG_INSTALL_REQUIRES_ipywidgets - SPKG_INSTALL_REQUIRES_fpylll -dnl pycryptosat # Sage distribution installs it as part of cryptominisat. According to its README on https://pypi.org/project/pycryptosat/: "The pycryptosat python package compiles while compiling CryptoMiniSat. It cannot be compiled on its own, it must be compiled at the same time as CryptoMiniSat." -dnl Packages with important upper version bounds - SPKG_INSTALL_REQUIRES_ptyprocess - -scripts = - # The sage script - bin/sage - # Other scripts that should be in the path also for OS packaging of sage: - bin/sage-eval - # Included because it is useful for doctesting/coverage testing user scripts too: - bin/sage-runtests - bin/sage-fixdoctests - bin/sage-coverage - # The following is deprecated but might still be used in user package install scripts - bin/sage-cython - # Helper scripts invoked by sage script - # (they would actually belong to something like libexec) - bin/sage-cachegrind - bin/sage-callgrind - bin/sage-massif - bin/sage-omega - bin/sage-valgrind - bin/sage-venv-config - bin/sage-version.sh - bin/sage-cleaner - # Only makes sense in sage-the-distribution. TODO: Move to another installation script. - bin/sage-list-packages - # Uncategorized scripts in alphabetical order - bin/math-readline - bin/sage-env - # sage-env-config -- installed by sage_conf - # sage-env-config.in -- not to be installed - bin/sage-grep - bin/sage-grepdoc - bin/sage-inline-fortran - bin/sage-ipynb2rst - bin/sage-ipython - bin/sage-notebook - bin/sage-num-threads.py - bin/sage-preparse - bin/sage-python - bin/sage-run - bin/sage-run-cython - bin/sage-startuptime.py - bin/sage-update-version - -[options.package_data] - -sage.libs.gap = - sage.gaprc - -sage.interfaces = - sage-maxima.lisp - -sage.doctest = - tests/* - -sage.repl.rich_output = - example* - -sage = - ext_data/* - ext_data/kenzo/* - ext_data/singular/* - ext_data/singular/function_field/* - ext_data/images/* - ext_data/doctest/* - ext_data/doctest/invalid/* - ext_data/gap/* - ext_data/gap/joyner/* - ext_data/mwrank/* - ext_data/notebook-ipython/* - ext_data/nbconvert/* - ext_data/graphs/* - ext_data/pari/* - ext_data/pari/dokchitser/* - ext_data/pari/buzzard/* - ext_data/pari/simon/* - ext_data/magma/* - ext_data/magma/latex/* - ext_data/magma/sage/* - ext_data/valgrind/* - ext_data/threejs/* - -[options.extras_require] -R = SPKG_INSTALL_REQUIRES_rpy2 -bliss = SPKG_INSTALL_REQUIRES_sagemath_bliss -coxeter3 = SPKG_INSTALL_REQUIRES_sagemath_coxeter3 -mcqd = SPKG_INSTALL_REQUIRES_sagemath_mcqd -meataxe = SPKG_INSTALL_REQUIRES_sagemath_meataxe -sirocco = SPKG_INSTALL_REQUIRES_sagemath_sirocco -tdlib = SPKG_INSTALL_REQUIRES_sagemath_tdlib diff --git a/src/setup.py b/src/setup.py deleted file mode 100755 index dfa2e59b2e1..00000000000 --- a/src/setup.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env python - -## This version of setup.py is used by the Sage distribution -## only when configure --enable-editable has been used. -## -## Distribution packaging should use build/pkgs/sagelib/src/setup.py -## instead. - -import os -import platform -import sys -import time -from setuptools import setup, find_namespace_packages -from setuptools.dist import Distribution -from distutils import log -import multiprocessing.pool - -# PEP 517 builds do not have . in sys.path -sys.path.insert(0, os.path.dirname(__file__)) - -from sage.misc.package import is_package_installed_and_updated -from sage_setup.command.sage_build_ext_minimal import sage_build_ext_minimal -from sage_setup.command.sage_install import sage_develop, sage_install -from sage_setup.find import filter_cython_sources -from sage_setup.cython_options import compiler_directives, compile_time_env_variables -from sage_setup.extensions import create_extension -from sage_setup.excepthook import excepthook - -# Work around a Cython problem in Python 3.8.x on macOS -# https://github.com/cython/cython/issues/3262 -if platform.system() == 'Darwin': - import multiprocessing - multiprocessing.set_start_method('fork', force=True) - -# setuptools plugins considered harmful: -# If build isolation is not in use and setuptools_scm is installed, -# then its file_finders entry point is invoked, which we don't need. -# And with setuptools_scm 8, we get more trouble: -# LookupError: pyproject.toml does not contain a tool.setuptools_scm section -# LookupError: setuptools-scm was unable to detect version ... -# We just remove all handling of "setuptools.finalize_distribution_options" entry points. -Distribution._removed = staticmethod(lambda ep: True) - -# ######################################################## -# ## Set source directory -# ######################################################## - -import sage.env -sage.env.SAGE_SRC = os.getcwd() -from sage.env import * - -sys.excepthook = excepthook - -from sage_setup.setenv import setenv -setenv() - -# ######################################################## -# ## Configuration -# ######################################################## - -if len(sys.argv) > 1 and (sys.argv[1] in ["sdist", "egg_info", "dist_info"]): - sdist = True -else: - sdist = False - -# ######################################################## -# ## Discovering Sources -# ######################################################## -if sdist: - extensions = [] - python_packages = [] -else: - log.info("Generating auto-generated sources") - from sage_setup.autogen import autogen_all - autogen_all() - - log.info("Discovering Python/Cython source code...") - - optional_packages = ['mcqd', 'bliss', 'tdlib', - 'coxeter3', 'sirocco', 'meataxe'] - distributions_to_exclude = [f"sagemath-{pkg}" - for pkg in optional_packages] - files_to_exclude = filter_cython_sources(SAGE_SRC, distributions_to_exclude) - - log.debug(f"files_to_exclude = {files_to_exclude}") - - python_packages = find_namespace_packages(where=SAGE_SRC, include=['sage', 'sage.*']) - log.debug(f"python_packages = {python_packages}") - - log.info(f"Discovering Python/Cython source code... done") - - # from sage_build_cython: - import Cython.Compiler.Options - Cython.Compiler.Options.embed_pos_in_docstring = True - gdb_debug = os.environ.get('SAGE_DEBUG', None) != 'no' - - aliases = cython_aliases() - log.debug(f"aliases = {aliases}") - include_path = sage_include_directories(use_sources=True) + ['.'] - log.debug(f"include_path = {include_path}") - nthreads = sage_build_ext_minimal.get_default_number_build_jobs() - log.info(f"Cythonizing with {nthreads} threads...") - try: - from Cython.Build import cythonize - from sage.env import cython_aliases, sage_include_directories - from sage.misc.package_dir import cython_namespace_package_support - with cython_namespace_package_support(): - extensions = cythonize( - ["sage/**/*.pyx"], - exclude=files_to_exclude, - include_path=include_path, - compile_time_env=compile_time_env_variables(), - compiler_directives=compiler_directives(False), - aliases=aliases, - create_extension=create_extension, - gdb_debug=gdb_debug, - nthreads=nthreads) - except Exception as exception: - log.warn(f"Exception while cythonizing source files: {repr(exception)}") - raise - log.info(f"Cythonizing with {nthreads} threads... done") - -# ######################################################## -# ## Distutils -# ######################################################## -code = setup( - packages=python_packages, - cmdclass={ - "build_ext": sage_build_ext_minimal, - "develop": sage_develop, - "install": sage_install, - }, - ext_modules=extensions -) From 30ff9fcb47d4c0b1a6f37692d2af2cf434667de1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 25 Nov 2024 11:48:20 +0800 Subject: [PATCH 04/66] Remove old conda tests --- .../ci-conda-known-test-failures.json | 89 -------------- .github/workflows/ci-conda.yml | 112 ------------------ 2 files changed, 201 deletions(-) delete mode 100644 .github/workflows/ci-conda-known-test-failures.json delete mode 100644 .github/workflows/ci-conda.yml diff --git a/.github/workflows/ci-conda-known-test-failures.json b/.github/workflows/ci-conda-known-test-failures.json deleted file mode 100644 index 9bc9ac03df2..00000000000 --- a/.github/workflows/ci-conda-known-test-failures.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "doc.en.constructions.calculus": { - "failed": "unreported random failures in plotting" - }, - "sage_setup.clean": { - "failed": "_find_stale_files finds some stale files under sage/tests when executed under conda" - }, - "sage.algebras.fusion_rings.fusion_ring": { - "failed": "unreported random timeouts" - }, - "sage.combinat.cluster_algebra_quiver.quiver": { - "failed": "failure seen in https://github.com/sagemath/sage/actions/runs/6836592771/job/18591690058#step:11:10059" - }, - "sage.geometry.cone": { - "failed": "unreported random timeouts seen in https://github.com/sagemath/sage/actions/runs/6827937663/job/18571052628#step:11:12362" - }, - "sage.groups.matrix_gps.finitely_generated_gap": { - "failed": true - }, - "sage.interfaces.expect": { - "failed": true - }, - "sage.libs.gap.element": { - "failed": "failure seen in https://github.com/sagemath/sage/actions/runs/6840579851/job/18600012965#step:11:13016" - }, - "sage.libs.singular.singular": { - "failed": true - }, - "sage.matrix.matrix2": { - "failed": "failure seen in https://github.com/sagemath/sage/actions/runs/6835143781/job/18588599649#step:11:16939" - }, - "sage.matrix.matrix_integer_sparse": { - "failed": "failure seen in https://github.com/sagemath/sage/actions/runs/6827937663/job/18571052628#step:11:12362" - }, - "sage.misc.lazy_import": { - "failed": true - }, - "sage.misc.weak_dict": { - "failed": "failure seen in https://github.com/sagemath/sage/actions/runs/6870325919/job/18684964234#step:11:10059" - }, - "sage.modular.modform.l_series_gross_zagier": { - "failed": "unreported failure seen in https://github.com/sagemath/sage/actions/runs/6859244281/job/18651257775#step:11:10102" - }, - "sage.numerical.linear_tensor_element": { - "failed": "random segfaults https://github.com/sagemath/sage/issues/28559" - }, - "sage.parallel.map_reduce": { - "failed": "random failure https://github.com/sagemath/sage/issues/36939" - }, - "sage.plot.plot": { - "failed": "unreported random failure (macOS)" - }, - "sage.rings.function_field.drinfeld_modules.morphism": { - "failed": "unreported random failure seen in https://github.com/sagemath/sage/actions/runs/6840502530/job/18599835766#step:11:10107" - }, - "sage.rings.number_field.galois_group": { - "failed": "unreported failure on macOS (sort order) in GaloisGroup_v2.artin_symbol, https://github.com/sagemath/sage/actions/runs/9525536510/job/26259809272?pr=37998" - }, - "sage.rings.number_field.number_field": { - "failed": "unreported failure on macOS (sort order) in NumberField_absolute.[optimized_]subfields, https://github.com/sagemath/sage/actions/runs/9525536510/job/26259809272?pr=37998" - }, - "sage.rings.polynomial.multi_polynomial_ideal": { - "failed": true - }, - "sage.rings.polynomial.multi_polynomial_libsingular": { - "failed": true - }, - "sage.rings.polynomial.polynomial_element": { - "failed": "unreported random failure in symbolic 'roots' (macOS)" - }, - "sage.rings.polynomial.skew_polynomial_finite_field": { - "failed": true - }, - "sage.rings.qqbar": { - "failed": "unreported failure on macOS seen in https://github.com/sagemath/sage/actions/runs/9525536510/job/26259809272?pr=37998" - }, - "sage.schemes.elliptic_curves.descent_two_isogeny": { - "failed": "random segfault (macOS) https://github.com/sagemath/sage/issues/36949" - }, - "sage.schemes.elliptic_curves.ell_field": { - "failed": "random failure https://github.com/sagemath/sage/issues/36832" - }, - "sage.sets.recursively_enumerated_set": { - "failed": "random failures related to AlarmInterrupt (macOS)" - }, - "sage.structure.coerce_actions": { - "failed": "random failure https://github.com/sagemath/sage/issues/35973" - } -} diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml deleted file mode 100644 index f620820ae68..00000000000 --- a/.github/workflows/ci-conda.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Build & Test using Conda - -on: - push: - tags: - - '*' - branches: - - 'public/build/**-runci' - pull_request: - workflow_dispatch: - # Allow to run manually - -concurrency: - # Cancel previous runs of this workflow for the same branch - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - test: - name: Conda - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - # On pushes to tags or branches, test the whole matrix. - os: >- - ${{ github.event_name == 'pull_request' - && fromJson('["ubuntu-latest"]') - || fromJson('["ubuntu-latest", "macos-latest", "macos-13"]') }} - python: >- - ${{ github.event_name == 'pull_request' - && fromJson('["3.9"]') - || fromJson('["3.9", "3.10", "3.11"]') }} - # Optional environment is disabled for now as its not yet working - # environment: [environment, environment-optional] - conda-env: [environment] - # On pull requests, only test two jobs: - # Ubuntu with Python 3.9, macOS (arm64) with Python 3.11. - # Build & Test currently uses Python 3.10 (on ubuntu-jammy). - # Together, they cover the supported minor Python versions. - include: >- - ${{ github.event_name == 'pull_request' - && fromJson('[{"os": "macos-latest", "python": "3.11", "conda-env": "environment"}]') - || fromJson('[]') }} - - steps: - - uses: actions/checkout@v4 - - - name: Merge CI fixes from sagemath/sage - run: | - .ci/merge-fixes.sh - env: - GH_TOKEN: ${{ github.token }} - SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }} - - - name: Cache conda packages - uses: actions/cache@v4 - with: - path: ~/conda_pkgs_dir - key: - ${{ runner.os }}-conda-${{ hashFiles('environment-3.11.yml') }} - - - name: Setup Conda environment - uses: conda-incubator/setup-miniconda@v3 - with: - python-version: ${{ matrix.python }} - miniforge-version: latest - use-mamba: true - channels: conda-forge - channel-priority: true - activate-environment: sage - environment-file: ${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml - - - name: Print Conda environment - shell: bash -l {0} - run: | - conda info - conda list - - - name: Bootstrap - shell: bash -l {0} - continue-on-error: true - run: | - ./bootstrap - - - name: Build - shell: bash -l {0} - run: | - # Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda. - pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src - env: - SAGE_NUM_THREADS: 5 - - - name: Verify dependencies - if: success() || failure() - shell: bash -l {0} - run: pip check - - - name: Test - if: success() || failure() - shell: bash -l {0} - run: ./sage -t --all --baseline-stats-path=.github/workflows/ci-conda-known-test-failures.json -p0 - - - name: Print logs - if: always() - run: | - for file in $(find . -type f -name "*.log"); do - echo "::group::$file" - cat "$file" - echo "::endgroup::" - done From 4d48bdbc0548fb2a06795f2e9e1fa738b317176a Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 25 Nov 2024 11:48:36 +0800 Subject: [PATCH 05/66] Cleanup --- README.md | 8 ++------ src/bin/sage-update-version | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index af91374fe19..88fae812736 100644 --- a/README.md +++ b/README.md @@ -533,12 +533,8 @@ SAGE_ROOT Root directory (create by git clone) │ ├── sage-setup │ │ ├── sage_setup/ │ │ └── setup.py -│ ├── sage-sws2rst -│ │ ├── sage_sws2rst/ -│ │ └── setup.py -│ └── sagemath-standard -│ ├── bin/ -│ ├── sage -> ../../src/sage +│ └── sage-sws2rst +│ ├── sage_sws2rst/ │ └── setup.py ├── local (SAGE_LOCAL) Installation hierarchy for non-Python packages │ ├── bin Executables diff --git a/src/bin/sage-update-version b/src/bin/sage-update-version index 179461a8340..502dbcf3390 100755 --- a/src/bin/sage-update-version +++ b/src/bin/sage-update-version @@ -48,11 +48,7 @@ done if [ -f "$spkg"/version_requirements.txt -a -d "$spkg"/src ]; then ( echo "# This file is updated on every release by the sage-update-version script" # Normalize the package name to PyPI convention (dashes, not underscores) - if [ "$spkg" = sagelib ]; then - pkg=sagemath-standard - else - pkg=${spkg//_/-} - fi + pkg=${spkg//_/-} # Normalize the version (updated above as VERSION.txt) according to PEP440. version=$(cat "$spkg"/package-version.txt) version=${version//.beta/b} From fd2320f7e1eda28a95ef39a1ab387505a3b111d9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 25 Nov 2024 11:57:28 +0800 Subject: [PATCH 06/66] Fix dockerfile --- .ci/write-dockerfile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index cfd4fb20810..955f4a12599 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -275,11 +275,11 @@ cat < Date: Mon, 25 Nov 2024 12:01:27 +0800 Subject: [PATCH 07/66] more cleanup --- Makefile | 2 +- bootstrap | 3 --- src/doc/en/developer/coding_in_python.rst | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 96d1ba62e94..2a7f5fc2cf8 100644 --- a/Makefile +++ b/Makefile @@ -351,7 +351,7 @@ ptestoptionallong-nodoc: # CONFIGURE_DEPENDENCIES is the list of files that influence the generation of 'configure'. CONFIGURE_DEPENDENCIES = \ configure.ac src/bin/sage-version.sh m4/*.m4 \ - src/pyproject.toml \ + pyproject.toml \ build/pkgs/*/spkg-configure.m4 \ build/pkgs/*/type build/pkgs/*/SPKG.rst \ build/pkgs/*/checksums.ini build/pkgs/*/requirements.txt \ diff --git a/bootstrap b/bootstrap index 9d19e756a38..ea84808f6d9 100755 --- a/bootstrap +++ b/bootstrap @@ -228,9 +228,6 @@ save () { $(find src/doc/en/reference/spkg -name index.rst -prune -o -maxdepth 1 -name "*.rst" -print) \ environment-3.[89].yml environment-3.1[0-9].yml \ src/Pipfile \ - src/pyproject.toml \ - src/requirements.txt \ - src/setup.cfg \ build/pkgs/cypari/version_requirements.txt \ build/pkgs/cysignals/version_requirements.txt \ build/pkgs/cython/version_requirements.txt \ diff --git a/src/doc/en/developer/coding_in_python.rst b/src/doc/en/developer/coding_in_python.rst index bb08408777b..3c4dda138d0 100644 --- a/src/doc/en/developer/coding_in_python.rst +++ b/src/doc/en/developer/coding_in_python.rst @@ -14,8 +14,7 @@ Python language standard Sage library code needs to be compatible with all versions of Python that Sage supports. The information regarding the supported versions -can be found in the files ``build/pkgs/python3/spkg-configure.m4`` and -``src/setup.cfg.m4``. +can be found in ``pyproject.toml``. Python 3.9 is the oldest supported version. Hence, all language and library features that are available in Python 3.9 can From b49286c8819f2e223413bcb565f8dc2722ebf466 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 26 Nov 2024 01:25:58 +0800 Subject: [PATCH 08/66] Fix reference to src/VERSION.txt --- .ci/write-dockerfile.sh | 4 ++-- .github/workflows/doc-build.yml | 2 +- build/pkgs/sage_conf/package-version.txt | 2 +- build/pkgs/sage_docbuild/package-version.txt | 2 +- build/pkgs/sage_setup/package-version.txt | 2 +- build/pkgs/sage_sws2rst/package-version.txt | 2 +- build/pkgs/sagelib/package-version.txt | 2 +- build/pkgs/sagemath_bliss/package-version.txt | 2 +- build/pkgs/sagemath_categories/package-version.txt | 2 +- build/pkgs/sagemath_coxeter3/package-version.txt | 2 +- build/pkgs/sagemath_environment/package-version.txt | 2 +- build/pkgs/sagemath_mcqd/package-version.txt | 2 +- build/pkgs/sagemath_meataxe/package-version.txt | 2 +- build/pkgs/sagemath_objects/package-version.txt | 2 +- build/pkgs/sagemath_repl/package-version.txt | 2 +- build/pkgs/sagemath_sirocco/package-version.txt | 2 +- build/pkgs/sagemath_tdlib/package-version.txt | 2 +- meson.build | 2 +- src/bin/sage-update-version | 1 - 19 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 955f4a12599..b1fa1b8854c 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -287,8 +287,8 @@ $ADD .upstream.d /new/.upstream.d ADD .ci /.ci RUN if [ -d /sage ]; then \\ echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \\ - printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \\ - printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \\ + printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/VERSION.txt\n' >> /sage/.gitignore && \\ + printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/VERSION.txt\n' >> /new/.gitignore && \\ if ! (cd /new && /.ci/retrofit-worktree.sh worktree-image /sage); then \\ echo "retrofit-worktree.sh failed, falling back to replacing /sage"; \\ for a in local logs; do \\ diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 5eb5e932da9..b56eacdb6ef 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -164,7 +164,7 @@ jobs: mathjax_path_from="[-./A-Za-z_]*/tex-chtml[.]js?v=[0-9a-f]*" # mathjax path in new doc mathjax_path_to=$(docker exec -e SAGE_USE_CDNS=yes BUILD /sage/sage -python -c "from sage_docbuild.conf import mathjax_path; print(mathjax_path)") - new_version=$(docker exec BUILD cat src/VERSION.txt) + new_version=$(docker exec BUILD cat VERSION.txt) # Wipe out chronic diffs between old doc and new doc (cd doc && \ find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \ diff --git a/build/pkgs/sage_conf/package-version.txt b/build/pkgs/sage_conf/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sage_conf/package-version.txt +++ b/build/pkgs/sage_conf/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sage_docbuild/package-version.txt b/build/pkgs/sage_docbuild/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sage_docbuild/package-version.txt +++ b/build/pkgs/sage_docbuild/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sage_setup/package-version.txt b/build/pkgs/sage_setup/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sage_setup/package-version.txt +++ b/build/pkgs/sage_setup/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sage_sws2rst/package-version.txt b/build/pkgs/sage_sws2rst/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sage_sws2rst/package-version.txt +++ b/build/pkgs/sage_sws2rst/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagelib/package-version.txt b/build/pkgs/sagelib/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagelib/package-version.txt +++ b/build/pkgs/sagelib/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_bliss/package-version.txt b/build/pkgs/sagemath_bliss/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_bliss/package-version.txt +++ b/build/pkgs/sagemath_bliss/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_categories/package-version.txt b/build/pkgs/sagemath_categories/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_categories/package-version.txt +++ b/build/pkgs/sagemath_categories/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_coxeter3/package-version.txt b/build/pkgs/sagemath_coxeter3/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_coxeter3/package-version.txt +++ b/build/pkgs/sagemath_coxeter3/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_environment/package-version.txt b/build/pkgs/sagemath_environment/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_environment/package-version.txt +++ b/build/pkgs/sagemath_environment/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_mcqd/package-version.txt b/build/pkgs/sagemath_mcqd/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_mcqd/package-version.txt +++ b/build/pkgs/sagemath_mcqd/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_meataxe/package-version.txt b/build/pkgs/sagemath_meataxe/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_meataxe/package-version.txt +++ b/build/pkgs/sagemath_meataxe/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_objects/package-version.txt b/build/pkgs/sagemath_objects/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_objects/package-version.txt +++ b/build/pkgs/sagemath_objects/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_repl/package-version.txt b/build/pkgs/sagemath_repl/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_repl/package-version.txt +++ b/build/pkgs/sagemath_repl/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_sirocco/package-version.txt b/build/pkgs/sagemath_sirocco/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_sirocco/package-version.txt +++ b/build/pkgs/sagemath_sirocco/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/build/pkgs/sagemath_tdlib/package-version.txt b/build/pkgs/sagemath_tdlib/package-version.txt index c4540217bba..fa1e775bd5c 120000 --- a/build/pkgs/sagemath_tdlib/package-version.txt +++ b/build/pkgs/sagemath_tdlib/package-version.txt @@ -1 +1 @@ -src/VERSION.txt \ No newline at end of file +VERSION.txt diff --git a/meson.build b/meson.build index ac5594852ff..8a46034f73d 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'SageMath', ['c', 'cpp', 'cython'], - version: files('src/VERSION.txt'), + version: files('VERSION.txt'), license: 'GPL v3', default_options: ['c_std=c17', 'cpp_std=c++17'], ) diff --git a/src/bin/sage-update-version b/src/bin/sage-update-version index 502dbcf3390..29a6770c593 100755 --- a/src/bin/sage-update-version +++ b/src/bin/sage-update-version @@ -131,7 +131,6 @@ fi git commit -m "Updated SageMath version to $SAGE_VERSION" -- \ "$SAGE_ROOT/VERSION.txt" \ "$SAGE_SRC/sage/version.py" \ - "$SAGE_SRC/VERSION.txt" \ "$SAGE_ROOT/CITATION.cff" \ "$SAGE_SRC/bin/sage-version.sh" \ "$SAGE_ROOT/build/pkgs/configure/checksums.ini" \ From ae33069c1a3d2bdf91da24b595d90c8a442f8e6d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 1 Dec 2024 15:59:35 +0800 Subject: [PATCH 09/66] Fix version symlink --- VERSION.txt | 2 +- build/pkgs/sagelib/package-version.txt | 2 +- src/bin/sage-update-version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 219cada0e3f..861a196a402 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.5.rc2, Release Date: 2024-11-30 +10.5.rc2 diff --git a/build/pkgs/sagelib/package-version.txt b/build/pkgs/sagelib/package-version.txt index fa1e775bd5c..c4fcb84c1a7 120000 --- a/build/pkgs/sagelib/package-version.txt +++ b/build/pkgs/sagelib/package-version.txt @@ -1 +1 @@ -VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/src/bin/sage-update-version b/src/bin/sage-update-version index 29a6770c593..8fe734178fc 100755 --- a/src/bin/sage-update-version +++ b/src/bin/sage-update-version @@ -81,7 +81,7 @@ SAGE_VERSION_BANNER='$SAGE_VERSION_BANNER' EOF # Create a top-level VERSION.txt file, which some external utilities rely on -echo "$SAGE_VERSION_BANNER" > "$SAGE_ROOT/VERSION.txt" +echo "$SAGE_VERSION" > "$SAGE_ROOT/VERSION.txt" # Add version to the front of GitHub release assets URLs. SAGE_MINOR_VERSION=${SAGE_VERSION//.alpha*/} From ccd2770263c11a5740e20143bf8ed43a3ec4c349 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 1 Dec 2024 23:22:51 -0600 Subject: [PATCH 10/66] fix symlinks to VERSION.txt --- build/pkgs/sage_conf/package-version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/sage_conf/package-version.txt b/build/pkgs/sage_conf/package-version.txt index fa1e775bd5c..8d5738a7727 120000 --- a/build/pkgs/sage_conf/package-version.txt +++ b/build/pkgs/sage_conf/package-version.txt @@ -1 +1 @@ -VERSION.txt +VERSION.txt \ No newline at end of file From 1ee3178ea21c2e47ddf38c5ce4f7ecd6c9d1a3cf Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 1 Dec 2024 23:31:05 -0600 Subject: [PATCH 11/66] fix versions of build/pkgs/sagemath_* and build/pkgs/sage_* --- build/pkgs/sage_conf/package-version.txt | 2 +- build/pkgs/sage_docbuild/package-version.txt | 2 +- build/pkgs/sage_setup/package-version.txt | 2 +- build/pkgs/sage_sws2rst/package-version.txt | 2 +- build/pkgs/sagemath_bliss/package-version.txt | 2 +- build/pkgs/sagemath_categories/package-version.txt | 2 +- build/pkgs/sagemath_coxeter3/package-version.txt | 2 +- build/pkgs/sagemath_environment/package-version.txt | 2 +- build/pkgs/sagemath_mcqd/package-version.txt | 2 +- build/pkgs/sagemath_meataxe/package-version.txt | 2 +- build/pkgs/sagemath_objects/package-version.txt | 2 +- build/pkgs/sagemath_repl/package-version.txt | 2 +- build/pkgs/sagemath_sirocco/package-version.txt | 2 +- build/pkgs/sagemath_tdlib/package-version.txt | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/pkgs/sage_conf/package-version.txt b/build/pkgs/sage_conf/package-version.txt index 8d5738a7727..c4fcb84c1a7 120000 --- a/build/pkgs/sage_conf/package-version.txt +++ b/build/pkgs/sage_conf/package-version.txt @@ -1 +1 @@ -VERSION.txt \ No newline at end of file +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_docbuild/package-version.txt b/build/pkgs/sage_docbuild/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sage_docbuild/package-version.txt +++ b/build/pkgs/sage_docbuild/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_setup/package-version.txt b/build/pkgs/sage_setup/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sage_setup/package-version.txt +++ b/build/pkgs/sage_setup/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_sws2rst/package-version.txt b/build/pkgs/sage_sws2rst/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sage_sws2rst/package-version.txt +++ b/build/pkgs/sage_sws2rst/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_bliss/package-version.txt b/build/pkgs/sagemath_bliss/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_bliss/package-version.txt +++ b/build/pkgs/sagemath_bliss/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_categories/package-version.txt b/build/pkgs/sagemath_categories/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_categories/package-version.txt +++ b/build/pkgs/sagemath_categories/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_coxeter3/package-version.txt b/build/pkgs/sagemath_coxeter3/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_coxeter3/package-version.txt +++ b/build/pkgs/sagemath_coxeter3/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_environment/package-version.txt b/build/pkgs/sagemath_environment/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_environment/package-version.txt +++ b/build/pkgs/sagemath_environment/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_mcqd/package-version.txt b/build/pkgs/sagemath_mcqd/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_mcqd/package-version.txt +++ b/build/pkgs/sagemath_mcqd/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_meataxe/package-version.txt b/build/pkgs/sagemath_meataxe/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_meataxe/package-version.txt +++ b/build/pkgs/sagemath_meataxe/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_objects/package-version.txt b/build/pkgs/sagemath_objects/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_objects/package-version.txt +++ b/build/pkgs/sagemath_objects/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_repl/package-version.txt b/build/pkgs/sagemath_repl/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_repl/package-version.txt +++ b/build/pkgs/sagemath_repl/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_sirocco/package-version.txt b/build/pkgs/sagemath_sirocco/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_sirocco/package-version.txt +++ b/build/pkgs/sagemath_sirocco/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_tdlib/package-version.txt b/build/pkgs/sagemath_tdlib/package-version.txt index fa1e775bd5c..3d40e08663c 120000 --- a/build/pkgs/sagemath_tdlib/package-version.txt +++ b/build/pkgs/sagemath_tdlib/package-version.txt @@ -1 +1 @@ -VERSION.txt +/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file From b4103213c416331b714dcdefa377794a53c6350c Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 1 Dec 2024 23:32:13 -0600 Subject: [PATCH 12/66] cd to the correct place --- build/pkgs/sagelib/spkg-install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index 2856a33094b..e30d98be264 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -1,7 +1,7 @@ if [ "$SAGE_EDITABLE" = yes ]; then - cd ../../.. + cd $SAGE_ROOT else - cd ../../.. + cd $SAGE_ROOT # Issue #34181: Do not allow scripts with shebang lines from old # venvs leak into new venvs. (Changes only seem to be necessary # for non-editable builds.) From e2aec7c32e07e51cdf47e87f6eed67e9a5e6b6b8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 2 Dec 2024 15:14:58 +0800 Subject: [PATCH 13/66] Fix relative includes --- src/meson.build | 59 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/src/meson.build b/src/meson.build index 31544d29dbd..59972facac3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -4,27 +4,39 @@ cpp = meson.get_compiler('cpp') cython = meson.get_compiler('cython') # Setup dependencies that are needed by many modules -inc_numpy = run_command( - py, - [ - '-c', - ''' -import numpy -print(numpy.get_include()) - '''.strip(), - ], - check: true, -).stdout().strip() -numpy = declare_dependency(include_directories: inc_numpy) +numpy_dep = dependency('numpy', required: false) +if not numpy_dep.found() + # Older versions of numpy don't have a pkg-config file + # Try to use relative path in case it is installed in a venv in the same directory + incdir_numpy = run_command(py3, + [ + '-c', + '''import os +import numpy as np +incdir = np.get_include() +try: + incdir = print(os.path.relpath(incdir)) +except Exception: + incdir = print(incdir) +''' + ], + check: true + ).stdout().strip() + numpy = declare_dependency(include_directories: inc_numpy) +endif inc_cysignals = run_command( py, [ '-c', - ''' + '''import os import cysignals -print(cysignals.__file__.replace('__init__.py', '')) - '''.strip(), +incdir = cysignals.__file__.replace('__init__.py', '') +try: + incdir = print(os.path.relpath(incdir)) +except Exception: + incdir = print(incdir) +'''.strip(), ], check: true, ).stdout().strip() @@ -34,9 +46,13 @@ inc_gmpy2 = run_command( py, [ '-c', - ''' + '''import os import gmpy2 -print(gmpy2.__file__.replace('__init__.py', '')) +incdir = gmpy2.__file__.replace('__init__.py', '') +try: + incdir = print(os.path.relpath(incdir)) +except Exception: + incdir = print(incdir) '''.strip(), ], check: true, @@ -48,9 +64,14 @@ inc_cypari2 = run_command( py, [ '-c', - ''' + '''import os +os.chdir("..") import cypari2 -print(cypari2.__file__.replace('__init__.py', '')) +incdir = cypari2.__file__.replace('__init__.py', '') +try: +incdir = print(os.path.relpath(incdir)) +except Exception: +incdir = print(incdir) '''.strip(), ], check: true, From 8e6f51b7123269f2348d8849b79fb949174e7f05 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 2 Dec 2024 15:18:00 +0800 Subject: [PATCH 14/66] Fix symlinks --- build/pkgs/sage_docbuild/package-version.txt | 2 +- build/pkgs/sage_setup/package-version.txt | 2 +- build/pkgs/sage_sws2rst/package-version.txt | 2 +- build/pkgs/sagemath_bliss/package-version.txt | 2 +- build/pkgs/sagemath_categories/package-version.txt | 2 +- build/pkgs/sagemath_coxeter3/package-version.txt | 2 +- build/pkgs/sagemath_environment/package-version.txt | 2 +- build/pkgs/sagemath_mcqd/package-version.txt | 2 +- build/pkgs/sagemath_meataxe/package-version.txt | 2 +- build/pkgs/sagemath_objects/package-version.txt | 2 +- build/pkgs/sagemath_repl/package-version.txt | 2 +- build/pkgs/sagemath_sirocco/package-version.txt | 2 +- build/pkgs/sagemath_tdlib/package-version.txt | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/pkgs/sage_docbuild/package-version.txt b/build/pkgs/sage_docbuild/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sage_docbuild/package-version.txt +++ b/build/pkgs/sage_docbuild/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sage_setup/package-version.txt b/build/pkgs/sage_setup/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sage_setup/package-version.txt +++ b/build/pkgs/sage_setup/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sage_sws2rst/package-version.txt b/build/pkgs/sage_sws2rst/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sage_sws2rst/package-version.txt +++ b/build/pkgs/sage_sws2rst/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_bliss/package-version.txt b/build/pkgs/sagemath_bliss/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_bliss/package-version.txt +++ b/build/pkgs/sagemath_bliss/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_categories/package-version.txt b/build/pkgs/sagemath_categories/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_categories/package-version.txt +++ b/build/pkgs/sagemath_categories/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_coxeter3/package-version.txt b/build/pkgs/sagemath_coxeter3/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_coxeter3/package-version.txt +++ b/build/pkgs/sagemath_coxeter3/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_environment/package-version.txt b/build/pkgs/sagemath_environment/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_environment/package-version.txt +++ b/build/pkgs/sagemath_environment/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_mcqd/package-version.txt b/build/pkgs/sagemath_mcqd/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_mcqd/package-version.txt +++ b/build/pkgs/sagemath_mcqd/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_meataxe/package-version.txt b/build/pkgs/sagemath_meataxe/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_meataxe/package-version.txt +++ b/build/pkgs/sagemath_meataxe/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_objects/package-version.txt b/build/pkgs/sagemath_objects/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_objects/package-version.txt +++ b/build/pkgs/sagemath_objects/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_repl/package-version.txt b/build/pkgs/sagemath_repl/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_repl/package-version.txt +++ b/build/pkgs/sagemath_repl/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_sirocco/package-version.txt b/build/pkgs/sagemath_sirocco/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_sirocco/package-version.txt +++ b/build/pkgs/sagemath_sirocco/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt diff --git a/build/pkgs/sagemath_tdlib/package-version.txt b/build/pkgs/sagemath_tdlib/package-version.txt index 3d40e08663c..1c46c402fb7 120000 --- a/build/pkgs/sagemath_tdlib/package-version.txt +++ b/build/pkgs/sagemath_tdlib/package-version.txt @@ -1 +1 @@ -/mnt/opt/Sage/sage-dev/VERSION.txt \ No newline at end of file +../../../VERSION.txt From fd88b98f5901eff0afaf138c65e44d5f45fb275d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 2 Dec 2024 15:26:31 +0800 Subject: [PATCH 15/66] Fix typo --- src/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index 59972facac3..6a7a8eda1bb 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,7 +8,7 @@ numpy_dep = dependency('numpy', required: false) if not numpy_dep.found() # Older versions of numpy don't have a pkg-config file # Try to use relative path in case it is installed in a venv in the same directory - incdir_numpy = run_command(py3, + incdir_numpy = run_command(py, [ '-c', '''import os From a01d26c60aa63161d3df982245abbc917b123e8e Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 2 Dec 2024 15:57:39 +0800 Subject: [PATCH 16/66] fix another typo --- src/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index 6a7a8eda1bb..e746a8d162b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,7 +8,7 @@ numpy_dep = dependency('numpy', required: false) if not numpy_dep.found() # Older versions of numpy don't have a pkg-config file # Try to use relative path in case it is installed in a venv in the same directory - incdir_numpy = run_command(py, + inc_numpy = run_command(py, [ '-c', '''import os From 82dd73170eed879f1503fd6ffdb2b4369917a068 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 2 Dec 2024 10:01:51 -0600 Subject: [PATCH 17/66] made symlinks correct (on Linux) again --- build/pkgs/sage_docbuild/package-version.txt | 2 +- build/pkgs/sage_numerical_backends_coin/package-version.txt | 2 +- build/pkgs/sage_numerical_backends_cplex/package-version.txt | 2 +- build/pkgs/sage_numerical_backends_gurobi/package-version.txt | 2 +- build/pkgs/sage_setup/package-version.txt | 2 +- build/pkgs/sage_sws2rst/package-version.txt | 2 +- build/pkgs/sagemath_bliss/package-version.txt | 2 +- build/pkgs/sagemath_categories/package-version.txt | 2 +- build/pkgs/sagemath_coxeter3/package-version.txt | 2 +- build/pkgs/sagemath_environment/package-version.txt | 2 +- build/pkgs/sagemath_mcqd/package-version.txt | 2 +- build/pkgs/sagemath_meataxe/package-version.txt | 2 +- build/pkgs/sagemath_objects/package-version.txt | 2 +- build/pkgs/sagemath_repl/package-version.txt | 2 +- build/pkgs/sagemath_sirocco/package-version.txt | 2 +- build/pkgs/sagemath_tdlib/package-version.txt | 2 +- configure.ac | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) mode change 100644 => 120000 build/pkgs/sage_numerical_backends_coin/package-version.txt mode change 100644 => 120000 build/pkgs/sage_numerical_backends_cplex/package-version.txt mode change 100644 => 120000 build/pkgs/sage_numerical_backends_gurobi/package-version.txt diff --git a/build/pkgs/sage_docbuild/package-version.txt b/build/pkgs/sage_docbuild/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sage_docbuild/package-version.txt +++ b/build/pkgs/sage_docbuild/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_numerical_backends_coin/package-version.txt b/build/pkgs/sage_numerical_backends_coin/package-version.txt deleted file mode 100644 index 1be519cd2ec..00000000000 --- a/build/pkgs/sage_numerical_backends_coin/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -10.4 diff --git a/build/pkgs/sage_numerical_backends_coin/package-version.txt b/build/pkgs/sage_numerical_backends_coin/package-version.txt new file mode 120000 index 00000000000..c4fcb84c1a7 --- /dev/null +++ b/build/pkgs/sage_numerical_backends_coin/package-version.txt @@ -0,0 +1 @@ +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_numerical_backends_cplex/package-version.txt b/build/pkgs/sage_numerical_backends_cplex/package-version.txt deleted file mode 100644 index 1be519cd2ec..00000000000 --- a/build/pkgs/sage_numerical_backends_cplex/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -10.4 diff --git a/build/pkgs/sage_numerical_backends_cplex/package-version.txt b/build/pkgs/sage_numerical_backends_cplex/package-version.txt new file mode 120000 index 00000000000..c4fcb84c1a7 --- /dev/null +++ b/build/pkgs/sage_numerical_backends_cplex/package-version.txt @@ -0,0 +1 @@ +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_numerical_backends_gurobi/package-version.txt b/build/pkgs/sage_numerical_backends_gurobi/package-version.txt deleted file mode 100644 index 1be519cd2ec..00000000000 --- a/build/pkgs/sage_numerical_backends_gurobi/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -10.4 diff --git a/build/pkgs/sage_numerical_backends_gurobi/package-version.txt b/build/pkgs/sage_numerical_backends_gurobi/package-version.txt new file mode 120000 index 00000000000..c4fcb84c1a7 --- /dev/null +++ b/build/pkgs/sage_numerical_backends_gurobi/package-version.txt @@ -0,0 +1 @@ +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_setup/package-version.txt b/build/pkgs/sage_setup/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sage_setup/package-version.txt +++ b/build/pkgs/sage_setup/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sage_sws2rst/package-version.txt b/build/pkgs/sage_sws2rst/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sage_sws2rst/package-version.txt +++ b/build/pkgs/sage_sws2rst/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_bliss/package-version.txt b/build/pkgs/sagemath_bliss/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_bliss/package-version.txt +++ b/build/pkgs/sagemath_bliss/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_categories/package-version.txt b/build/pkgs/sagemath_categories/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_categories/package-version.txt +++ b/build/pkgs/sagemath_categories/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_coxeter3/package-version.txt b/build/pkgs/sagemath_coxeter3/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_coxeter3/package-version.txt +++ b/build/pkgs/sagemath_coxeter3/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_environment/package-version.txt b/build/pkgs/sagemath_environment/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_environment/package-version.txt +++ b/build/pkgs/sagemath_environment/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_mcqd/package-version.txt b/build/pkgs/sagemath_mcqd/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_mcqd/package-version.txt +++ b/build/pkgs/sagemath_mcqd/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_meataxe/package-version.txt b/build/pkgs/sagemath_meataxe/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_meataxe/package-version.txt +++ b/build/pkgs/sagemath_meataxe/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_objects/package-version.txt b/build/pkgs/sagemath_objects/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_objects/package-version.txt +++ b/build/pkgs/sagemath_objects/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_repl/package-version.txt b/build/pkgs/sagemath_repl/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_repl/package-version.txt +++ b/build/pkgs/sagemath_repl/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_sirocco/package-version.txt b/build/pkgs/sagemath_sirocco/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_sirocco/package-version.txt +++ b/build/pkgs/sagemath_sirocco/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_tdlib/package-version.txt b/build/pkgs/sagemath_tdlib/package-version.txt index 1c46c402fb7..c4fcb84c1a7 120000 --- a/build/pkgs/sagemath_tdlib/package-version.txt +++ b/build/pkgs/sagemath_tdlib/package-version.txt @@ -1 +1 @@ -../../../VERSION.txt +../../../VERSION.txt \ No newline at end of file diff --git a/configure.ac b/configure.ac index 1bf79ed7333..329a08f742f 100644 --- a/configure.ac +++ b/configure.ac @@ -431,7 +431,7 @@ AS_IF([test "x$enable_download_from_upstream_url" = "xyes"], [ ]) AC_SUBST([SAGE_SPKG_OPTIONS]) -AC_ARG_ENABLE([sagelib], +AC_ARG_ENABLE([sage_conf], AS_HELP_STRING([--disable-sage_conf], [disable build of the sage_conf package]), [ for pkg in sage_conf; do From b3825842fcf95313ee842dbf3a164fa2e6791cb8 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 2 Dec 2024 10:37:58 -0600 Subject: [PATCH 18/66] fix indentation --- src/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index e746a8d162b..a83bb81a0ce 100644 --- a/src/meson.build +++ b/src/meson.build @@ -69,9 +69,9 @@ os.chdir("..") import cypari2 incdir = cypari2.__file__.replace('__init__.py', '') try: -incdir = print(os.path.relpath(incdir)) + incdir = print(os.path.relpath(incdir)) except Exception: -incdir = print(incdir) + incdir = print(incdir) '''.strip(), ], check: true, From e9bb4b85dcba3d2ce6bb8af2394268513c8637d6 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 2 Dec 2024 11:54:15 -0600 Subject: [PATCH 19/66] remove a stray (?) `cd ..` --- src/meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index a83bb81a0ce..038ee262cf3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -65,7 +65,6 @@ inc_cypari2 = run_command( [ '-c', '''import os -os.chdir("..") import cypari2 incdir = cypari2.__file__.replace('__init__.py', '') try: From 7a24b8d0aa30482de824b56876d49f3aa55a6cb0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 3 Dec 2024 11:31:51 +0800 Subject: [PATCH 20/66] Replace inc_numpy by numpy dependency in meson --- src/meson.build | 8 ++++---- src/sage/algebras/fusion_rings/meson.build | 8 ++++---- src/sage/calculus/meson.build | 3 +-- src/sage/matrix/meson.build | 5 ++--- src/sage/modules/meson.build | 20 ++++---------------- src/sage/plot/meson.build | 4 ++-- src/sage/plot/plot3d/meson.build | 4 ++-- src/sage/rings/polynomial/meson.build | 5 ++--- src/sage/schemes/elliptic_curves/meson.build | 4 ++-- src/sage/stats/meson.build | 4 ++-- 10 files changed, 25 insertions(+), 40 deletions(-) diff --git a/src/meson.build b/src/meson.build index e746a8d162b..dd722970102 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,7 +8,8 @@ numpy_dep = dependency('numpy', required: false) if not numpy_dep.found() # Older versions of numpy don't have a pkg-config file # Try to use relative path in case it is installed in a venv in the same directory - inc_numpy = run_command(py, + inc_numpy = run_command( + py, [ '-c', '''import os @@ -18,9 +19,8 @@ try: incdir = print(os.path.relpath(incdir)) except Exception: incdir = print(incdir) -''' - ], - check: true +'''], + check: true, ).stdout().strip() numpy = declare_dependency(include_directories: inc_numpy) endif diff --git a/src/sage/algebras/fusion_rings/meson.build b/src/sage/algebras/fusion_rings/meson.build index 281460a066a..d2632dfb751 100644 --- a/src/sage/algebras/fusion_rings/meson.build +++ b/src/sage/algebras/fusion_rings/meson.build @@ -22,8 +22,8 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/algebras/fusion_rings', install: true, - include_directories: [inc_cpython, inc_ntl, inc_numpy, inc_rings], - dependencies: [py_dep, cysignals, gmp], + include_directories: [inc_cpython, inc_ntl, inc_rings], + dependencies: [py_dep, cysignals, gmp, numpy], ) endforeach @@ -40,8 +40,8 @@ foreach name, pyx : extension_data_cpp subdir: 'sage/algebras/fusion_rings', install: true, override_options: ['cython_language=cpp'], - include_directories: [inc_cpython, inc_ntl, inc_numpy, inc_rings], - dependencies: [py_dep, cysignals, gmp, singular], + include_directories: [inc_cpython, inc_ntl, inc_rings], + dependencies: [py_dep, cysignals, gmp, numpy, singular], ) endforeach diff --git a/src/sage/calculus/meson.build b/src/sage/calculus/meson.build index 541d7d86d75..b890e46d72c 100644 --- a/src/sage/calculus/meson.build +++ b/src/sage/calculus/meson.build @@ -29,8 +29,7 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/calculus', install: true, - include_directories: [inc_numpy], - dependencies: [py_dep, cysignals, gmp, gsl, interpreters_dep], + dependencies: [py_dep, cysignals, gmp, gsl, interpreters_dep, numpy], ) endforeach diff --git a/src/sage/matrix/meson.build b/src/sage/matrix/meson.build index 932ac4c40c2..62c084be96f 100644 --- a/src/sage/matrix/meson.build +++ b/src/sage/matrix/meson.build @@ -96,7 +96,7 @@ extension_data = { } foreach name, pyx : extension_data - dependencies = [py_dep, cysignals, gmp] + dependencies = [py_dep, cysignals, gmp, numpy] if name == 'matrix_gfpn_dense' dependencies += [mtx, meataxe] elif name == 'matrix_gap' @@ -119,7 +119,6 @@ foreach name, pyx : extension_data inc_ext, inc_flint, inc_ntl, - inc_numpy, inc_rings, inc_rings_finite, ], @@ -152,7 +151,6 @@ foreach name, pyx : extension_data_cpp inc_ext, inc_flint, inc_ntl, - inc_numpy, inc_rings, inc_rings_finite, ], @@ -175,6 +173,7 @@ foreach name, pyx : extension_data_cpp mpfi, mpfr, ntl, + numpy, pari, png, singular, diff --git a/src/sage/modules/meson.build b/src/sage/modules/meson.build index bc505da9372..bcdee20a2c9 100644 --- a/src/sage/modules/meson.build +++ b/src/sage/modules/meson.build @@ -65,14 +65,8 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/modules', install: true, - include_directories: [ - inc_cpython, - inc_ext, - inc_numpy, - inc_rings, - inc_rings_finite, - ], - dependencies: [py_dep, cysignals, gd, gmp, m4ri, png], + include_directories: [inc_cpython, inc_ext, inc_rings, inc_rings_finite], + dependencies: [py_dep, cysignals, gd, gmp, m4ri, numpy, png], ) endforeach @@ -85,14 +79,8 @@ foreach name, pyx : extension_data_cpp subdir: 'sage/modules', install: true, override_options: ['cython_language=cpp'], - include_directories: [ - inc_cpython, - inc_ext, - inc_numpy, - inc_rings, - inc_rings_finite, - ], - dependencies: [py_dep, cysignals, gd, gmp, m4ri, png], + include_directories: [inc_cpython, inc_ext, inc_rings, inc_rings_finite], + dependencies: [py_dep, cysignals, gd, gmp, m4ri, numpy, png], ) endforeach diff --git a/src/sage/plot/meson.build b/src/sage/plot/meson.build index 96a337faf78..ea002abb13a 100644 --- a/src/sage/plot/meson.build +++ b/src/sage/plot/meson.build @@ -40,8 +40,8 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/plot', install: true, - include_directories: [inc_cpython, inc_gsl, inc_numpy, inc_rings], - dependencies: [py_dep, cysignals, gmp, gsl], + include_directories: [inc_cpython, inc_gsl, inc_rings], + dependencies: [py_dep, cysignals, gmp, gsl, numpy], ) endforeach diff --git a/src/sage/plot/plot3d/meson.build b/src/sage/plot/plot3d/meson.build index 46cc4a25ffc..eaa4bf4fff5 100644 --- a/src/sage/plot/plot3d/meson.build +++ b/src/sage/plot/plot3d/meson.build @@ -30,7 +30,7 @@ extension_data = { } foreach name, pyx : extension_data - dependencies = [py_dep, cysignals, gmp] + dependencies = [py_dep, cysignals, gmp, numpy] if name == 'parametric_surface' dependencies += [interpreters_dep] endif @@ -39,7 +39,7 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/plot/plot3d', install: true, - include_directories: [inc_cpython, inc_ext, inc_numpy], + include_directories: [inc_cpython, inc_ext], dependencies: dependencies, ) endforeach diff --git a/src/sage/rings/polynomial/meson.build b/src/sage/rings/polynomial/meson.build index 94a0a0c8b9a..123b474a328 100644 --- a/src/sage/rings/polynomial/meson.build +++ b/src/sage/rings/polynomial/meson.build @@ -92,7 +92,7 @@ extension_data = { } foreach name, pyx : extension_data - deps = [py_dep, cysignals, gmp] + deps = [py_dep, cysignals, gmp, numpy] if name == 'evaluation_flint' deps += [flint, mpfi] elif name == 'polynomial_complex_arb' @@ -115,7 +115,6 @@ foreach name, pyx : extension_data inc_ext, inc_flint, inc_ntl, - inc_numpy, inc_rings, inc_rings_finite, ], @@ -151,7 +150,6 @@ foreach name, pyx : extension_data_cpp inc_ext, inc_flint, inc_ntl, - inc_numpy, inc_rings, inc_rings_finite, ], @@ -165,6 +163,7 @@ foreach name, pyx : extension_data_cpp mpfi, mpfr, ntl, + numpy, pari, singular, ], diff --git a/src/sage/schemes/elliptic_curves/meson.build b/src/sage/schemes/elliptic_curves/meson.build index 3448c5d1c0a..1741e3f2f24 100644 --- a/src/sage/schemes/elliptic_curves/meson.build +++ b/src/sage/schemes/elliptic_curves/meson.build @@ -64,8 +64,8 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/schemes/elliptic_curves', install: true, - include_directories: [inc_cpython, inc_flint, inc_numpy, inc_rings], - dependencies: [py_dep, cypari2, cysignals, flint, gmp, mpfr, pari], + include_directories: [inc_cpython, inc_flint, inc_rings], + dependencies: [py_dep, cypari2, cysignals, flint, gmp, mpfr, numpy, pari], ) endforeach diff --git a/src/sage/stats/meson.build b/src/sage/stats/meson.build index 414a909270c..fb3479a0dcd 100644 --- a/src/sage/stats/meson.build +++ b/src/sage/stats/meson.build @@ -18,8 +18,8 @@ foreach name, pyx : extension_data sources: pyx, subdir: 'sage/stats', install: true, - include_directories: [inc_cpython, inc_numpy], - dependencies: [py_dep, cysignals, gmp], + include_directories: [inc_cpython], + dependencies: [py_dep, cysignals, gmp, numpy], ) endforeach From 19aa39773131393d81bad5b303ba6a865c225c94 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 4 Dec 2024 15:52:03 +0800 Subject: [PATCH 21/66] Fix numpy typo --- src/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index dccafcb1d82..5ec79e6527e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -4,8 +4,8 @@ cpp = meson.get_compiler('cpp') cython = meson.get_compiler('cython') # Setup dependencies that are needed by many modules -numpy_dep = dependency('numpy', required: false) -if not numpy_dep.found() +numpy = dependency('numpy', required: false) +if not numpy.found() # Older versions of numpy don't have a pkg-config file # Try to use relative path in case it is installed in a venv in the same directory inc_numpy = run_command( From 56f95c9d568fc6fcfc95cb38ca50de21ce9166ab Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 6 Dec 2024 16:29:04 +0800 Subject: [PATCH 22/66] Fix coyping of src in conftest --- m4/sage_check_python_for_venv.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/sage_check_python_for_venv.m4 b/m4/sage_check_python_for_venv.m4 index 363f08c1138..0af447c12c8 100644 --- a/m4/sage_check_python_for_venv.m4 +++ b/m4/sage_check_python_for_venv.m4 @@ -195,7 +195,7 @@ from $distutils_extension import Extension from sys import exit modules = list((Extension("config_check_distutils_cxx", list(("conftest.cpp",)), extra_compile_args=list(("-std=c++11",)), language="c++"),)) -setup(name="config_check_distutils_cxx", ext_modules=modules) +setup(name="config_check_distutils_cxx", ext_modules=modules, py_modules=["conftest"]) exit(0) EOF ]) From 48c8b4afae10b2b105e44b4e891b59dd588b4c05 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sat, 7 Dec 2024 23:02:18 -0600 Subject: [PATCH 23/66] allow ./sage to start; also, fix old error message --- build/pkgs/sagelib/spkg-install.in | 3 +++ src/bin/sage | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index e30d98be264..c3fb127d3cf 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -70,3 +70,6 @@ python3 -c 'import pathlib; from sage.misc.lazy_import_cache import get_cache_fi # Issue #33103: The temp.* directories are large after a full build. # We remove them to save space; they are not needed for fast rebuilds. rm -rf build/temp.* + +# indicate that we are done - is needed to allow ./sage to start +touch $SAGE_VENV/bin/sage diff --git a/src/bin/sage b/src/bin/sage index d102056b6c6..5ef7c183fed 100755 --- a/src/bin/sage +++ b/src/bin/sage @@ -165,7 +165,6 @@ if [ -x "${SELF}-config" ]; then fi if [ -f "${SELF}-src-env-config" ]; then # Not installed script, present only in src/bin/ - SAGE_SRC_ENV_CONFIG=1 . "${SELF}-src-env-config" >&2 fi if [ -z "$SAGE_VENV" -a -x "${SELF}-venv-config" ]; then @@ -294,8 +293,8 @@ sage_setup() { echo >&2 'It seems that you are attempting to run Sage from an unpacked source' echo >&2 'tarball, but you have not compiled it yet (or maybe the build has not' echo >&2 'finished). You should run `make` in the SAGE_ROOT directory first.' - echo >&2 'If you did not intend to build Sage from source, you should download' - echo >&2 'a binary tarball instead. Read README.txt for more information.' + echo >&2 'If you did not intend to build Sage from source, you should read' + echo >&2 'README.md for more information on available installation methods.' echo >&2 '************************************************************************' exit 1 fi From cf2be9d379baf2cdc1eae40d565f75c74a74dc45 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 9 Dec 2024 17:34:12 -0600 Subject: [PATCH 24/66] fixing cythonisation in doctests --- src/sage/misc/cython.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py index 95491a5c623..64438e9e8a1 100644 --- a/src/sage/misc/cython.py +++ b/src/sage/misc/cython.py @@ -26,7 +26,7 @@ import shutil from sage.env import (SAGE_LOCAL, cython_aliases, - sage_include_directories) + sage_include_directories, SAGE_SRC) from sage.misc.temporary_file import spyx_tmp, tmp_filename from sage.repl.user_globals import get_globals from sage.misc.sage_ostools import restore_cwd, redirection @@ -58,7 +58,7 @@ def _standard_libs_libdirs_incdirs_aliases(): if SAGE_LOCAL: standard_libdirs.append(os.path.join(SAGE_LOCAL, "lib")) standard_libdirs.extend(aliases["CBLAS_LIBDIR"] + aliases["NTL_LIBDIR"]) - standard_incdirs = sage_include_directories() + aliases["CBLAS_INCDIR"] + aliases["NTL_INCDIR"] + standard_incdirs = sage_include_directories() + [SAGE_SRC] + aliases["CBLAS_INCDIR"] + aliases["NTL_INCDIR"] return standard_libs, standard_libdirs, standard_incdirs, aliases ################################################################ From 4a3fb3c6ccf20e36b9a8598c5196f188f8f5b6fa Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Tue, 10 Dec 2024 13:47:59 -0600 Subject: [PATCH 25/66] don't ADD removed files --- .ci/write-dockerfile.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 9c9ac9b4e0e..3520716aea8 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -280,7 +280,6 @@ $ADD config/config.rpath /new/config/config.rpath $ADD src/doc/bootstrap /new/src/doc/bootstrap $ADD src/meson.build /new/src/ $ADD src/bin /new/src/bin -$ADD src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/ $ADD m4 /new/m4 $ADD pkgs /new/pkgs $ADD build /new/build From e1167ee7eb79a959d003b54329b34571568ce586 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 13 Dec 2024 09:47:45 -0600 Subject: [PATCH 26/66] remove no longer relevant test --- src/sage/misc/cython.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py index 64438e9e8a1..274b4171b49 100644 --- a/src/sage/misc/cython.py +++ b/src/sage/misc/cython.py @@ -226,17 +226,6 @@ def cython(filename, verbose=0, compile_message=False, ....: from sage.misc.cachefunc cimport cache_key ....: ''') - In Cython 0.29.33 using `from PACKAGE cimport MODULE` is broken - when `PACKAGE` is a namespace package, see :issue:`35322`:: - - sage: cython(''' - ....: from sage.misc cimport cachefunc - ....: ''') - Traceback (most recent call last): - ... - RuntimeError: Error compiling Cython file: - ... - ...: 'sage/misc.pxd' not found """ if not filename.endswith('pyx'): print("Warning: file (={}) should have extension .pyx".format(filename), file=sys.stderr) From 058b8b533fb36dddc331b68b9927ea9f1dcdd2e7 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 13 Dec 2024 21:32:59 -0600 Subject: [PATCH 27/66] wrong tags for combinat/designs nothing to do with sage.schemes --- src/sage/combinat/designs/designs_pyx.pyx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/sage/combinat/designs/designs_pyx.pyx b/src/sage/combinat/designs/designs_pyx.pyx index 790111d4326..a01cf5668e1 100644 --- a/src/sage/combinat/designs/designs_pyx.pyx +++ b/src/sage/combinat/designs/designs_pyx.pyx @@ -231,7 +231,6 @@ def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology='O EXAMPLES:: - sage: # needs sage.schemes sage: from sage.combinat.designs.designs_pyx import is_orthogonal_array sage: OA = designs.orthogonal_arrays.build(8,9) sage: is_orthogonal_array(OA,8,9) @@ -250,7 +249,6 @@ def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology='O TESTS:: - sage: # needs sage.schemes sage: is_orthogonal_array(OA,8,9, t=3) Traceback (most recent call last): ... @@ -274,7 +272,7 @@ def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology='O sage: from itertools import product sage: n = 0 - sage: for a in product(product((0,1), repeat=3), repeat=4): # needs sage.schemes + sage: for a in product(product((0,1), repeat=3), repeat=4): ....: if is_orthogonal_array(a,3,2): ....: n += 1 sage: n @@ -412,7 +410,6 @@ def is_group_divisible_design(groups, blocks, v, G=None, K=None, lambd=1, verbos a block has size 2 while K=[1] False - sage: # needs sage.schemes sage: p = designs.projective_plane(3) sage: is_group_divisible_design(None, p.blocks(), 13) (True, [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]]) @@ -614,12 +611,11 @@ def is_projective_plane(blocks, verbose=False): EXAMPLES:: sage: from sage.combinat.designs.designs_pyx import is_projective_plane - sage: p = designs.projective_plane(4) # needs sage.schemes - sage: b = p.blocks() # needs sage.schemes - sage: is_projective_plane(b, verbose=True) # needs sage.schemes + sage: p = designs.projective_plane(4) + sage: b = p.blocks() + sage: is_projective_plane(b, verbose=True) True - sage: # needs sage.schemes sage: p = designs.projective_plane(2) sage: b = p.blocks() sage: is_projective_plane(b) @@ -637,7 +633,6 @@ def is_projective_plane(blocks, verbose=False): First block has less than 3 points. False - sage: # needs sage.schemes sage: p = designs.projective_plane(2) sage: b = p.blocks() sage: b[2].append(4) From e81756ceb4ca139d3cd97964d27a200eac085564 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 24 Jun 2025 22:08:05 +0200 Subject: [PATCH 28/66] Improve path handling --- build/pkgs/sagelib/spkg-install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index c3fb127d3cf..8d9b5a07ecc 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -1,7 +1,7 @@ if [ "$SAGE_EDITABLE" = yes ]; then - cd $SAGE_ROOT + cd "$SAGE_ROOT" else - cd $SAGE_ROOT + cd "$SAGE_ROOT" # Issue #34181: Do not allow scripts with shebang lines from old # venvs leak into new venvs. (Changes only seem to be necessary # for non-editable builds.) From ccfe52fe166d506a2cd4e136346ddd3500a00fa1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 24 Jun 2025 22:44:20 +0200 Subject: [PATCH 29/66] Remove references to removed files --- Makefile | 2 -- bootstrap | 8 +++----- build/bin/sage-get-system-packages | 16 ++++++++-------- m4/sage_python_package_check.m4 | 4 ++-- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 095cb00c259..c192314f5ac 100644 --- a/Makefile +++ b/Makefile @@ -175,8 +175,6 @@ bootstrap-clean: rm -f src/doc/en/installation/*.txt find src/doc/en/reference/spkg -maxdepth 1 -name index.rst -prune -o -name "*.rst" -exec rm -f {} \+ for a in environment environment-optional src/environment src/environment-optional; do rm -f $$a.yml $$a-3.[89].yml $$a-3.1[0-9].yml; done - rm -f src/requirements.txt - rm -f src/setup.cfg rm -f build/pkgs/cypari/version_requirements.txt rm -f build/pkgs/cysignals/version_requirements.txt rm -f build/pkgs/cython/version_requirements.txt diff --git a/bootstrap b/bootstrap index 77a5cde41ed..fb5677e3a8c 100755 --- a/bootstrap +++ b/bootstrap @@ -39,7 +39,7 @@ bootstrap () { if [ "${BOOTSTRAP_QUIET}" = "no" ]; then echo "bootstrap:$LINENO: installing '"$target"'" fi - echo "# Generated by SAGE_ROOT/bootstrap based on src/pyproject.toml; do not edit directly" > $target + echo "# Generated by SAGE_ROOT/bootstrap based on pyproject.toml; do not edit directly" > $target sage-get-system-packages install-requires ${pkgname} >> $target done for a in m4/sage_spkg_configures.m4 m4/sage_spkg_versions.m4 m4/sage_spkg_versions_toml.m4; do @@ -228,16 +228,14 @@ save () { src/doc/en/installation/*.txt \ $(find src/doc/en/reference/spkg -maxdepth 1 -name index.rst -prune -o -name "*.rst" -print) \ environment-3.1[0-9]-*.yml \ - src/pyproject.toml \ - src/requirements.txt \ - src/setup.cfg \ + pyproject.toml \ build/pkgs/cypari/version_requirements.txt \ build/pkgs/cysignals/version_requirements.txt \ build/pkgs/cython/version_requirements.txt \ build/pkgs/gmpy2/version_requirements.txt \ build/pkgs/jupyter_core/version_requirements.txt \ build/pkgs/memory_allocator/version_requirements.txt \ - build/pkgs/meson/version_requirements.txt \ + build/pkgs/meson/version_requirements.txt \ build/pkgs/numpy/version_requirements.txt \ build/pkgs/pkgconfig/version_requirements.txt \ build/pkgs/pplpy/version_requirements.txt \ diff --git a/build/bin/sage-get-system-packages b/build/bin/sage-get-system-packages index f28e0356375..889badc93ab 100755 --- a/build/bin/sage-get-system-packages +++ b/build/bin/sage-get-system-packages @@ -14,29 +14,29 @@ fi case "$SYSTEM" in install-requires) - # Collect from src/pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format + # Collect from pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format # needed by setup.cfg [options] install_requires= - SYSTEM_PACKAGES_FILE_NAMES="src/pyproject.toml version_requirements.txt requirements.txt" + SYSTEM_PACKAGES_FILE_NAMES="pyproject.toml version_requirements.txt requirements.txt" # also normalizes quotes from "" to ''. STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;s/\"/'/g;" COLLECT= ;; install-requires-toml) - # Collect from src/pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format + # Collect from pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format # needed by pyproject.toml [build-system] requires= - SYSTEM_PACKAGES_FILE_NAMES="src/pyproject.toml version_requirements.txt requirements.txt" + SYSTEM_PACKAGES_FILE_NAMES="pyproject.toml version_requirements.txt requirements.txt" # also normalizes quotes from '' to "". STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;s/'/\"/g;s/^/'/;s/$/',/;" COLLECT= ;; pip) - SYSTEM_PACKAGES_FILE_NAMES="requirements.txt src/pyproject.toml version_requirements.txt" + SYSTEM_PACKAGES_FILE_NAMES="requirements.txt pyproject.toml version_requirements.txt" STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;' COLLECT=echo ;; versions) # For use in sage-spkg-info - SYSTEM_PACKAGES_FILE_NAMES="package-version.txt requirements.txt src/pyproject.toml version_requirements.txt" + SYSTEM_PACKAGES_FILE_NAMES="package-version.txt requirements.txt pyproject.toml version_requirements.txt" strip_comments () { TEXT=$(sed "s/#.*//;/^[[:space:]]*$/d;s/\"/'/g;s/^/ /;" "$@") if [ -n "$(echo $TEXT)" ]; then @@ -101,9 +101,9 @@ for PKG_BASE in $SPKGS; do *pyproject.toml) SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/$NAME if [ -f "$SYSTEM_PACKAGES_FILE" ]; then - # Extract from the "requires" block in src/pyproject.toml + # Extract from the "requires" block in pyproject.toml # Packages are in the format "'sage-conf ~= 10.3b3'," - PACKAGE_INFO=$(sed -n '/requires *= *\[/,/^\]/s/^ *'\''\('$PKG_BASE'.*\)'\'',/\1/p' "$SAGE_ROOT/src/pyproject.toml") + PACKAGE_INFO=$(sed -n '/requires *= *\[/,/^\]/s/^ *'\''\('$PKG_BASE'.*\)'\'',/\1/p' "$SAGE_ROOT/pyproject.toml") if [ -n "$PACKAGE_INFO" ]; then echo "$PACKAGE_INFO" | ${STRIP_COMMENTS} [ $SYSTEM = versions ] || break diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4 index 921639e3735..fcb06553dad 100644 --- a/m4/sage_python_package_check.m4 +++ b/m4/sage_python_package_check.m4 @@ -8,7 +8,7 @@ # Determine if the system copy of a python package can be used by sage. # # This macro uses setuptools.version's pkg_resources to check that the -# "version_requirements.txt" file (or entry in "src/pyproject.toml") for +# "version_requirements.txt" file (or entry in "pyproject.toml") for # the named package is satisfied, and it can typically fail in four ways: # # 1. If --enable-system-site-packages was not passed to ./configure, @@ -20,7 +20,7 @@ # 4. If setuptools is not available to the system python, # # 5. If the contents of version_requirements.txt (or entry in -# "src/pyproject.toml") are not met (wrong version, no version, +# "pyproject.toml") are not met (wrong version, no version, # etc.) by the system python. # # In any of those cases, we set sage_spkg_install_$package to "yes" From 4bf81740bdecef3cc03e550b856de341e5838ecd Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 24 Jun 2025 22:48:28 +0200 Subject: [PATCH 30/66] update version txt --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 1dcdedc09c3..1c91d96111b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.7.beta6, Release Date: 2025-06-14 +10.7.beta6 From a838d158213af737e730b7d3a7ee0029b7c75456 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 24 Jun 2025 22:48:48 +0200 Subject: [PATCH 31/66] Fallback to pwd in case sage_root is not set --- tools/update-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/update-version b/tools/update-version index 5b3b47a2ef6..3158e505e25 100755 --- a/tools/update-version +++ b/tools/update-version @@ -22,7 +22,7 @@ if [ $# -ne 1 ]; then fi if [ -z "$SAGE_ROOT" ]; then - die "must be run from within a Sage environment, or with SAGE_ROOT provided" + SAGE_ROOT="$(pwd)" fi if [ -z "$SAGE_SRC" ]; then From fb2a313b30d4728a8a5a47e2a8f8d0d8e3ae9ff0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 26 Jun 2025 14:47:29 +0200 Subject: [PATCH 32/66] Remove deleted files from gitignore --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9533c36b731..c09e05ad5ed 100644 --- a/.gitignore +++ b/.gitignore @@ -52,8 +52,6 @@ /src/environment-optional-3.10.yml /src/environment-optional-3.11.yml -/src/setup.cfg -/src/requirements.txt # Various editors *~ From 45de0090e9badb0480cac6df3890704690aa4b39 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 26 Jun 2025 18:39:19 -0500 Subject: [PATCH 33/66] fix make distclean to not error out on cd --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c192314f5ac..52f80bf9bed 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ sagelib-clean: rm -rf build; find . -name '*.pyc' -o -name "*.so" | xargs rm -f; \ rm -f $$(find . -name "*.pyx" | sed 's/\(.*\)[.]pyx$$/\1.c \1.cpp/'); \ cd sage/ext/interpreters/ && rm -f *.so *.c *.h *.py* *.pxd) \ - && (cd "$(SAGE_ROOT)/build/pkgs/sagelib/src/" && rm -rf build); \ + && rm -rf "$(SAGE_ROOT)"/build/pkgs/sagelib/src/build; \ fi sage_docbuild-clean: From 1c119e88d565dc2f1192744bc73ea6fde3485ea6 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 28 Jun 2025 11:42:37 +0200 Subject: [PATCH 34/66] Compile `matrix_gf2e_dense` with `c++11` std --- src/sage/matrix/meson.build | 57 ++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/sage/matrix/meson.build b/src/sage/matrix/meson.build index ead32fdfae9..9cd39939c55 100644 --- a/src/sage/matrix/meson.build +++ b/src/sage/matrix/meson.build @@ -143,16 +143,45 @@ extension_data_cpp = { foreach name, pyx : extension_data_cpp override_options = ['cython_language=cpp'] if name in [ + 'matrix_gf2e_dense', 'matrix_integer_dense', 'matrix_integer_sparse', 'matrix_modn_dense_float', 'matrix_modn_dense_double', 'matrix_modn_sparse', ] - # Temporary workaround for https://github.com/linbox-team/linbox/issues/306 + # Temporary workaround for https://github.com/linbox-team/linbox/issues/306 and https://github.com/malb/m4rie/pull/6 override_options += ['cpp_std=c++11'] endif + deps = [ + py_dep, + blas, + cypari2, + cysignals, + fflas, + flint, + gd, + givaro, + gmp, + gmpxx, + iml, + linbox, + m, + m4ri, + mpfi, + mpfr, + ntl, + numpy, + pari, + png, + singular, + zlib, + ] + if name == 'matrix_gf2e_dense' + deps += [m4rie] + endif + py.extension_module( name, sources: pyx, @@ -167,31 +196,7 @@ foreach name, pyx : extension_data_cpp inc_rings, inc_rings_finite, ], - dependencies: [ - py_dep, - blas, - cypari2, - cysignals, - fflas, - flint, - gd, - givaro, - gmp, - gmpxx, - iml, - linbox, - m, - m4ri, - m4rie, - mpfi, - mpfr, - ntl, - numpy, - pari, - png, - singular, - zlib, - ], + dependencies: deps, ) endforeach From f398cb26b86197a2d2bab283bf50135243d87ff0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 28 Jun 2025 11:49:43 +0200 Subject: [PATCH 35/66] Cleanup meson build directory in `sagelib-clean` --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 52f80bf9bed..50579fc4900 100644 --- a/Makefile +++ b/Makefile @@ -113,8 +113,7 @@ clean: fi # "c_lib", ".cython_version", "build" in $(SAGE_SRC) are from old sage versions -# Cleaning .so files (and .c and .cpp files associated with .pyx files) is for editable installs. -# Also cython_debug is for editable installs. +# Cleaning .so files (and .c and .cpp files associated with .pyx files), cython_debug and "sagelib/src/build" is for old editable installs. sagelib-clean: @echo "Deleting Sage library build artifacts..." if [ -d "$(SAGE_SRC)" ]; then \ @@ -125,6 +124,12 @@ sagelib-clean: cd sage/ext/interpreters/ && rm -f *.so *.c *.h *.py* *.pxd) \ && rm -rf "$(SAGE_ROOT)"/build/pkgs/sagelib/src/build; \ fi + @echo "Wiping meson build directories..." + @for d in "$(SAGE_ROOT)"/build/cp[0-9]*; do \ + if [ -d "$$d" ]; then \ + meson setup --wipe "$$d"; \ + fi; \ + done sage_docbuild-clean: (cd "$(SAGE_ROOT)/build/pkgs/sage_docbuild/src" && rm -rf build) From 3a956e41b34caf9f4b217a6e806e7119b072976a Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 29 Jun 2025 09:19:09 +0200 Subject: [PATCH 36/66] Compile `matrix_gf2e_dense` via C and not C++ Co-authored-by: Dima Pasechnik --- src/sage/libs/m4ri.pxd | 3 --- src/sage/matrix/meson.build | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/sage/libs/m4ri.pxd b/src/sage/libs/m4ri.pxd index 1306b72a74c..01526183972 100644 --- a/src/sage/libs/m4ri.pxd +++ b/src/sage/libs/m4ri.pxd @@ -1,6 +1,3 @@ -# distutils: extra_compile_args = -std=c++11 -# distutils: language = c++ - cdef extern from "m4ri/m4ri.h": ctypedef int rci_t ctypedef int wi_t diff --git a/src/sage/matrix/meson.build b/src/sage/matrix/meson.build index 9cd39939c55..d3862d6e4fa 100644 --- a/src/sage/matrix/meson.build +++ b/src/sage/matrix/meson.build @@ -78,6 +78,7 @@ extension_data = { 'matrix_generic_dense' : files('matrix_generic_dense.pyx'), 'matrix_generic_sparse' : files('matrix_generic_sparse.pyx'), 'matrix_gfpn_dense' : files('matrix_gfpn_dense.pyx'), + 'matrix_gf2e_dense': files('matrix_gf2e_dense.pyx'), 'matrix_laurent_mpolynomial_dense' : files( 'matrix_laurent_mpolynomial_dense.pyx', ), @@ -108,6 +109,8 @@ foreach name, pyx : extension_data deps += [flint, mpfi] elif name == 'misc_flint' or name == 'matrix_rational_sparse' or name == 'change_ring' deps += [flint] + elif name == 'matrix_gf2e_dense' + deps += [m4rie] endif py.extension_module( @@ -129,7 +132,6 @@ endforeach extension_data_cpp = { 'matrix_cyclo_dense': files('matrix_cyclo_dense.pyx'), - 'matrix_gf2e_dense': files('matrix_gf2e_dense.pyx'), 'matrix_integer_dense': files('matrix_integer_dense.pyx'), 'matrix_integer_sparse': files('matrix_integer_sparse.pyx'), 'matrix_mod2_dense': files('matrix_mod2_dense.pyx'), @@ -143,7 +145,6 @@ extension_data_cpp = { foreach name, pyx : extension_data_cpp override_options = ['cython_language=cpp'] if name in [ - 'matrix_gf2e_dense', 'matrix_integer_dense', 'matrix_integer_sparse', 'matrix_modn_dense_float', @@ -178,9 +179,6 @@ foreach name, pyx : extension_data_cpp singular, zlib, ] - if name == 'matrix_gf2e_dense' - deps += [m4rie] - endif py.extension_module( name, From 13176c1634b9d00d38e94c3dbb7a1cb52e632a4d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 1 Jul 2025 13:44:41 +0200 Subject: [PATCH 37/66] Replace meson setup --wipe with rm -rf for cleaning build directories --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50579fc4900..288f72098ef 100644 --- a/Makefile +++ b/Makefile @@ -124,10 +124,11 @@ sagelib-clean: cd sage/ext/interpreters/ && rm -f *.so *.c *.h *.py* *.pxd) \ && rm -rf "$(SAGE_ROOT)"/build/pkgs/sagelib/src/build; \ fi +# Don't use "meson setup --wipe "$$d";" due to https://github.com/sagemath/sage/pull/39030#issuecomment-3021583924 @echo "Wiping meson build directories..." @for d in "$(SAGE_ROOT)"/build/cp[0-9]*; do \ if [ -d "$$d" ]; then \ - meson setup --wipe "$$d"; \ + rm -rf "$$d" fi; \ done From 98be634bb6769646456755bc88b048ed462dc847 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 1 Jul 2025 23:47:08 +0200 Subject: [PATCH 38/66] Replace `sage --python` by `python3` --- src/doc/Makefile | 4 ++-- src/sage/repl/ipython_kernel/install.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/doc/Makefile b/src/doc/Makefile index 9c03292b070..bb19a0ce250 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -66,7 +66,7 @@ doc-html-other: doc-html-reference $(MAKE) $(foreach doc, $(wordlist 2, 100, $(DOCS)), doc-html--$(subst /,-,$(doc))) doc-html: doc-html-reference doc-html-other - SAGE_DOC=$$(sage --python -c "from sage.env import SAGE_DOC; print(SAGE_DOC)") + SAGE_DOC=$$(sage -c "from sage.env import SAGE_DOC; print(SAGE_DOC)") find $${SAGE_DOC}/html -type d -path "*/jupyter_execute" -exec rm -rf {} + # Matches doc-pdf--developer, doc-pdf--reference-manifolds etc. @@ -90,7 +90,7 @@ doc-pdf-other: doc-pdf-reference $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(wordlist 2, 100, $(DOCS)), doc-pdf--$(subst /,-,$(doc))) doc-pdf: doc-pdf-reference doc-pdf-other - SAGE_DOC=$$(sage --python -c "from sage.env import SAGE_DOC; print(SAGE_DOC)") + SAGE_DOC=$$(sage -c "from sage.env import SAGE_DOC; print(SAGE_DOC)") find $${SAGE_DOC}/latex -type d -path "*/jupyter_execute" -exec rm -rf {} + .PHONY: all clean \ diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py index 654b2a96f77..e6360d32392 100644 --- a/src/sage/repl/ipython_kernel/install.py +++ b/src/sage/repl/ipython_kernel/install.py @@ -148,16 +148,14 @@ def _kernel_cmd(self): sage: from sage.repl.ipython_kernel.install import SageKernelSpec sage: spec = SageKernelSpec(prefix=tmp_dir()) sage: spec._kernel_cmd() - ['/.../sage', - '--python', + ['python3', '-m', 'sage.repl.ipython_kernel', '-f', '{connection_file}'] """ return [ - os.path.join(SAGE_VENV, 'bin', 'sage'), - '--python', + 'python3', '-m', 'sage.repl.ipython_kernel', '-f', '{connection_file}', ] From 1ca7103df9c98b28cc26d6423f77ed7fbb4af4a9 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Wed, 2 Jul 2025 14:13:17 -0500 Subject: [PATCH 39/66] Makefile typo fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 288f72098ef..4c4791bcf9b 100644 --- a/Makefile +++ b/Makefile @@ -128,7 +128,7 @@ sagelib-clean: @echo "Wiping meson build directories..." @for d in "$(SAGE_ROOT)"/build/cp[0-9]*; do \ if [ -d "$$d" ]; then \ - rm -rf "$$d" + rm -rf "$$d"; \ fi; \ done From bb8a4bbab1a5b2aa36d9f6803b9625b8ee5d20f4 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 6 Jul 2025 15:14:10 +0200 Subject: [PATCH 40/66] Fix docbuild ci --- .github/workflows/doc-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 3be8b026cae..97c76b60ae4 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -230,7 +230,6 @@ jobs: export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev make doc-clean doc-uninstall ./config.status && make sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps - shell: sh .ci/docker-exec-script.sh BUILD /sage {0} - name: Copy live doc id: copylivedoc From 717a70e47b634ce506819853fb428afeca9b29a8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 6 Jul 2025 15:55:14 +0200 Subject: [PATCH 41/66] Migrate make doc targets to simply call meson --- build/pkgs/sagelib/spkg-install.in | 4 +- src/doc/Makefile | 80 ++---------------------------- 2 files changed, 6 insertions(+), 78 deletions(-) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index 8d9b5a07ecc..afad0f4992d 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -45,9 +45,7 @@ SITEPACKAGESDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["pur # does not shadow the namespace package sage during the build. (cd "$SITEPACKAGESDIR" && rm -f sage/__init__.py) if [ "$SAGE_EDITABLE" = yes ]; then - # Until https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels - export SETUPTOOLS_ENABLE_FEATURES=legacy-editable - sdh_pip_editable_install . + sdh_pip_editable_install . --config-settings=build-dir="build/sage-distro" if [ "$SAGE_WHEELS" = yes ]; then # Additionally build a wheel (for use in other venvs) diff --git a/src/doc/Makefile b/src/doc/Makefile index 1c7530e2c32..53cc6c2b3e4 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -3,8 +3,7 @@ # 'make doc-html' (synonym for 'make' and 'make all') builds the html documentation. # 'make doc-pdf' builds the PDF documentation. # -# The "sage" script must be in PATH, and the Sage library and the package sage_docbuild -# must be installed for these to work. +# The "sage" script must be in PATH, and the Sage library must be installed for these to work. # These commands are intended to be called by build/make/Makefile via # build/pkgs/sagemath_doc_{html,pdf}/spkg-install. # @@ -18,80 +17,11 @@ clean: rm -rf en/reference/sage rm -f common/*.pyc -# Sources generated at build time. (For sources generated at bootstrap time, see bootstrap.) -doc-src: - mkdir -p en/reference/repl - sage -advanced > en/reference/repl/options.txt +doc-html: + meson compile -C build/sage-distro doc-html -# Matches doc-inventory--reference-manifolds etc. -doc-inventory--%: - sage --docbuild --no-pdf-links $(subst -,/,$(subst doc-inventory--,,$@)) inventory $(SAGE_DOCBUILD_OPTS) - -# Matches doc-html--developer, doc-html--reference-manifolds etc. -doc-html--%: - sage --docbuild --no-pdf-links $(subst -,/,$(subst doc-html--,,$@)) html $(SAGE_DOCBUILD_OPTS) - -# reference manual, inventory -ifndef SAGE_ROOT -doc-inventory-reference: - $(error SAGE_ROOT undefined. This Makefile needs to be invoked by build/make/install) -else -doc-inventory-reference: doc-src - $(eval DOCS = $(shell sage --docbuild --all-documents reference)) - @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi - $(eval BIBLIO = $(firstword $(DOCS))) - $(eval OTHER_DOCS = $(filter-out reference_top, $(wordlist 2, 100, $(DOCS)))) - $(MAKE) doc-inventory--$(subst /,-,$(BIBLIO)) - $(MAKE) $(foreach doc, $(OTHER_DOCS), doc-inventory--$(subst /,-,$(doc))) - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-inventory--reference_top -endif - -# sub docs of reference manual, html -doc-html-reference-sub: doc-inventory-reference - $(eval DOCS = $(shell sage --docbuild --all-documents reference)) - @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi - $(eval BIBLIO = $(firstword $(DOCS))) - $(eval OTHER_DOCS = $(filter-out reference_top, $(wordlist 2, 100, $(DOCS)))) - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--$(subst /,-,$(BIBLIO)) - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(OTHER_DOCS), doc-html--$(subst /,-,$(doc))) - -# reference manual, html; reference_top is built after sub docs -doc-html-reference: doc-html-reference-sub - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--reference_top - -# other documentation, html -doc-html-other: doc-html-reference - $(eval DOCS = $(shell sage --docbuild --all-documents all)) - @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi - $(MAKE) $(foreach doc, $(DOCS), doc-html--$(subst /,-,$(doc))) - -doc-html: doc-html-reference doc-html-other - SAGE_DOC=$$(sage -c "from sage.env import SAGE_DOC; print(SAGE_DOC)") - find $${SAGE_DOC}/html -type d -path "*/jupyter_execute" -exec rm -rf {} + - -# Matches doc-pdf--developer, doc-pdf--reference-manifolds etc. -doc-pdf--%: - LATEXOPTS="--file-line-error --interaction=batchmode" sage --docbuild $(subst -,/,$(subst doc-pdf--,,$@)) pdf $(SAGE_DOCBUILD_OPTS) - -# reference manual, pdf -doc-pdf-reference: doc-inventory-reference - $(eval DOCS = $(shell sage --docbuild --all-documents reference)) - @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi - $(eval BIBLIO = $(firstword $(DOCS))) - $(eval OTHER_DOCS = $(filter-out reference_top, $(wordlist 2, 100, $(DOCS)))) - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--$(subst /,-,$(BIBLIO)) - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(OTHER_DOCS), doc-pdf--$(subst /,-,$(doc))) - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--reference_top - -# other documentation, pdf -doc-pdf-other: doc-pdf-reference - $(eval DOCS = $(shell sage --docbuild --all-documents all)) - @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi - $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(DOCS), doc-pdf--$(subst /,-,$(doc))) - -doc-pdf: doc-pdf-reference doc-pdf-other - SAGE_DOC=$$(sage -c "from sage.env import SAGE_DOC; print(SAGE_DOC)") - find $${SAGE_DOC}/latex -type d -path "*/jupyter_execute" -exec rm -rf {} + +doc-pdf: + meson compile -C build/sage-distro doc-pdf .PHONY: all clean \ doc-src \ From 69c0667d98c22050c7c3284ff5fb2f38fbe6b5dd Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 6 Jul 2025 17:52:03 +0200 Subject: [PATCH 42/66] Fix merge mistake --- .github/workflows/doc-build.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 97c76b60ae4..f986215b969 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -218,18 +218,12 @@ jobs: if: startsWith(github.ref, 'refs/tags/') shell: bash -l {0} run: | - # Avoid running out of disk space - rm -rf upstream - export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5 - export PATH="build/bin:$PATH" - eval $(sage-print-system-package-command auto update) - eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip) - eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy) - export SAGE_USE_CDNS=yes - export SAGE_LIVE_DOC=yes - export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev - make doc-clean doc-uninstall - ./config.status && make sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps + meson compile -C builddir doc-html + env: + SAGE_USE_CDNS: yes + SAGE_LIVE_DOC: yes + SAGE_JUPYTER_SERVER: binder:sagemath/sage-binder-env/dev + SAGE_DOCBUILD_OPTS: "--include-tests-blocks" - name: Copy live doc id: copylivedoc From 04f3025563b05a341e0b10fe0d05c3b7645f797f Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 6 Jul 2025 19:23:33 +0200 Subject: [PATCH 43/66] Fix path to meson build directory --- src/doc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/Makefile b/src/doc/Makefile index 53cc6c2b3e4..e6970d87c38 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -18,10 +18,10 @@ clean: rm -f common/*.pyc doc-html: - meson compile -C build/sage-distro doc-html + meson compile -C ../../build/sage-distro doc-html doc-pdf: - meson compile -C build/sage-distro doc-pdf + meson compile -C ../../build/sage-distro doc-pdf .PHONY: all clean \ doc-src \ From 6ed83ce307c96c6d518b404a317d25208f2943c3 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 7 Jul 2025 00:31:15 +0200 Subject: [PATCH 44/66] Only have interactive jupyter in docs for html --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index da9da0361ca..b60373f6658 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -1084,7 +1084,7 @@ def setup(app): app.add_transform(SagemathTransform) if SAGE_LIVE_DOC == 'yes' or SAGE_PREPARSED_DOC == 'yes': app.add_transform(SagecodeTransform) - if not JupyterSphinx().is_present(): + if not app.builder.tags.has('htmls') or not JupyterSphinx().is_present(): app.add_directive("jupyter-execute", Ignore) app.add_directive("jupyter-kernel", Ignore) app.add_directive("jupyter-input", Ignore) From 6b1e6ad6f333d5e3eeeedefa14f2d1a44e68dcdd Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 7 Jul 2025 01:41:48 +0200 Subject: [PATCH 45/66] Improve Jupyter directive handling in Sphinx setup --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index b60373f6658..17a37e1fa1f 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -1084,7 +1084,7 @@ def setup(app): app.add_transform(SagemathTransform) if SAGE_LIVE_DOC == 'yes' or SAGE_PREPARSED_DOC == 'yes': app.add_transform(SagecodeTransform) - if not app.builder.tags.has('htmls') or not JupyterSphinx().is_present(): + else: app.add_directive("jupyter-execute", Ignore) app.add_directive("jupyter-kernel", Ignore) app.add_directive("jupyter-input", Ignore) From feca12a88c1bec1af825aa2f32882296610dd5f9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 7 Jul 2025 10:14:35 +0200 Subject: [PATCH 46/66] Install jupyter kernel manually --- build/pkgs/sagelib/spkg-install.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index afad0f4992d..1f4e686ad9a 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -51,6 +51,10 @@ if [ "$SAGE_EDITABLE" = yes ]; then # Additionally build a wheel (for use in other venvs) cd $SAGE_PKGS/sagelib/src && time sdh_build_and_store_wheel --no-build-isolation . fi + + # Install jupyter kernelspecs + # (needed since in editable mode the kernel spec is not copied to the correct location in the meson build) + jupyter kernelspec install --name=sagemath --user build/sage-distro/src/sage else # Now implied: "$SAGE_WHEELS" = yes # We should remove the egg-link that may have been installed previously. From 730429efc29e6f7747d5241d7c4598a573ceb4ad Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 8 Jul 2025 10:49:46 +0200 Subject: [PATCH 47/66] Fix cleaning of build folder --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4c4791bcf9b..06a87e8f265 100644 --- a/Makefile +++ b/Makefile @@ -126,11 +126,7 @@ sagelib-clean: fi # Don't use "meson setup --wipe "$$d";" due to https://github.com/sagemath/sage/pull/39030#issuecomment-3021583924 @echo "Wiping meson build directories..." - @for d in "$(SAGE_ROOT)"/build/cp[0-9]*; do \ - if [ -d "$$d" ]; then \ - rm -rf "$$d"; \ - fi; \ - done + rm -rf "$(SAGE_ROOT)/build/sage-distro" sage_docbuild-clean: (cd "$(SAGE_ROOT)/build/pkgs/sage_docbuild/src" && rm -rf build) From 8363b7ee894da6f08c442fa9458fb6cbf7283343 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 21 Jul 2025 19:33:39 +0200 Subject: [PATCH 48/66] Pass SAGE_LOCAL to Meson --- build/pkgs/sagelib/spkg-install.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index 1f4e686ad9a..6bbea48fce6 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -29,10 +29,9 @@ export SAGE_DOC_SRC=/doesnotexist export SAGE_PKGCONFIG=/doesnotexist export SAGE_SHARE=/doesnotexist -# However, we only unset SAGE_LOCAL and SAGE_PKG_CONFIG_PATH. +# However, we only unset SAGE_PKG_CONFIG_PATH. # sage_setup.setenv receives them from sage_conf via sage.env; # the poisoned environment variables would override them. -unset SAGE_LOCAL unset SAGE_PKG_CONFIG_PATH # Issue #30903: We cannot poison SAGE_DOC because setup.py installs the Jupyter kernel @@ -45,7 +44,7 @@ SITEPACKAGESDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["pur # does not shadow the namespace package sage during the build. (cd "$SITEPACKAGESDIR" && rm -f sage/__init__.py) if [ "$SAGE_EDITABLE" = yes ]; then - sdh_pip_editable_install . --config-settings=build-dir="build/sage-distro" + sdh_pip_editable_install . --config-settings=build-dir="build/sage-distro" --config-settings=setup-args="-DSAGE_LOCAL=$SAGE_LOCAL" if [ "$SAGE_WHEELS" = yes ]; then # Additionally build a wheel (for use in other venvs) @@ -61,7 +60,7 @@ else (cd "$SITEPACKAGESDIR" && rm -f sagemath-standard.egg-link) # Use --no-build-isolation to avoid rebuilds because of dependencies: # Compiling sage/interfaces/sagespawn.pyx because it depends on /private/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gp/T/pip-build-env-609n5985/overlay/lib/python3.10/site-packages/Cython/Includes/posix/unistd.pxd - sdh_pip_install --no-build-isolation . + sdh_pip_install --no-build-isolation . --config-settings=setup-args="-DSAGE_LOCAL=$SAGE_LOCAL" fi # Remove (potentially invalid) star import caches. From 94eab2b1b40167e6737624011d9f04b9f696710a Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 24 Jul 2025 20:29:42 +0200 Subject: [PATCH 49/66] Add Flint to dependencies in Meson build configuration Co-authored-by: Risan --- src/sage/symbolic/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/symbolic/meson.build b/src/sage/symbolic/meson.build index 3d3bbc67afc..a9d4b0a35aa 100644 --- a/src/sage/symbolic/meson.build +++ b/src/sage/symbolic/meson.build @@ -125,7 +125,7 @@ foreach name, pyx : extension_data_cpp inc_rings, include_directories('../libs/gmp'), ], - dependencies: [py_dep, cysignals, gmp, gsl, singular_factory], + dependencies: [py_dep, cysignals, flint, gmp, gsl, singular_factory], ) endforeach From 6cfcd44f20158f09a1098187c144cacdbf450e44 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 3 Aug 2025 10:23:05 +0800 Subject: [PATCH 50/66] Update meson to 1.8.3 --- build/pkgs/meson/checksums.ini | 4 ++-- build/pkgs/meson/package-version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/pkgs/meson/checksums.ini b/build/pkgs/meson/checksums.ini index 0767e4d3390..3af60c9dc52 100644 --- a/build/pkgs/meson/checksums.ini +++ b/build/pkgs/meson/checksums.ini @@ -1,4 +1,4 @@ tarball=meson-VERSION-py3-none-any.whl -sha1=88a5ccf7aba04e82c05f46dc02a4c209423e3f0d -sha256=ae3f12953045f3c7c60e27f2af1ad862f14dee125b4ed9bcb8a842a5080dbf85 +sha1=2d61f94a3ad0b29851f425eef7ee400fc30b8617 +sha256=ef02b806ce0c5b6becd5bb5dc9fa67662320b29b337e7ace73e4354500590233 upstream_url=https://files.pythonhosted.org/packages/py3/m/meson/meson-VERSION-py3-none-any.whl diff --git a/build/pkgs/meson/package-version.txt b/build/pkgs/meson/package-version.txt index bd8bf882d06..a7ee35a3ea7 100644 --- a/build/pkgs/meson/package-version.txt +++ b/build/pkgs/meson/package-version.txt @@ -1 +1 @@ -1.7.0 +1.8.3 From 43ec53e9f8cae26bf7bf0c8116d5ce0b106adeeb Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 3 Aug 2025 10:36:56 +0800 Subject: [PATCH 51/66] Add meson.options to docker container --- .github/workflows/write-dockerfile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/write-dockerfile.sh b/.github/workflows/write-dockerfile.sh index bb8d3c0bda2..a52681d7c73 100755 --- a/.github/workflows/write-dockerfile.sh +++ b/.github/workflows/write-dockerfile.sh @@ -275,7 +275,7 @@ cat < Date: Thu, 14 Aug 2025 14:45:48 +0800 Subject: [PATCH 52/66] Compile boost_graph with c++11 for older boosts --- pyproject.toml | 2 +- src/sage/graphs/base/meson.build | 33 ++++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d4d023ae190..3b5888f3eaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,6 @@ build-requires = [ host-requires = [ "virtual:interface/blas", "virtual:compiler/fortran", - "pkg:generic/boost", "pkg:generic/brial", "pkg:generic/cddlib", "pkg:generic/cliquer", @@ -182,6 +181,7 @@ dependencies = [ [external.optional-host-requires] extra = [ + "pkg:generic/boost", "pkg:generic/bliss", "pkg:generic/coxeter3", "pkg:generic/mcqd", diff --git a/src/sage/graphs/base/meson.build b/src/sage/graphs/base/meson.build index badf69f0478..bb6863a81f9 100644 --- a/src/sage/graphs/base/meson.build +++ b/src/sage/graphs/base/meson.build @@ -1,3 +1,23 @@ +boost_cpp17_compatible = false +boost = dependency( + 'boost', + version: '>=1.83.0', + required: false, + modules: ['graph', 'tuple'], +) +if boost.found() + # Need at least v1.83.0 (https://github.com/boostorg/functional/commit/6a573e4b8333ee63ee62ce95558c3667348db233) + # for C++17 compatibility. + boost_cpp17_compatible = true +else + boost = dependency( + 'boost', + version: '>=1.66.0', + required: false, + modules: ['graph', 'tuple'], + ) +endif + py.install_sources( '__init__.py', 'all.py', @@ -39,14 +59,23 @@ extension_data_cpp = { } foreach name, pyx : extension_data_cpp + deps = [py_dep, cysignals, gmp] + override_options = ['cython_language=cpp'] + if name == 'boost_graph' + deps += [boost] + if not boost_cpp17_compatible + override_options += ['cpp_std=c++11'] + endif + endif + py.extension_module( name, sources: pyx, subdir: 'sage/graphs/base', install: true, - override_options: ['cython_language=cpp'], + override_options: override_options, include_directories: [inc_cpython, inc_data_structures, inc_rings], - dependencies: [py_dep, cysignals, gmp], + dependencies: deps, ) endforeach From c27025708acb8f907e740c632988672cec0ee6f9 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sat, 16 Aug 2025 17:54:25 -0500 Subject: [PATCH 53/66] fix pyproject.toml (boost issue) --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f45aeafae23..02b86cce5e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,11 +128,8 @@ build-requires = [ host-requires = [ "virtual:interface/blas", "virtual:compiler/fortran", -<<<<<<< HEAD "pkg:generic/brial", -======= "pkg:generic/boost", ->>>>>>> origin/develop "pkg:generic/cddlib", "pkg:generic/cliquer", "pkg:generic/ecl", @@ -184,7 +181,6 @@ dependencies = [ [external.optional-host-requires] extra = [ - "pkg:generic/boost", "pkg:generic/bliss", "pkg:generic/brial", "pkg:generic/coxeter3", From 4b199fe6edc75283ac396905fa91a1a9209e5b76 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 17 Aug 2025 08:48:11 +0800 Subject: [PATCH 54/66] Fix version --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 282565cc9c7..9d3ebff18ab 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.8.beta0, Release Date: 2025-08-16 +10.8.beta0 From 46a3e7842bb23d268598f8e88c9e12471e5ed607 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 17 Aug 2025 22:04:25 +0800 Subject: [PATCH 55/66] Also compile pbori with c+11 for old boost --- src/meson.build | 21 +++++++++++++++++++++ src/sage/graphs/base/meson.build | 20 -------------------- src/sage/rings/polynomial/pbori/meson.build | 17 +++++++++++++++-- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/src/meson.build b/src/meson.build index 609fcf04596..5e1e2bc03ce 100644 --- a/src/meson.build +++ b/src/meson.build @@ -214,6 +214,27 @@ endif # Cannot be found via pkg-config ntl = cc.find_library('ntl', required: not is_windows, disabler: true) +boost_cpp17_compatible = false +boost = dependency( + 'boost', + version: '>=1.83.0', + required: false, + modules: ['graph', 'tuple'], +) +if boost.found() + # Need at least v1.83.0 (https://github.com/boostorg/functional/commit/6a573e4b8333ee63ee62ce95558c3667348db233) + # for C++17 compatibility. + boost_cpp17_compatible = true +else + boost = dependency( + 'boost', + version: '>=1.66.0', + required: false, + modules: ['graph', 'tuple'], + ) +endif + + # Meson currently ignores include_directories for Cython modules, so we # have to add them manually. # https://github.com/mesonbuild/meson/issues/9562 diff --git a/src/sage/graphs/base/meson.build b/src/sage/graphs/base/meson.build index bb6863a81f9..4121a61fe9b 100644 --- a/src/sage/graphs/base/meson.build +++ b/src/sage/graphs/base/meson.build @@ -1,23 +1,3 @@ -boost_cpp17_compatible = false -boost = dependency( - 'boost', - version: '>=1.83.0', - required: false, - modules: ['graph', 'tuple'], -) -if boost.found() - # Need at least v1.83.0 (https://github.com/boostorg/functional/commit/6a573e4b8333ee63ee62ce95558c3667348db233) - # for C++17 compatibility. - boost_cpp17_compatible = true -else - boost = dependency( - 'boost', - version: '>=1.66.0', - required: false, - modules: ['graph', 'tuple'], - ) -endif - py.install_sources( '__init__.py', 'all.py', diff --git a/src/sage/rings/polynomial/pbori/meson.build b/src/sage/rings/polynomial/pbori/meson.build index 557eda27a79..3f672ff922a 100644 --- a/src/sage/rings/polynomial/pbori/meson.build +++ b/src/sage/rings/polynomial/pbori/meson.build @@ -33,14 +33,27 @@ py.install_sources( extension_data_cpp = {'pbori': files('pbori.pyx')} foreach name, pyx : extension_data_cpp + override_options = ['cython_language=cpp'] + if not boost_cpp17_compatible + override_options += ['cpp_std=c++11'] + endif py.extension_module( name, sources: pyx, subdir: 'sage/rings/polynomial/pbori', install: true, - override_options: ['cython_language=cpp'], + override_options: override_options, include_directories: [inc_cpython, inc_ext, inc_rings, inc_src], - dependencies: [py_dep, brial, brial_groebner, cysignals, gmp, m4ri, png], + dependencies: [ + py_dep, + boost, + brial, + brial_groebner, + cysignals, + gmp, + m4ri, + png, + ], ) endforeach From b1c8b4d4404b4bbe35cf6d167356e3093b28087f Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 18 Aug 2025 21:28:46 +0800 Subject: [PATCH 56/66] Add '--no-prune-empty-dirs' option to documentation build command because pruning empty dirs doesn't work with parallelization --- src/doc/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/meson.build b/src/doc/meson.build index fc261c71a8a..94a404a015c 100644 --- a/src/doc/meson.build +++ b/src/doc/meson.build @@ -25,6 +25,7 @@ references = run_command( py, [ src / 'build-docs.py', + '--no-prune-empty-dirs', '--all-documents', 'reference', '--source', From 1873577eaa1e8146a18838931e09f48cae82bab0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 21 Aug 2025 21:40:10 +0800 Subject: [PATCH 57/66] Remove duplicate brial dependency declaration --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 02b86cce5e3..143f89600d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,6 @@ build-requires = [ host-requires = [ "virtual:interface/blas", "virtual:compiler/fortran", - "pkg:generic/brial", "pkg:generic/boost", "pkg:generic/cddlib", "pkg:generic/cliquer", From 05eebe278f1223e3e456d91d28ff729de5d57628 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 24 Aug 2025 08:03:49 +0800 Subject: [PATCH 58/66] Fix doc-clean --- src/doc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/Makefile b/src/doc/Makefile index e6970d87c38..60166be4129 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -16,6 +16,7 @@ clean: rm -rf en/reference/documentation/sage_docbuild rm -rf en/reference/sage rm -f common/*.pyc + rm -rf "$(SAGE_ROOT)/build/sage-distro/src/doc" doc-html: meson compile -C ../../build/sage-distro doc-html From 63620bd4b5d4d1da2a7dec44c32e3ce211ffacc3 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 24 Aug 2025 15:46:41 +0800 Subject: [PATCH 59/66] Docs: Copy all source files to the build dir, and run sphinx there --- src/doc/Makefile | 3 +- src/doc/bootstrap | 7 +- src/doc/ca/intro/meson.build | 6 ++ src/doc/ca/meson.build | 1 + src/doc/common/_vendor/meson.build | 24 +++++ src/doc/common/meson.build | 4 + src/doc/common/static/meson.build | 18 ++++ src/doc/common/templates-furo/meson.build | 7 ++ .../common/templates-furo/sidebar/meson.build | 6 ++ src/doc/common/themes/meson.build | 1 + .../common/themes/sage-classic/meson.build | 14 +++ .../themes/sage-classic/static/meson.build | 6 ++ src/doc/de/a_tour_of_sage/meson.build | 6 ++ src/doc/de/meson.build | 3 + .../de/thematische_anleitungen/meson.build | 6 ++ src/doc/de/tutorial/meson.build | 30 +++++++ src/doc/el/a_tour_of_sage/meson.build | 6 ++ src/doc/el/meson.build | 1 + src/doc/en/a_tour_of_sage/meson.build | 6 ++ src/doc/en/constructions/meson.build | 24 +++++ src/doc/en/developer/meson.build | 32 +++++++ src/doc/en/developer/sagenb/meson.build | 6 ++ src/doc/en/developer/static/meson.build | 12 +++ src/doc/en/faq/meson.build | 12 +++ src/doc/en/installation/meson.build | 14 +++ src/doc/en/meson.build | 10 +++ src/doc/en/prep/Quickstarts/meson.build | 16 ++++ src/doc/en/prep/media/meson.build | 42 +++++++++ src/doc/en/prep/meson.build | 18 ++++ .../en/reference/algebras/media/meson.build | 6 ++ src/doc/en/reference/algebras/meson.build | 15 ++++ .../en/reference/arithgroup/media/meson.build | 6 ++ src/doc/en/reference/arithgroup/meson.build | 7 ++ .../reference/arithmetic_curves/meson.build | 6 ++ src/doc/en/reference/asymptotic/meson.build | 6 ++ src/doc/en/reference/calculus/meson.build | 6 ++ src/doc/en/reference/categories/meson.build | 6 ++ src/doc/en/reference/coding/meson.build | 6 ++ src/doc/en/reference/coercion/meson.build | 6 ++ .../en/reference/combinat/media/meson.build | 22 +++++ src/doc/en/reference/combinat/meson.build | 7 ++ src/doc/en/reference/constants/meson.build | 6 ++ src/doc/en/reference/cpython/meson.build | 6 ++ src/doc/en/reference/cryptography/meson.build | 6 ++ src/doc/en/reference/curves/meson.build | 6 ++ .../en/reference/data_structures/meson.build | 6 ++ src/doc/en/reference/databases/meson.build | 6 ++ .../diophantine_approximation/meson.build | 6 ++ .../reference/discrete_geometry/meson.build | 6 ++ src/doc/en/reference/doctest/meson.build | 6 ++ .../en/reference/documentation/meson.build | 6 ++ .../en/reference/drinfeld_modules/meson.build | 6 ++ src/doc/en/reference/dynamics/meson.build | 11 +++ .../en/reference/euclidean_spaces/meson.build | 6 ++ src/doc/en/reference/finite_rings/meson.build | 6 ++ .../en/reference/function_fields/meson.build | 6 ++ src/doc/en/reference/functions/meson.build | 6 ++ src/doc/en/reference/game_theory/meson.build | 6 ++ src/doc/en/reference/games/meson.build | 6 ++ src/doc/en/reference/graphs/media/meson.build | 11 +++ src/doc/en/reference/graphs/meson.build | 7 ++ src/doc/en/reference/groups/meson.build | 6 ++ src/doc/en/reference/hecke/meson.build | 6 ++ .../reference/history_and_license/meson.build | 6 ++ src/doc/en/reference/homology/meson.build | 6 ++ .../reference/hyperbolic_geometry/meson.build | 6 ++ src/doc/en/reference/interfaces/meson.build | 6 ++ src/doc/en/reference/knots/meson.build | 6 ++ src/doc/en/reference/lfunctions/meson.build | 6 ++ src/doc/en/reference/libs/meson.build | 6 ++ src/doc/en/reference/logic/meson.build | 6 ++ src/doc/en/reference/manifolds/meson.build | 28 ++++++ src/doc/en/reference/matrices/meson.build | 6 ++ src/doc/en/reference/matroids/meson.build | 6 ++ src/doc/en/reference/meson.build | 90 +++++++++++++++++++ src/doc/en/reference/misc/meson.build | 6 ++ src/doc/en/reference/modabvar/meson.build | 6 ++ src/doc/en/reference/modfrm/meson.build | 6 ++ src/doc/en/reference/modsym/meson.build | 6 ++ src/doc/en/reference/modules/meson.build | 6 ++ src/doc/en/reference/monoids/meson.build | 6 ++ .../meson.build | 6 ++ .../en/reference/number_fields/meson.build | 6 ++ src/doc/en/reference/numerical/meson.build | 6 ++ src/doc/en/reference/oremodules/meson.build | 6 ++ src/doc/en/reference/padics/meson.build | 6 ++ .../en/reference/parallel/media/meson.build | 10 +++ src/doc/en/reference/parallel/meson.build | 7 ++ src/doc/en/reference/plot3d/meson.build | 7 ++ .../plot3d/threejs_examples/meson.build | 6 ++ src/doc/en/reference/plotting/meson.build | 6 ++ .../en/reference/polynomial_rings/meson.build | 13 +++ src/doc/en/reference/power_series/meson.build | 6 ++ src/doc/en/reference/probability/meson.build | 6 ++ .../en/reference/quadratic_forms/meson.build | 6 ++ .../en/reference/quat_algebras/meson.build | 6 ++ src/doc/en/reference/quivers/meson.build | 6 ++ src/doc/en/reference/references/meson.build | 6 ++ src/doc/en/reference/repl/meson.build | 16 +++- src/doc/en/reference/resolutions/meson.build | 6 ++ .../reference/riemannian_geometry/meson.build | 6 ++ src/doc/en/reference/rings/meson.build | 6 ++ .../en/reference/rings_numerical/meson.build | 6 ++ .../en/reference/rings_standard/meson.build | 6 ++ src/doc/en/reference/sat/meson.build | 6 ++ src/doc/en/reference/schemes/meson.build | 6 ++ src/doc/en/reference/semirings/meson.build | 6 ++ src/doc/en/reference/sets/meson.build | 6 ++ src/doc/en/reference/spkg/meson.build | 6 ++ src/doc/en/reference/stats/meson.build | 6 ++ src/doc/en/reference/structure/meson.build | 6 ++ .../reference/tensor_free_modules/meson.build | 12 +++ .../en/reference/topology/media/meson.build | 12 +++ src/doc/en/reference/topology/meson.build | 7 ++ src/doc/en/reference/valuations/meson.build | 6 ++ .../algebraic_combinatorics/meson.build | 6 ++ .../meson.build | 29 ++++++ .../thematic_tutorials/geometry/meson.build | 13 +++ src/doc/en/thematic_tutorials/lie/meson.build | 22 +++++ .../en/thematic_tutorials/media/meson.build | 70 +++++++++++++++ .../media/sandpile/meson.build | 13 +++ src/doc/en/thematic_tutorials/meson.build | 37 ++++++++ .../numerical_sage/meson.build | 22 +++++ .../vector_calculus/meson.build | 12 +++ src/doc/en/tutorial/meson.build | 31 +++++++ src/doc/en/website/meson.build | 7 ++ src/doc/en/website/templates/meson.build | 6 ++ src/doc/es/a_tour_of_sage/meson.build | 6 ++ src/doc/es/meson.build | 2 + src/doc/es/tutorial/meson.build | 19 ++++ src/doc/fr/a_tour_of_sage/meson.build | 6 ++ src/doc/fr/meson.build | 2 + src/doc/fr/tutorial/meson.build | 31 +++++++ src/doc/hu/a_tour_of_sage/meson.build | 6 ++ src/doc/hu/meson.build | 1 + src/doc/it/a_tour_of_sage/meson.build | 6 ++ src/doc/it/faq/meson.build | 12 +++ src/doc/it/meson.build | 3 + src/doc/it/tutorial/meson.build | 6 ++ src/doc/ja/a_tour_of_sage/meson.build | 6 ++ src/doc/ja/meson.build | 2 + src/doc/ja/tutorial/meson.build | 32 +++++++ src/doc/meson.build | 38 ++++++-- src/doc/pt/a_tour_of_sage/meson.build | 6 ++ src/doc/pt/meson.build | 2 + src/doc/pt/tutorial/meson.build | 31 +++++++ src/doc/ru/meson.build | 1 + src/doc/ru/tutorial/meson.build | 29 ++++++ src/doc/tr/a_tour_of_sage/meson.build | 6 ++ src/doc/tr/meson.build | 1 + src/doc/zh/a_tour_of_sage/meson.build | 6 ++ src/doc/zh/constructions/meson.build | 24 +++++ src/doc/zh/meson.build | 3 + src/doc/zh/tutorial/meson.build | 31 +++++++ src/sage_docbuild/builders.py | 7 -- src/sage_docbuild/ext/inventory_builder.py | 2 + tools/update-meson.py | 70 +++++++++++++++ 157 files changed, 1681 insertions(+), 21 deletions(-) create mode 100644 src/doc/ca/intro/meson.build create mode 100644 src/doc/ca/meson.build create mode 100644 src/doc/common/_vendor/meson.build create mode 100644 src/doc/common/meson.build create mode 100644 src/doc/common/static/meson.build create mode 100644 src/doc/common/templates-furo/meson.build create mode 100644 src/doc/common/templates-furo/sidebar/meson.build create mode 100644 src/doc/common/themes/meson.build create mode 100644 src/doc/common/themes/sage-classic/meson.build create mode 100644 src/doc/common/themes/sage-classic/static/meson.build create mode 100644 src/doc/de/a_tour_of_sage/meson.build create mode 100644 src/doc/de/meson.build create mode 100644 src/doc/de/thematische_anleitungen/meson.build create mode 100644 src/doc/de/tutorial/meson.build create mode 100644 src/doc/el/a_tour_of_sage/meson.build create mode 100644 src/doc/el/meson.build create mode 100644 src/doc/en/a_tour_of_sage/meson.build create mode 100644 src/doc/en/constructions/meson.build create mode 100644 src/doc/en/developer/meson.build create mode 100644 src/doc/en/developer/sagenb/meson.build create mode 100644 src/doc/en/developer/static/meson.build create mode 100644 src/doc/en/faq/meson.build create mode 100644 src/doc/en/installation/meson.build create mode 100644 src/doc/en/meson.build create mode 100644 src/doc/en/prep/Quickstarts/meson.build create mode 100644 src/doc/en/prep/media/meson.build create mode 100644 src/doc/en/prep/meson.build create mode 100644 src/doc/en/reference/algebras/media/meson.build create mode 100644 src/doc/en/reference/algebras/meson.build create mode 100644 src/doc/en/reference/arithgroup/media/meson.build create mode 100644 src/doc/en/reference/arithgroup/meson.build create mode 100644 src/doc/en/reference/arithmetic_curves/meson.build create mode 100644 src/doc/en/reference/asymptotic/meson.build create mode 100644 src/doc/en/reference/calculus/meson.build create mode 100644 src/doc/en/reference/categories/meson.build create mode 100644 src/doc/en/reference/coding/meson.build create mode 100644 src/doc/en/reference/coercion/meson.build create mode 100644 src/doc/en/reference/combinat/media/meson.build create mode 100644 src/doc/en/reference/combinat/meson.build create mode 100644 src/doc/en/reference/constants/meson.build create mode 100644 src/doc/en/reference/cpython/meson.build create mode 100644 src/doc/en/reference/cryptography/meson.build create mode 100644 src/doc/en/reference/curves/meson.build create mode 100644 src/doc/en/reference/data_structures/meson.build create mode 100644 src/doc/en/reference/databases/meson.build create mode 100644 src/doc/en/reference/diophantine_approximation/meson.build create mode 100644 src/doc/en/reference/discrete_geometry/meson.build create mode 100644 src/doc/en/reference/doctest/meson.build create mode 100644 src/doc/en/reference/documentation/meson.build create mode 100644 src/doc/en/reference/drinfeld_modules/meson.build create mode 100644 src/doc/en/reference/dynamics/meson.build create mode 100644 src/doc/en/reference/euclidean_spaces/meson.build create mode 100644 src/doc/en/reference/finite_rings/meson.build create mode 100644 src/doc/en/reference/function_fields/meson.build create mode 100644 src/doc/en/reference/functions/meson.build create mode 100644 src/doc/en/reference/game_theory/meson.build create mode 100644 src/doc/en/reference/games/meson.build create mode 100644 src/doc/en/reference/graphs/media/meson.build create mode 100644 src/doc/en/reference/graphs/meson.build create mode 100644 src/doc/en/reference/groups/meson.build create mode 100644 src/doc/en/reference/hecke/meson.build create mode 100644 src/doc/en/reference/history_and_license/meson.build create mode 100644 src/doc/en/reference/homology/meson.build create mode 100644 src/doc/en/reference/hyperbolic_geometry/meson.build create mode 100644 src/doc/en/reference/interfaces/meson.build create mode 100644 src/doc/en/reference/knots/meson.build create mode 100644 src/doc/en/reference/lfunctions/meson.build create mode 100644 src/doc/en/reference/libs/meson.build create mode 100644 src/doc/en/reference/logic/meson.build create mode 100644 src/doc/en/reference/manifolds/meson.build create mode 100644 src/doc/en/reference/matrices/meson.build create mode 100644 src/doc/en/reference/matroids/meson.build create mode 100644 src/doc/en/reference/meson.build create mode 100644 src/doc/en/reference/misc/meson.build create mode 100644 src/doc/en/reference/modabvar/meson.build create mode 100644 src/doc/en/reference/modfrm/meson.build create mode 100644 src/doc/en/reference/modsym/meson.build create mode 100644 src/doc/en/reference/modules/meson.build create mode 100644 src/doc/en/reference/monoids/meson.build create mode 100644 src/doc/en/reference/noncommutative_polynomial_rings/meson.build create mode 100644 src/doc/en/reference/number_fields/meson.build create mode 100644 src/doc/en/reference/numerical/meson.build create mode 100644 src/doc/en/reference/oremodules/meson.build create mode 100644 src/doc/en/reference/padics/meson.build create mode 100644 src/doc/en/reference/parallel/media/meson.build create mode 100644 src/doc/en/reference/parallel/meson.build create mode 100644 src/doc/en/reference/plot3d/meson.build create mode 100644 src/doc/en/reference/plot3d/threejs_examples/meson.build create mode 100644 src/doc/en/reference/plotting/meson.build create mode 100644 src/doc/en/reference/polynomial_rings/meson.build create mode 100644 src/doc/en/reference/power_series/meson.build create mode 100644 src/doc/en/reference/probability/meson.build create mode 100644 src/doc/en/reference/quadratic_forms/meson.build create mode 100644 src/doc/en/reference/quat_algebras/meson.build create mode 100644 src/doc/en/reference/quivers/meson.build create mode 100644 src/doc/en/reference/references/meson.build create mode 100644 src/doc/en/reference/resolutions/meson.build create mode 100644 src/doc/en/reference/riemannian_geometry/meson.build create mode 100644 src/doc/en/reference/rings/meson.build create mode 100644 src/doc/en/reference/rings_numerical/meson.build create mode 100644 src/doc/en/reference/rings_standard/meson.build create mode 100644 src/doc/en/reference/sat/meson.build create mode 100644 src/doc/en/reference/schemes/meson.build create mode 100644 src/doc/en/reference/semirings/meson.build create mode 100644 src/doc/en/reference/sets/meson.build create mode 100644 src/doc/en/reference/spkg/meson.build create mode 100644 src/doc/en/reference/stats/meson.build create mode 100644 src/doc/en/reference/structure/meson.build create mode 100644 src/doc/en/reference/tensor_free_modules/meson.build create mode 100644 src/doc/en/reference/topology/media/meson.build create mode 100644 src/doc/en/reference/topology/meson.build create mode 100644 src/doc/en/reference/valuations/meson.build create mode 100644 src/doc/en/thematic_tutorials/algebraic_combinatorics/meson.build create mode 100644 src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build create mode 100644 src/doc/en/thematic_tutorials/geometry/meson.build create mode 100644 src/doc/en/thematic_tutorials/lie/meson.build create mode 100644 src/doc/en/thematic_tutorials/media/meson.build create mode 100644 src/doc/en/thematic_tutorials/media/sandpile/meson.build create mode 100644 src/doc/en/thematic_tutorials/meson.build create mode 100644 src/doc/en/thematic_tutorials/numerical_sage/meson.build create mode 100644 src/doc/en/thematic_tutorials/vector_calculus/meson.build create mode 100644 src/doc/en/tutorial/meson.build create mode 100644 src/doc/en/website/meson.build create mode 100644 src/doc/en/website/templates/meson.build create mode 100644 src/doc/es/a_tour_of_sage/meson.build create mode 100644 src/doc/es/meson.build create mode 100644 src/doc/es/tutorial/meson.build create mode 100644 src/doc/fr/a_tour_of_sage/meson.build create mode 100644 src/doc/fr/meson.build create mode 100644 src/doc/fr/tutorial/meson.build create mode 100644 src/doc/hu/a_tour_of_sage/meson.build create mode 100644 src/doc/hu/meson.build create mode 100644 src/doc/it/a_tour_of_sage/meson.build create mode 100644 src/doc/it/faq/meson.build create mode 100644 src/doc/it/meson.build create mode 100644 src/doc/it/tutorial/meson.build create mode 100644 src/doc/ja/a_tour_of_sage/meson.build create mode 100644 src/doc/ja/meson.build create mode 100644 src/doc/ja/tutorial/meson.build create mode 100644 src/doc/pt/a_tour_of_sage/meson.build create mode 100644 src/doc/pt/meson.build create mode 100644 src/doc/pt/tutorial/meson.build create mode 100644 src/doc/ru/meson.build create mode 100644 src/doc/ru/tutorial/meson.build create mode 100644 src/doc/tr/a_tour_of_sage/meson.build create mode 100644 src/doc/tr/meson.build create mode 100644 src/doc/zh/a_tour_of_sage/meson.build create mode 100644 src/doc/zh/constructions/meson.build create mode 100644 src/doc/zh/meson.build create mode 100644 src/doc/zh/tutorial/meson.build diff --git a/src/doc/Makefile b/src/doc/Makefile index 60166be4129..7538b4c6c66 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -12,11 +12,12 @@ all: doc-html clean: + rm -rf "$(SAGE_ROOT)/build/sage-distro/src/doc" + # and a few more things that were previously generated rm -rf en/reference/*/sage rm -rf en/reference/documentation/sage_docbuild rm -rf en/reference/sage rm -f common/*.pyc - rm -rf "$(SAGE_ROOT)/build/sage-distro/src/doc" doc-html: meson compile -C ../../build/sage-distro doc-html diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 9d59aa1755e..e65c74ae252 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -20,7 +20,10 @@ fi cd "$SAGE_ROOT" export PATH=build/bin:$PATH -OUTPUT_DIR="src/doc/en/installation" +# Get target directory from first command-line argument +TARGET_DIR="${1:-$SAGE_ROOT/src/doc}" + +OUTPUT_DIR="$TARGET_DIR/en/installation" mkdir -p "$OUTPUT_DIR" shopt -s extglob @@ -80,7 +83,7 @@ for SYSTEM in arch debian fedora homebrew opensuse void; do 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 done -OUTPUT_DIR="src/doc/en/reference/spkg" +OUTPUT_DIR="$TARGET_DIR/en/reference/spkg" mkdir -p "$OUTPUT_DIR" if [ "${BOOTSTRAP_QUIET}" = "no" ]; then echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/"*.rst" diff --git a/src/doc/ca/intro/meson.build b/src/doc/ca/intro/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/ca/intro/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/ca/meson.build b/src/doc/ca/meson.build new file mode 100644 index 00000000000..c2be6e4f762 --- /dev/null +++ b/src/doc/ca/meson.build @@ -0,0 +1 @@ +subdir('intro') diff --git a/src/doc/common/_vendor/meson.build b/src/doc/common/_vendor/meson.build new file mode 100644 index 00000000000..bee7311d0be --- /dev/null +++ b/src/doc/common/_vendor/meson.build @@ -0,0 +1,24 @@ +doc_sources = [ + 'cvxopt.inv', + 'cvxpy.inv', + 'cypari2.inv', + 'cysignals.inv', + 'flint.inv', + 'fpylll.inv', + 'gmpy2.inv', + 'ipywidgets.inv', + 'matplotlib.inv', + 'mpmath.inv', + 'networkx.inv', + 'numpy.inv', + 'pplpy.inv', + 'python.inv', + 'rpy2.inv', + 'scipy.inv', + 'sympy.inv', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/common/meson.build b/src/doc/common/meson.build new file mode 100644 index 00000000000..2b14cb97ffd --- /dev/null +++ b/src/doc/common/meson.build @@ -0,0 +1,4 @@ +subdir('themes') +subdir('templates-furo') +subdir('static') +subdir('_vendor') diff --git a/src/doc/common/static/meson.build b/src/doc/common/static/meson.build new file mode 100644 index 00000000000..d5d6c36af3d --- /dev/null +++ b/src/doc/common/static/meson.build @@ -0,0 +1,18 @@ +doc_sources = [ + 'custom-codemirror-monokai.css', + 'custom-furo.css', + 'custom-jupyter-sphinx.css', + 'custom-tabs.css', + 'favicon.ico', + 'jupyter-sphinx-furo.js', + 'logo_sagemath_black.svg', + 'logo_sagemath_white.svg', + 'pdf.png', + 'sageicon.png', + 'sagelogo.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/common/templates-furo/meson.build b/src/doc/common/templates-furo/meson.build new file mode 100644 index 00000000000..5534e80a950 --- /dev/null +++ b/src/doc/common/templates-furo/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['genindex-single.html', 'search.html'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('sidebar') diff --git a/src/doc/common/templates-furo/sidebar/meson.build b/src/doc/common/templates-furo/sidebar/meson.build new file mode 100644 index 00000000000..f72aa86d81e --- /dev/null +++ b/src/doc/common/templates-furo/sidebar/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['brand.html', 'home.html', 'version-selector.html'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/common/themes/meson.build b/src/doc/common/themes/meson.build new file mode 100644 index 00000000000..b0603ead95a --- /dev/null +++ b/src/doc/common/themes/meson.build @@ -0,0 +1 @@ +subdir('sage-classic') diff --git a/src/doc/common/themes/sage-classic/meson.build b/src/doc/common/themes/sage-classic/meson.build new file mode 100644 index 00000000000..74d578cc23d --- /dev/null +++ b/src/doc/common/themes/sage-classic/meson.build @@ -0,0 +1,14 @@ +doc_sources = [ + 'genindex-single.html', + 'genindex-split.html', + 'genindex.html', + 'layout.html', + 'search.html', + 'theme.conf', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('static') diff --git a/src/doc/common/themes/sage-classic/static/meson.build b/src/doc/common/themes/sage-classic/static/meson.build new file mode 100644 index 00000000000..a62cbffc3b2 --- /dev/null +++ b/src/doc/common/themes/sage-classic/static/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['sage.css_t'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/de/a_tour_of_sage/meson.build b/src/doc/de/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/de/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/de/meson.build b/src/doc/de/meson.build new file mode 100644 index 00000000000..38aae0b46af --- /dev/null +++ b/src/doc/de/meson.build @@ -0,0 +1,3 @@ +subdir('thematische_anleitungen') +subdir('tutorial') +subdir('a_tour_of_sage') diff --git a/src/doc/de/thematische_anleitungen/meson.build b/src/doc/de/thematische_anleitungen/meson.build new file mode 100644 index 00000000000..13c6e695dc6 --- /dev/null +++ b/src/doc/de/thematische_anleitungen/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst', 'sage_gymnasium.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/de/tutorial/meson.build b/src/doc/de/tutorial/meson.build new file mode 100644 index 00000000000..9b2238fd50f --- /dev/null +++ b/src/doc/de/tutorial/meson.build @@ -0,0 +1,30 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'latex.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/el/a_tour_of_sage/meson.build b/src/doc/el/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/el/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/el/meson.build b/src/doc/el/meson.build new file mode 100644 index 00000000000..3e9f3da7d4a --- /dev/null +++ b/src/doc/el/meson.build @@ -0,0 +1 @@ +subdir('a_tour_of_sage') diff --git a/src/doc/en/a_tour_of_sage/meson.build b/src/doc/en/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/en/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/constructions/meson.build b/src/doc/en/constructions/meson.build new file mode 100644 index 00000000000..e789f807056 --- /dev/null +++ b/src/doc/en/constructions/meson.build @@ -0,0 +1,24 @@ +doc_sources = [ + 'algebraic_geometry.rst', + 'calculus.rst', + 'conf.py', + 'contributions.rst', + 'elliptic_curves.rst', + 'groups.rst', + 'index.rst', + 'interface_issues.rst', + 'linear_algebra.rst', + 'linear_codes.rst', + 'modular_forms.rst', + 'number_fields.rst', + 'number_theory.rst', + 'plotting.rst', + 'polynomials.rst', + 'rep_theory.rst', + 'rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/developer/meson.build b/src/doc/en/developer/meson.build new file mode 100644 index 00000000000..5a1b73ec29b --- /dev/null +++ b/src/doc/en/developer/meson.build @@ -0,0 +1,32 @@ +doc_sources = [ + 'coding_basics.rst', + 'coding_in_cython.rst', + 'coding_in_other.rst', + 'coding_in_python.rst', + 'conf.py', + 'doctesting.rst', + 'downstream.rst', + 'git_advanced.rst', + 'git_background.rst', + 'git_basic.rst', + 'git_setup.rst', + 'github.rst', + 'index.rst', + 'packaging.rst', + 'packaging_sage_library.rst', + 'portability_platform_table.rst', + 'portability_testing.rst', + 'review.rst', + 'sage_manuals.rst', + 'tools.rst', + 'walkthrough.rst', + 'workflows.rst', + 'workspace.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('static') +subdir('sagenb') diff --git a/src/doc/en/developer/sagenb/meson.build b/src/doc/en/developer/sagenb/meson.build new file mode 100644 index 00000000000..2a2ed443304 --- /dev/null +++ b/src/doc/en/developer/sagenb/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['branch_dropdown.png', 'forking_button.png', 'pull_button.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/developer/static/meson.build b/src/doc/en/developer/static/meson.build new file mode 100644 index 00000000000..c11918618e9 --- /dev/null +++ b/src/doc/en/developer/static/meson.build @@ -0,0 +1,12 @@ +doc_sources = [ + 'flowchart.dia', + 'flowchart.pdf', + 'flowchart.svg', + 'meld-screenshot.png', + 'workflow.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/faq/meson.build b/src/doc/en/faq/meson.build new file mode 100644 index 00000000000..eab196fd651 --- /dev/null +++ b/src/doc/en/faq/meson.build @@ -0,0 +1,12 @@ +doc_sources = [ + 'conf.py', + 'faq-contribute.rst', + 'faq-general.rst', + 'faq-usage.rst', + 'index.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/installation/meson.build b/src/doc/en/installation/meson.build new file mode 100644 index 00000000000..cf48e414b78 --- /dev/null +++ b/src/doc/en/installation/meson.build @@ -0,0 +1,14 @@ +doc_sources = [ + 'conda.rst', + 'conf.py', + 'index.rst', + 'launching.rst', + 'meson.rst', + 'source.rst', + 'troubles.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/meson.build b/src/doc/en/meson.build new file mode 100644 index 00000000000..4e6198e9a27 --- /dev/null +++ b/src/doc/en/meson.build @@ -0,0 +1,10 @@ +subdir('reference') +subdir('constructions') +subdir('website') +subdir('developer') +subdir('thematic_tutorials') +subdir('installation') +subdir('tutorial') +subdir('a_tour_of_sage') +subdir('faq') +subdir('prep') diff --git a/src/doc/en/prep/Quickstarts/meson.build b/src/doc/en/prep/Quickstarts/meson.build new file mode 100644 index 00000000000..c5da0cf4240 --- /dev/null +++ b/src/doc/en/prep/Quickstarts/meson.build @@ -0,0 +1,16 @@ +doc_sources = [ + 'Abstract-Algebra.rst', + 'Differential-Equations.rst', + 'Graphs-and-Discrete.rst', + 'Interact.rst', + 'Linear-Algebra.rst', + 'Multivariable-Calculus.rst', + 'NumAnalysis.rst', + 'Number-Theory.rst', + 'Statistics-and-Distributions.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/prep/media/meson.build b/src/doc/en/prep/media/meson.build new file mode 100644 index 00000000000..5459ec8611c --- /dev/null +++ b/src/doc/en/prep/media/meson.build @@ -0,0 +1,42 @@ +doc_sources = [ + 'ActiveCell.png', + 'BlankJupyter.png', + 'ClickBlueLine.png', + 'EmptyNotebook.png', + 'EmptyNotebookGetNew.png', + 'EvaluateCell.png', + 'FileChoose.png', + 'FirstCell.png', + 'HaveSignin.png', + 'InputJupyter.png', + 'JupyterHelpMenu.png', + 'JupyterIntroDetails.png', + 'JupyterIntroScreen.png', + 'LiveWorksheet.png', + 'LoggedIn.png', + 'MDInput.png', + 'MDOutput.png', + 'MarkDownMenu.png', + 'MoreCells.png', + 'NewWorksheet.png', + 'NotLoggedIn.png', + 'NotebookExport.png', + 'NotebookExportDetails.png', + 'OpenIDPage.png', + 'OutputJupyter.png', + 'RegularSigninPage.png', + 'Riemann.png', + 'Rplot001.png', + 'RunCellIcon.png', + 'SignIn.png', + 'SignInNormal.png', + 'SignInOpenID.png', + 'TextEditor.png', + 'ThinBlueLine.png', + 'heawood-graph-latex.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/prep/meson.build b/src/doc/en/prep/meson.build new file mode 100644 index 00000000000..890d7fdc11e --- /dev/null +++ b/src/doc/en/prep/meson.build @@ -0,0 +1,18 @@ +doc_sources = [ + 'Advanced-2DPlotting.rst', + 'Calculus.rst', + 'Intro-Tutorial.rst', + 'Logging-On.rst', + 'Programming.rst', + 'Symbolics-and-Basic-Plotting.rst', + 'conf.py', + 'index.rst', + 'quickstart.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') +subdir('Quickstarts') diff --git a/src/doc/en/reference/algebras/media/meson.build b/src/doc/en/reference/algebras/media/meson.build new file mode 100644 index 00000000000..cdf4756a083 --- /dev/null +++ b/src/doc/en/reference/algebras/media/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['fusiontree.png', 'fusiontree.tex'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/algebras/meson.build b/src/doc/en/reference/algebras/meson.build new file mode 100644 index 00000000000..3285e87c139 --- /dev/null +++ b/src/doc/en/reference/algebras/meson.build @@ -0,0 +1,15 @@ +doc_sources = [ + 'conf.py', + 'cubic_hecke_algebra.rst', + 'fusion_rings.rst', + 'index.rst', + 'lie_algebras.rst', + 'lie_conformal_algebras.rst', + 'quantum_groups.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') diff --git a/src/doc/en/reference/arithgroup/media/meson.build b/src/doc/en/reference/arithgroup/media/meson.build new file mode 100644 index 00000000000..8fb8c38b618 --- /dev/null +++ b/src/doc/en/reference/arithgroup/media/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['pairing.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/arithgroup/meson.build b/src/doc/en/reference/arithgroup/meson.build new file mode 100644 index 00000000000..6a4569c71b7 --- /dev/null +++ b/src/doc/en/reference/arithgroup/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') diff --git a/src/doc/en/reference/arithmetic_curves/meson.build b/src/doc/en/reference/arithmetic_curves/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/arithmetic_curves/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/asymptotic/meson.build b/src/doc/en/reference/asymptotic/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/asymptotic/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/calculus/meson.build b/src/doc/en/reference/calculus/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/calculus/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/categories/meson.build b/src/doc/en/reference/categories/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/categories/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/coding/meson.build b/src/doc/en/reference/coding/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/coding/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/coercion/meson.build b/src/doc/en/reference/coercion/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/coercion/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/combinat/media/meson.build b/src/doc/en/reference/combinat/media/meson.build new file mode 100644 index 00000000000..a141e2358f3 --- /dev/null +++ b/src/doc/en/reference/combinat/media/meson.build @@ -0,0 +1,22 @@ +doc_sources = [ + 'a_poset.png', + 'complete-binary-trees-4.pdf', + 'complete-binary-trees-4.png', + 'day-doubling.png', + 'day-doubling.tex', + 'graphs-5.pdf', + 'graphs-5.png', + 'k-rim.JPG', + 'polytope.png', + 'prefix-tree-graphs-4.pdf', + 'prefix-tree-graphs-4.png', + 'prefix-tree-graphs-4.tikz', + 'prefix-tree-partitions-5.pdf', + 'prefix-tree-partitions-5.png', + 'prefix-tree-partitions-5.tikz', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/combinat/meson.build b/src/doc/en/reference/combinat/meson.build new file mode 100644 index 00000000000..caa6c4cb69e --- /dev/null +++ b/src/doc/en/reference/combinat/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst', 'module_list.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') diff --git a/src/doc/en/reference/constants/meson.build b/src/doc/en/reference/constants/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/constants/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/cpython/meson.build b/src/doc/en/reference/cpython/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/cpython/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/cryptography/meson.build b/src/doc/en/reference/cryptography/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/cryptography/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/curves/meson.build b/src/doc/en/reference/curves/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/curves/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/data_structures/meson.build b/src/doc/en/reference/data_structures/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/data_structures/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/databases/meson.build b/src/doc/en/reference/databases/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/databases/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/diophantine_approximation/meson.build b/src/doc/en/reference/diophantine_approximation/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/diophantine_approximation/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/discrete_geometry/meson.build b/src/doc/en/reference/discrete_geometry/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/discrete_geometry/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/doctest/meson.build b/src/doc/en/reference/doctest/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/doctest/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/documentation/meson.build b/src/doc/en/reference/documentation/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/documentation/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/drinfeld_modules/meson.build b/src/doc/en/reference/drinfeld_modules/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/drinfeld_modules/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/dynamics/meson.build b/src/doc/en/reference/dynamics/meson.build new file mode 100644 index 00000000000..ab7d29e798c --- /dev/null +++ b/src/doc/en/reference/dynamics/meson.build @@ -0,0 +1,11 @@ +doc_sources = [ + 'cellular_automata.rst', + 'complex_dynamics.rst', + 'conf.py', + 'index.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/euclidean_spaces/meson.build b/src/doc/en/reference/euclidean_spaces/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/euclidean_spaces/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/finite_rings/meson.build b/src/doc/en/reference/finite_rings/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/finite_rings/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/function_fields/meson.build b/src/doc/en/reference/function_fields/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/function_fields/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/functions/meson.build b/src/doc/en/reference/functions/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/functions/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/game_theory/meson.build b/src/doc/en/reference/game_theory/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/game_theory/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/games/meson.build b/src/doc/en/reference/games/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/games/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/graphs/media/meson.build b/src/doc/en/reference/graphs/media/meson.build new file mode 100644 index 00000000000..13a83c4c74e --- /dev/null +++ b/src/doc/en/reference/graphs/media/meson.build @@ -0,0 +1,11 @@ +doc_sources = [ + 'cycle.png', + 'heawood-graph-latex.png', + 'square.png', + 'structure.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/graphs/meson.build b/src/doc/en/reference/graphs/meson.build new file mode 100644 index 00000000000..6a4569c71b7 --- /dev/null +++ b/src/doc/en/reference/graphs/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') diff --git a/src/doc/en/reference/groups/meson.build b/src/doc/en/reference/groups/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/groups/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/hecke/meson.build b/src/doc/en/reference/hecke/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/hecke/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/history_and_license/meson.build b/src/doc/en/reference/history_and_license/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/history_and_license/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/homology/meson.build b/src/doc/en/reference/homology/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/homology/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/hyperbolic_geometry/meson.build b/src/doc/en/reference/hyperbolic_geometry/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/hyperbolic_geometry/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/interfaces/meson.build b/src/doc/en/reference/interfaces/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/interfaces/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/knots/meson.build b/src/doc/en/reference/knots/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/knots/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/lfunctions/meson.build b/src/doc/en/reference/lfunctions/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/lfunctions/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/libs/meson.build b/src/doc/en/reference/libs/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/libs/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/logic/meson.build b/src/doc/en/reference/logic/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/logic/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/manifolds/meson.build b/src/doc/en/reference/manifolds/meson.build new file mode 100644 index 00000000000..b05c61bf3c3 --- /dev/null +++ b/src/doc/en/reference/manifolds/meson.build @@ -0,0 +1,28 @@ +doc_sources = [ + 'chart.rst', + 'conf.py', + 'continuous_map.rst', + 'degenerate_metric.rst', + 'diff_form.rst', + 'diff_manifold.rst', + 'diff_map.rst', + 'diff_scalarfield.rst', + 'diff_vector_bundle.rst', + 'euclidean_space.rst', + 'index.rst', + 'manifold.rst', + 'mixed_form.rst', + 'multivector.rst', + 'poisson_manifold.rst', + 'riem_manifold.rst', + 'scalarfield.rst', + 'tangent_space.rst', + 'tensorfield.rst', + 'vector_bundle.rst', + 'vectorfield.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/matrices/meson.build b/src/doc/en/reference/matrices/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/matrices/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/matroids/meson.build b/src/doc/en/reference/matroids/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/matroids/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/meson.build b/src/doc/en/reference/meson.build new file mode 100644 index 00000000000..c9f6c333b09 --- /dev/null +++ b/src/doc/en/reference/meson.build @@ -0,0 +1,90 @@ +doc_sources = [ + 'conf.py', + 'conf_sub.py', + 'footer.txt', + 'index.rst', + 'make_module_list.sh', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('rings_standard') +subdir('interfaces') +subdir('numerical') +subdir('modabvar') +subdir('topology') +subdir('rings_numerical') +subdir('constants') +subdir('logic') +subdir('algebras') +subdir('spkg') +subdir('modfrm') +subdir('hyperbolic_geometry') +subdir('parallel') +subdir('doctest') +subdir('data_structures') +subdir('quat_algebras') +subdir('functions') +subdir('valuations') +subdir('curves') +subdir('arithgroup') +subdir('diophantine_approximation') +subdir('knots') +subdir('matroids') +subdir('oremodules') +subdir('probability') +subdir('cryptography') +subdir('plotting') +subdir('stats') +subdir('number_fields') +subdir('arithmetic_curves') +subdir('databases') +subdir('power_series') +subdir('rings') +subdir('quadratic_forms') +subdir('groups') +subdir('sat') +subdir('sets') +subdir('graphs') +subdir('noncommutative_polynomial_rings') +subdir('hecke') +subdir('structure') +subdir('history_and_license') +subdir('riemannian_geometry') +subdir('function_fields') +subdir('euclidean_spaces') +subdir('matrices') +subdir('documentation') +subdir('quivers') +subdir('references') +subdir('tensor_free_modules') +subdir('polynomial_rings') +subdir('asymptotic') +subdir('padics') +subdir('resolutions') +subdir('drinfeld_modules') +subdir('plot3d') +subdir('discrete_geometry') +subdir('modsym') +subdir('coercion') +subdir('finite_rings') +subdir('misc') +subdir('modules') +subdir('semirings') +subdir('dynamics') +subdir('game_theory') +subdir('categories') +subdir('manifolds') +subdir('repl') +subdir('coding') +subdir('schemes') +subdir('calculus') +subdir('games') +subdir('libs') +subdir('cpython') +subdir('combinat') +subdir('homology') +subdir('monoids') +subdir('lfunctions') diff --git a/src/doc/en/reference/misc/meson.build b/src/doc/en/reference/misc/meson.build new file mode 100644 index 00000000000..9cc096ca239 --- /dev/null +++ b/src/doc/en/reference/misc/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst', 'sagetex.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/modabvar/meson.build b/src/doc/en/reference/modabvar/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/modabvar/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/modfrm/meson.build b/src/doc/en/reference/modfrm/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/modfrm/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/modsym/meson.build b/src/doc/en/reference/modsym/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/modsym/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/modules/meson.build b/src/doc/en/reference/modules/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/modules/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/monoids/meson.build b/src/doc/en/reference/monoids/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/monoids/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/noncommutative_polynomial_rings/meson.build b/src/doc/en/reference/noncommutative_polynomial_rings/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/noncommutative_polynomial_rings/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/number_fields/meson.build b/src/doc/en/reference/number_fields/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/number_fields/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/numerical/meson.build b/src/doc/en/reference/numerical/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/numerical/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/oremodules/meson.build b/src/doc/en/reference/oremodules/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/oremodules/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/padics/meson.build b/src/doc/en/reference/padics/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/padics/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/parallel/media/meson.build b/src/doc/en/reference/parallel/media/meson.build new file mode 100644 index 00000000000..bb36b6e7815 --- /dev/null +++ b/src/doc/en/reference/parallel/media/meson.build @@ -0,0 +1,10 @@ +doc_sources = [ + 'map_reduce_arch.fig', + 'map_reduce_arch.pdf', + 'map_reduce_arch.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/parallel/meson.build b/src/doc/en/reference/parallel/meson.build new file mode 100644 index 00000000000..6a4569c71b7 --- /dev/null +++ b/src/doc/en/reference/parallel/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') diff --git a/src/doc/en/reference/plot3d/meson.build b/src/doc/en/reference/plot3d/meson.build new file mode 100644 index 00000000000..750cbdd2077 --- /dev/null +++ b/src/doc/en/reference/plot3d/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst', 'threejs.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('threejs_examples') diff --git a/src/doc/en/reference/plot3d/threejs_examples/meson.build b/src/doc/en/reference/plot3d/threejs_examples/meson.build new file mode 100644 index 00000000000..d7f891848ac --- /dev/null +++ b/src/doc/en/reference/plot3d/threejs_examples/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['animation.html', 'helix.html', 'spheres.html', 'template.html'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/plotting/meson.build b/src/doc/en/reference/plotting/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/plotting/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/polynomial_rings/meson.build b/src/doc/en/reference/polynomial_rings/meson.build new file mode 100644 index 00000000000..94f32a46c53 --- /dev/null +++ b/src/doc/en/reference/polynomial_rings/meson.build @@ -0,0 +1,13 @@ +doc_sources = [ + 'conf.py', + 'index.rst', + 'invariant_theory.rst', + 'polynomial_rings_multivar.rst', + 'polynomial_rings_toy_implementations.rst', + 'polynomial_rings_univar.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/power_series/meson.build b/src/doc/en/reference/power_series/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/power_series/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/probability/meson.build b/src/doc/en/reference/probability/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/probability/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/quadratic_forms/meson.build b/src/doc/en/reference/quadratic_forms/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/quadratic_forms/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/quat_algebras/meson.build b/src/doc/en/reference/quat_algebras/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/quat_algebras/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/quivers/meson.build b/src/doc/en/reference/quivers/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/quivers/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/references/meson.build b/src/doc/en/reference/references/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/references/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/repl/meson.build b/src/doc/en/reference/repl/meson.build index 381f31d0f00..eb492404897 100644 --- a/src/doc/en/reference/repl/meson.build +++ b/src/doc/en/reference/repl/meson.build @@ -1,5 +1,17 @@ -doc_src += custom_target( - 'doc-src', +doc_sources = [ + 'conf.py', + 'environ.rst', + 'index.rst', + 'options.rst', + 'startup.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +doc_src_repl = custom_target( + 'options', output: ['options.txt'], command: [py, src / 'sage' / 'cli', '--help'], capture: true, diff --git a/src/doc/en/reference/resolutions/meson.build b/src/doc/en/reference/resolutions/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/resolutions/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/riemannian_geometry/meson.build b/src/doc/en/reference/riemannian_geometry/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/riemannian_geometry/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/rings/meson.build b/src/doc/en/reference/rings/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/rings/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/rings_numerical/meson.build b/src/doc/en/reference/rings_numerical/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/rings_numerical/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/rings_standard/meson.build b/src/doc/en/reference/rings_standard/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/rings_standard/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/sat/meson.build b/src/doc/en/reference/sat/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/sat/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/schemes/meson.build b/src/doc/en/reference/schemes/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/schemes/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/semirings/meson.build b/src/doc/en/reference/semirings/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/semirings/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/sets/meson.build b/src/doc/en/reference/sets/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/sets/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/spkg/meson.build b/src/doc/en/reference/spkg/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/spkg/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/stats/meson.build b/src/doc/en/reference/stats/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/stats/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/structure/meson.build b/src/doc/en/reference/structure/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/structure/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/tensor_free_modules/meson.build b/src/doc/en/reference/tensor_free_modules/meson.build new file mode 100644 index 00000000000..e89a63cfbd1 --- /dev/null +++ b/src/doc/en/reference/tensor_free_modules/meson.build @@ -0,0 +1,12 @@ +doc_sources = [ + 'alt_forms.rst', + 'conf.py', + 'index.rst', + 'morphisms.rst', + 'tensors.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/topology/media/meson.build b/src/doc/en/reference/topology/media/meson.build new file mode 100644 index 00000000000..9536cc45499 --- /dev/null +++ b/src/doc/en/reference/topology/media/meson.build @@ -0,0 +1,12 @@ +doc_sources = [ + 'klein.png', + 'rp2.png', + 'simplices.png', + 'torus.png', + 'torus_labelled.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/reference/topology/meson.build b/src/doc/en/reference/topology/meson.build new file mode 100644 index 00000000000..6a4569c71b7 --- /dev/null +++ b/src/doc/en/reference/topology/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('media') diff --git a/src/doc/en/reference/valuations/meson.build b/src/doc/en/reference/valuations/meson.build new file mode 100644 index 00000000000..147ac538e60 --- /dev/null +++ b/src/doc/en/reference/valuations/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/algebraic_combinatorics/meson.build b/src/doc/en/thematic_tutorials/algebraic_combinatorics/meson.build new file mode 100644 index 00000000000..cc66ded6212 --- /dev/null +++ b/src/doc/en/thematic_tutorials/algebraic_combinatorics/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['n_cube.rst', 'rsk.rst', 'tsetlin_library.rst', 'walks.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build new file mode 100644 index 00000000000..975216f15ee --- /dev/null +++ b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build @@ -0,0 +1,29 @@ +doc_sources = [ + 'birch.png', + 'birds_eye_view.rst', + 'birds_other.rst', + 'conf.py', + 'elliptic_curves.rst', + 'generators_for_rings.rst', + 'half_integral.rst', + 'index.rst', + 'integer_factorization.rst', + 'introduction.rst', + 'l_series.rst', + 'level_one_forms.rst', + 'method_of_graphs.rst', + 'modabvar.rst', + 'modpcurve.png', + 'modular_forms.rst', + 'modular_forms_and_hecke_operators.rst', + 'modular_symbols.rst', + 'nf_galois_groups.rst', + 'nf_introduction.rst', + 'nf_orders.rst', + 'number_fields.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/geometry/meson.build b/src/doc/en/thematic_tutorials/geometry/meson.build new file mode 100644 index 00000000000..f56d296d587 --- /dev/null +++ b/src/doc/en/thematic_tutorials/geometry/meson.build @@ -0,0 +1,13 @@ +doc_sources = [ + 'polyhedra_quickref.rst', + 'polyhedra_quicktutorial.rst', + 'polyhedra_tutorial.rst', + 'polytope_tikz.rst', + 'tips.rst', + 'visualization.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/lie/meson.build b/src/doc/en/thematic_tutorials/lie/meson.build new file mode 100644 index 00000000000..4bbe16b1a8a --- /dev/null +++ b/src/doc/en/thematic_tutorials/lie/meson.build @@ -0,0 +1,22 @@ +doc_sources = [ + 'affine.rst', + 'affine_finite_crystals.rst', + 'affine_hw_crystals.rst', + 'bibliography.rst', + 'branching_rules.rst', + 'crystals.rst', + 'elementary_crystals.rst', + 'infinity_crystals.rst', + 'integrable.rst', + 'introduction.rst', + 'iwahori_hecke_algebra.rst', + 'kazhdan_lusztig_polynomials.rst', + 'lie_basics.rst', + 'weyl_character_ring.rst', + 'weyl_groups.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/media/meson.build b/src/doc/en/thematic_tutorials/media/meson.build new file mode 100644 index 00000000000..8efbce8c92e --- /dev/null +++ b/src/doc/en/thematic_tutorials/media/meson.build @@ -0,0 +1,70 @@ +doc_sources = [ + '1.png', + 'BinfA2.png', + 'BinfRrhoA2.png', + 'BinfTCrhoA2.png', + 'BrhoinBinf.png', + 'KR_A.png', + 'KR_Atwisted.png', + 'KR_Atwisted1.png', + 'KR_Atwisted_dual.png', + 'KR_B.png', + 'KR_C.png', + 'KR_C_exceptional.png', + 'KR_D.png', + 'KR_Dtwisted.png', + 'KR_Dtwisted_exceptional.png', + 'KR_E6.png', + 'LScrystal.png', + 'MinfC31.png', + 'RmutensorBlambda.png', + 'YLa0.png', + 'YinfA21.png', + 'a1box.png', + 'a1tag.png', + 'a2box.png', + 'a2rho.png', + 'a2rho_color.png', + 'a2tag.png', + 'ab2tag.png', + 'all-bounds-asymp.png', + 'b2box.png', + 'cube-dist.png', + 'cube3.png', + 'cube4.png', + 'elementaryA2.png', + 'elias-bound-asymp.png', + 'graph.png', + 'graph0.png', + 'gv-bound-asymp.png', + 'hamming-bound-asymp.png', + 'hyperbolic_La0.png', + 'level_zero_crystal.png', + 'lp_flot1.png', + 'lp_flot2.png', + 'mrrw1-bound-asymp.png', + 'parabolic_subcrystal.png', + 'plotkin-bound-asymp.png', + 'singleton-bound-asymp.png', + 'stand-a.png', + 'stand-b.png', + 'stand-c.png', + 'stand-d.png', + 'stand-g.png', + 'standard1.png', + 'tableau1.png', + 'tableau2.png', + 'tableau3.png', + 'tableau4.png', + 'tableaux.png', + 'tensor.png', + 'tsetlin-library.png', + 'wcf1.png', + 'young_lattice.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('sandpile') diff --git a/src/doc/en/thematic_tutorials/media/sandpile/meson.build b/src/doc/en/thematic_tutorials/media/sandpile/meson.build new file mode 100644 index 00000000000..1f6d57fe76a --- /dev/null +++ b/src/doc/en/thematic_tutorials/media/sandpile/meson.build @@ -0,0 +1,13 @@ +doc_sources = [ + 'C_6-parallel.png', + 'C_6.png', + 'btw.png', + 'example1.png', + 'initial.png', + 'random.png', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/meson.build b/src/doc/en/thematic_tutorials/meson.build new file mode 100644 index 00000000000..4b9035c0633 --- /dev/null +++ b/src/doc/en/thematic_tutorials/meson.build @@ -0,0 +1,37 @@ +doc_sources = [ + 'algebraic_combinatorics.rst', + 'coding_theory.rst', + 'coercion_and_categories.rst', + 'conf.py', + 'cython_interface.rst', + 'functional_programming.rst', + 'geometry.rst', + 'group_theory.rst', + 'index.rst', + 'lie.rst', + 'linear_programming.rst', + 'numtheory_rsa.rst', + 'profiling.rst', + 'sandpile.rst', + 'steenrod_algebra_modules.rst', + 'structures_in_coding_theory.rst', + 'sws2rst.rst', + 'toctree.rst', + 'tutorial-comprehensions.rst', + 'tutorial-implementing-algebraic-structures.rst', + 'tutorial-objects-and-classes.rst', + 'tutorial-programming-python.rst', + 'vector_calculus.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('geometry') +subdir('vector_calculus') +subdir('explicit_methods_in_number_theory') +subdir('lie') +subdir('numerical_sage') +subdir('media') +subdir('algebraic_combinatorics') diff --git a/src/doc/en/thematic_tutorials/numerical_sage/meson.build b/src/doc/en/thematic_tutorials/numerical_sage/meson.build new file mode 100644 index 00000000000..7f1fa562e0b --- /dev/null +++ b/src/doc/en/thematic_tutorials/numerical_sage/meson.build @@ -0,0 +1,22 @@ +doc_sources = [ + 'comparison_to_cython.rst', + 'conf.py', + 'ctypes.rst', + 'ctypes_examples.rst', + 'cvxopt.rst', + 'f2py.rst', + 'f2py_examples.rst', + 'index.rst', + 'mpi4py.rst', + 'numerical_tools.rst', + 'numpy.rst', + 'parallel_computation.rst', + 'parallel_laplace_solver.rst', + 'scipy.rst', + 'using_compiled_code_iteractively.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/thematic_tutorials/vector_calculus/meson.build b/src/doc/en/thematic_tutorials/vector_calculus/meson.build new file mode 100644 index 00000000000..9d7d7f2c051 --- /dev/null +++ b/src/doc/en/thematic_tutorials/vector_calculus/meson.build @@ -0,0 +1,12 @@ +doc_sources = [ + 'vector_calc_advanced.rst', + 'vector_calc_cartesian.rst', + 'vector_calc_change.rst', + 'vector_calc_curvilinear.rst', + 'vector_calc_plane.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/tutorial/meson.build b/src/doc/en/tutorial/meson.build new file mode 100644 index 00000000000..a9b67543ea8 --- /dev/null +++ b/src/doc/en/tutorial/meson.build @@ -0,0 +1,31 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'latex.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_coercion.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/en/website/meson.build b/src/doc/en/website/meson.build new file mode 100644 index 00000000000..91ae4433479 --- /dev/null +++ b/src/doc/en/website/meson.build @@ -0,0 +1,7 @@ +doc_sources = ['conf.py', 'index.rst', 'root_index.html', 'versions.txt'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + +subdir('templates') diff --git a/src/doc/en/website/templates/meson.build b/src/doc/en/website/templates/meson.build new file mode 100644 index 00000000000..84ef3b0dde2 --- /dev/null +++ b/src/doc/en/website/templates/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['index.html', 'index_furo.html'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/es/a_tour_of_sage/meson.build b/src/doc/es/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/es/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/es/meson.build b/src/doc/es/meson.build new file mode 100644 index 00000000000..e70fede0d72 --- /dev/null +++ b/src/doc/es/meson.build @@ -0,0 +1,2 @@ +subdir('tutorial') +subdir('a_tour_of_sage') diff --git a/src/doc/es/tutorial/meson.build b/src/doc/es/tutorial/meson.build new file mode 100644 index 00000000000..821c967a730 --- /dev/null +++ b/src/doc/es/tutorial/meson.build @@ -0,0 +1,19 @@ +doc_sources = [ + 'conf.py', + 'index.rst', + 'introduction.rst', + 'tour.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/fr/a_tour_of_sage/meson.build b/src/doc/fr/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/fr/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/fr/meson.build b/src/doc/fr/meson.build new file mode 100644 index 00000000000..e70fede0d72 --- /dev/null +++ b/src/doc/fr/meson.build @@ -0,0 +1,2 @@ +subdir('tutorial') +subdir('a_tour_of_sage') diff --git a/src/doc/fr/tutorial/meson.build b/src/doc/fr/tutorial/meson.build new file mode 100644 index 00000000000..a9b67543ea8 --- /dev/null +++ b/src/doc/fr/tutorial/meson.build @@ -0,0 +1,31 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'latex.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_coercion.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/hu/a_tour_of_sage/meson.build b/src/doc/hu/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/hu/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/hu/meson.build b/src/doc/hu/meson.build new file mode 100644 index 00000000000..3e9f3da7d4a --- /dev/null +++ b/src/doc/hu/meson.build @@ -0,0 +1 @@ +subdir('a_tour_of_sage') diff --git a/src/doc/it/a_tour_of_sage/meson.build b/src/doc/it/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/it/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/it/faq/meson.build b/src/doc/it/faq/meson.build new file mode 100644 index 00000000000..eab196fd651 --- /dev/null +++ b/src/doc/it/faq/meson.build @@ -0,0 +1,12 @@ +doc_sources = [ + 'conf.py', + 'faq-contribute.rst', + 'faq-general.rst', + 'faq-usage.rst', + 'index.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/it/meson.build b/src/doc/it/meson.build new file mode 100644 index 00000000000..6485675eafc --- /dev/null +++ b/src/doc/it/meson.build @@ -0,0 +1,3 @@ +subdir('tutorial') +subdir('a_tour_of_sage') +subdir('faq') diff --git a/src/doc/it/tutorial/meson.build b/src/doc/it/tutorial/meson.build new file mode 100644 index 00000000000..0166cb94d0e --- /dev/null +++ b/src/doc/it/tutorial/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'index.rst', 'introduction.rst', 'tour_algebra.rst'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/ja/a_tour_of_sage/meson.build b/src/doc/ja/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/ja/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/ja/meson.build b/src/doc/ja/meson.build new file mode 100644 index 00000000000..e70fede0d72 --- /dev/null +++ b/src/doc/ja/meson.build @@ -0,0 +1,2 @@ +subdir('tutorial') +subdir('a_tour_of_sage') diff --git a/src/doc/ja/tutorial/meson.build b/src/doc/ja/tutorial/meson.build new file mode 100644 index 00000000000..bc24607e908 --- /dev/null +++ b/src/doc/ja/tutorial/meson.build @@ -0,0 +1,32 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'japanesesupport.py', + 'latex.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_coercion.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/meson.build b/src/doc/meson.build index 94a404a015c..b9a18436c9f 100644 --- a/src/doc/meson.build +++ b/src/doc/meson.build @@ -10,16 +10,29 @@ if not sphinx_check.found() subdir_done() endif - -doc_src = [] -subdir('en/reference/repl') # TODO: Migrate this completely to meson -doc_src += custom_target( - 'doc-src', +doc_bootstrap = custom_target( + 'bootstrap', output: ['autogen'], - command: [files('bootstrap')], + command: [files('bootstrap'), meson.current_build_dir()], env: {'SAGE_ROOT': root}, ) +doc_src = [] +subdir('el') +subdir('ca') +subdir('zh') +subdir('it') +subdir('common') +subdir('hu') +subdir('de') +subdir('en') +subdir('pt') +subdir('ru') +subdir('tr') +subdir('es') +subdir('fr') +subdir('ja') + references = run_command( py, @@ -46,7 +59,10 @@ foreach type : ['inventory', 'html', 'pdf'] short_ref = ref endif deps = [] - deps += doc_src + deps += doc_bootstrap + if short_ref == 'repl' + deps += doc_src_repl + endif if type == 'html' or type == 'pdf' deps += reference_inventory endif @@ -63,17 +79,19 @@ foreach type : ['inventory', 'html', 'pdf'] endif target = custom_target( 'doc-' + type + '-reference-' + short_ref, + #input: doc_src, output: [type + short_ref], command: [ py, src / 'build-docs.py', + '--no-prune-empty-dirs', '--no-pdf-links', ref, type, '-o', '@OUTDIR@', '--source', - meson.current_source_dir(), + meson.current_build_dir(), ], depends: deps, ) @@ -94,6 +112,7 @@ other_documents = run_command( py, [ src / 'build-docs.py', + '--no-prune-empty-dirs', '--all-documents', 'all', '--source', @@ -112,13 +131,14 @@ foreach type : ['html', 'pdf'] command: [ py, src / 'build-docs.py', + '--no-prune-empty-dirs', '--no-pdf-links', doc, type, '-o', '@OUTDIR@', '--source', - meson.current_source_dir(), + meson.current_build_dir(), ], depends: reference_inventory, ) diff --git a/src/doc/pt/a_tour_of_sage/meson.build b/src/doc/pt/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/pt/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/pt/meson.build b/src/doc/pt/meson.build new file mode 100644 index 00000000000..e70fede0d72 --- /dev/null +++ b/src/doc/pt/meson.build @@ -0,0 +1,2 @@ +subdir('tutorial') +subdir('a_tour_of_sage') diff --git a/src/doc/pt/tutorial/meson.build b/src/doc/pt/tutorial/meson.build new file mode 100644 index 00000000000..a9b67543ea8 --- /dev/null +++ b/src/doc/pt/tutorial/meson.build @@ -0,0 +1,31 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'latex.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_coercion.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/ru/meson.build b/src/doc/ru/meson.build new file mode 100644 index 00000000000..9bbcc883973 --- /dev/null +++ b/src/doc/ru/meson.build @@ -0,0 +1 @@ +subdir('tutorial') diff --git a/src/doc/ru/tutorial/meson.build b/src/doc/ru/tutorial/meson.build new file mode 100644 index 00000000000..93e7bad4ed0 --- /dev/null +++ b/src/doc/ru/tutorial/meson.build @@ -0,0 +1,29 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/tr/a_tour_of_sage/meson.build b/src/doc/tr/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/tr/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/tr/meson.build b/src/doc/tr/meson.build new file mode 100644 index 00000000000..3e9f3da7d4a --- /dev/null +++ b/src/doc/tr/meson.build @@ -0,0 +1 @@ +subdir('a_tour_of_sage') diff --git a/src/doc/zh/a_tour_of_sage/meson.build b/src/doc/zh/a_tour_of_sage/meson.build new file mode 100644 index 00000000000..93a73e1d6e2 --- /dev/null +++ b/src/doc/zh/a_tour_of_sage/meson.build @@ -0,0 +1,6 @@ +doc_sources = ['conf.py', 'eigen_plot.png', 'index.rst', 'sin_plot.png'] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/zh/constructions/meson.build b/src/doc/zh/constructions/meson.build new file mode 100644 index 00000000000..e789f807056 --- /dev/null +++ b/src/doc/zh/constructions/meson.build @@ -0,0 +1,24 @@ +doc_sources = [ + 'algebraic_geometry.rst', + 'calculus.rst', + 'conf.py', + 'contributions.rst', + 'elliptic_curves.rst', + 'groups.rst', + 'index.rst', + 'interface_issues.rst', + 'linear_algebra.rst', + 'linear_codes.rst', + 'modular_forms.rst', + 'number_fields.rst', + 'number_theory.rst', + 'plotting.rst', + 'polynomials.rst', + 'rep_theory.rst', + 'rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/doc/zh/meson.build b/src/doc/zh/meson.build new file mode 100644 index 00000000000..31159967d89 --- /dev/null +++ b/src/doc/zh/meson.build @@ -0,0 +1,3 @@ +subdir('constructions') +subdir('tutorial') +subdir('a_tour_of_sage') diff --git a/src/doc/zh/tutorial/meson.build b/src/doc/zh/tutorial/meson.build new file mode 100644 index 00000000000..a9b67543ea8 --- /dev/null +++ b/src/doc/zh/tutorial/meson.build @@ -0,0 +1,31 @@ +doc_sources = [ + 'afterword.rst', + 'appendix.rst', + 'bibliography.rst', + 'conf.py', + 'index.rst', + 'interactive_shell.rst', + 'interfaces.rst', + 'introduction.rst', + 'latex.rst', + 'programming.rst', + 'sagetex.rst', + 'tour.rst', + 'tour_advanced.rst', + 'tour_algebra.rst', + 'tour_assignment.rst', + 'tour_coercion.rst', + 'tour_functions.rst', + 'tour_groups.rst', + 'tour_help.rst', + 'tour_linalg.rst', + 'tour_numtheory.rst', + 'tour_plotting.rst', + 'tour_polynomial.rst', + 'tour_rings.rst', +] + +foreach file : doc_sources + doc_src += fs.copyfile(file) +endforeach + diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index 20721ab43a1..1bbfe4b436d 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -660,13 +660,6 @@ def _wrapper(self, build_type, *args, **kwds): logger.info(f"Copying over custom reST files from {_sage} ...") shutil.copytree(_sage, self.dir / 'sage') - # Copy over some generated reST file in the build directory - # (Background: Meson puts them in the build directory, but Sphinx can also read - # files from the source directory, see https://github.com/sphinx-doc/sphinx/issues/3132) - generated_dir = self._options.output_dir / self.name - for file in generated_dir.rglob('*'): - shutil.copy2(file, self.dir / file.relative_to(generated_dir)) - getattr(DocBuilder, build_type)(self, *args, **kwds) def cache_file(self) -> Path: diff --git a/src/sage_docbuild/ext/inventory_builder.py b/src/sage_docbuild/ext/inventory_builder.py index 20f644d6a1f..64c24d603e2 100644 --- a/src/sage_docbuild/ext/inventory_builder.py +++ b/src/sage_docbuild/ext/inventory_builder.py @@ -7,6 +7,7 @@ from __future__ import annotations from os import path +from pathlib import Path from typing import Any, Iterable from urllib.parse import quote @@ -61,6 +62,7 @@ def finish(self) -> None: """ assert self.env is not None + Path(self.outdir).mkdir(parents=True, exist_ok=True) InventoryFile.dump( path.join(self.outdir, INVENTORY_FILENAME), self.env, self ) diff --git a/tools/update-meson.py b/tools/update-meson.py index 09b08d30a9c..658bcc209a6 100755 --- a/tools/update-meson.py +++ b/tools/update-meson.py @@ -47,6 +47,7 @@ class AstPython(AstVisitor): install_sources_calls: list[MethodNode] = [] extension_data: list[AssignmentNode] = [] + doc_sources: list[MethodNode] = [] def visit_MethodNode(self, node: MethodNode) -> None: if node.name.value == "install_sources": @@ -56,6 +57,8 @@ def visit_MethodNode(self, node: MethodNode) -> None: def visit_AssignmentNode(self, node: AssignmentNode) -> None: if node.var_name.value in ["extension_data", "extension_data_cpp"]: self.extension_data += [node] + elif node.var_name.value == "doc_sources": + self.doc_sources += [node] return super().visit_AssignmentNode(node) @@ -163,6 +166,71 @@ def update_python_sources(self: Rewriter, visitor: AstPython): self.modified_nodes += [target] +def update_doc_sources(self: Rewriter, visitor: AstPython): + doc_sources: dict[Path, list[str]] = {} + ignored_files = {'bootstrap', 'Makefile', 'meson.build'} + ignored_folders = {'__pycache__', 'sage'} + for target in visitor.doc_sources: + folder = Path(target.filename).parent + # Generate the current source dict + src_list: list[BaseNode] = [] + if isinstance(target.value, ArrayNode): + src_list.extend(target.value.args.arguments) + doc_sources.setdefault(folder, []) + doc_sources[folder] += [x.value for x in src_list] + + for target in visitor.doc_sources: + if target.var_name.value != "doc_sources": + continue + folder = Path(target.filename).parent + existing_sources: list[str] = doc_sources[folder] + # Add all files that are not in the source list + for _, _, files in folder.walk(): + for file in sorted(files): + if file in existing_sources: + continue + if file in ignored_files or file.endswith(".pyc"): + continue + existing_sources.append(file) + token = Token("string", target.filename, 0, 0, 0, None, file) + target.value.args.arguments.append(StringNode(token)) + if target not in self.modified_nodes: + self.modified_nodes += [target] + + # Add all missing meson files in the src/doc folder + doc_folder = Path(options.sourcedir) / "src" / "doc" + # Delete all totally empty folders as pre-processing step + for folder, dirs, files in doc_folder.walk(top_down = False): + if not dirs and not files: + folder.rmdir() + + for folder, dirs, files in doc_folder.walk(): + if folder.name in ignored_folders or folder == doc_folder: + continue + files_to_add = {} + for file in files: + if file in ignored_files or file in doc_sources.get(folder, set()): + continue + files_to_add[file] = folder + if files_to_add or any(dir not in ignored_folders for dir in dirs): + # Create meson.build file + meson_build = Path(folder) / "meson.build" + with open(meson_build, "w", encoding="utf-8") as f: + if files_to_add: + f.write("doc_sources = [\n") + for file in sorted(files_to_add): + f.write(f" '{file}',\n") + f.write("]\n") + f.write("\n") + f.write("foreach file : doc_sources\n") + f.write(" doc_src += fs.copyfile(file)\n") + f.write("endforeach\n") + f.write("\n") + for dir in dirs: + if dir in ignored_folders: + continue + f.write(f"subdir('{dir}')\n") + def apply_changes(self: Rewriter): assert all( hasattr(x, "lineno") and hasattr(x, "colno") and hasattr(x, "filename") @@ -280,12 +348,14 @@ def remove_node(i): Rewriter.apply_changes = apply_changes # Monkey patch the update_python_sources method until this is upstreamed Rewriter.process_update_python_sources = update_python_sources +Rewriter.process_update_doc_sources = update_doc_sources rewriter = Rewriter(options.sourcedir) visitor = AstPython() rewriter.interpreter.visitors += [visitor] rewriter.analyze_meson() rewriter.process_update_python_sources(visitor) +rewriter.process_update_doc_sources(visitor) rewriter.apply_changes() rewriter.print_info() From babdacde43de6ccbe1f2e42ff91ac3a707edb91f Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 24 Aug 2025 15:47:14 +0800 Subject: [PATCH 60/66] Allow older versions of eclib (due to conda bug) --- src/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index 5e1e2bc03ce..3bd1040e55f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -161,9 +161,12 @@ mtx = cc.find_library( ) png = dependency(['libpng', 'png', 'png16'], version: '>=1.2') zlib = dependency('zlib', version: '>=1.2.11') +# We actually want >= 20250122, but the version number is not updated in the pkgconfig +# https://github.com/conda-forge/eclib-feedstock/issues/48 +# To old versions of eclib don't ship a pkg-config file, so this should be rather safe ec = dependency( 'eclib', - version: '>=20250122', + version: '>=20231211', required: get_option('eclib'), disabler: true, ) From 5dc4f8b6573ccd7022da4220bd76dc865e7cafdd Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 24 Aug 2025 16:37:39 +0800 Subject: [PATCH 61/66] Fix update meson --- .github/workflows/ci-meson.yml | 2 +- src/meson.build | 2 +- tools/update-meson.py | 24 +++++++++++++----------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-meson.yml b/.github/workflows/ci-meson.yml index 30ae0439432..6ce61519eab 100644 --- a/.github/workflows/ci-meson.yml +++ b/.github/workflows/ci-meson.yml @@ -142,7 +142,7 @@ jobs: # this step must be after build, because meson.build creates a number of __init__.py files # that is needed to make tools/update-meson.py run correctly shell: bash -l {0} - if: matrix.tests == 'all' + if: matrix.tests == 'all' && matrix.python == '3.12' run: | python tools/update-meson.py if ! ./tools/test-git-no-uncommitted-changes; then diff --git a/src/meson.build b/src/meson.build index 3bd1040e55f..512bfc9b316 100644 --- a/src/meson.build +++ b/src/meson.build @@ -163,7 +163,7 @@ png = dependency(['libpng', 'png', 'png16'], version: '>=1.2') zlib = dependency('zlib', version: '>=1.2.11') # We actually want >= 20250122, but the version number is not updated in the pkgconfig # https://github.com/conda-forge/eclib-feedstock/issues/48 -# To old versions of eclib don't ship a pkg-config file, so this should be rather safe +# To old versions of eclib don't ship a pkg-config file, so this should be rather safe ec = dependency( 'eclib', version: '>=20231211', diff --git a/tools/update-meson.py b/tools/update-meson.py index 658bcc209a6..43ddc00d7fe 100755 --- a/tools/update-meson.py +++ b/tools/update-meson.py @@ -185,17 +185,17 @@ def update_doc_sources(self: Rewriter, visitor: AstPython): folder = Path(target.filename).parent existing_sources: list[str] = doc_sources[folder] # Add all files that are not in the source list - for _, _, files in folder.walk(): - for file in sorted(files): - if file in existing_sources: - continue - if file in ignored_files or file.endswith(".pyc"): - continue - existing_sources.append(file) - token = Token("string", target.filename, 0, 0, 0, None, file) - target.value.args.arguments.append(StringNode(token)) - if target not in self.modified_nodes: - self.modified_nodes += [target] + for file in folder.glob("*.*"): + file_name: str = file.name + if file_name in existing_sources: + continue + if file_name in ignored_files or file.suffix == ".pyc": + continue + existing_sources.append(file_name) + token = Token("string", target.filename, 0, 0, 0, None, file_name) + target.value.args.arguments.append(StringNode(token)) + if target not in self.modified_nodes: + self.modified_nodes += [target] # Add all missing meson files in the src/doc folder doc_folder = Path(options.sourcedir) / "src" / "doc" @@ -215,6 +215,8 @@ def update_doc_sources(self: Rewriter, visitor: AstPython): if files_to_add or any(dir not in ignored_folders for dir in dirs): # Create meson.build file meson_build = Path(folder) / "meson.build" + if meson_build.exists(): + continue with open(meson_build, "w", encoding="utf-8") as f: if files_to_add: f.write("doc_sources = [\n") From 5636b6e9d18667f4aff020863411a83a69e993de Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 25 Aug 2025 11:11:58 -0500 Subject: [PATCH 62/66] don't use old numpy --- src/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index 512bfc9b316..e0f921755be 100644 --- a/src/meson.build +++ b/src/meson.build @@ -4,7 +4,7 @@ cpp = meson.get_compiler('cpp') cython = meson.get_compiler('cython') # Setup dependencies that are needed by many modules -numpy = dependency('numpy', required: false) +numpy = dependency('numpy', required: false, version: '>=2.2.4') if not numpy.found() # Older versions of numpy don't have a pkg-config file inc_numpy = run_command( From d55c6c24fa2e4349f8403ab5f609a766937e9716 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 25 Aug 2025 11:19:56 -0500 Subject: [PATCH 63/66] also numpy >= 2.2.4 in pyproject --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 22b0bae5511..343cd363e2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ requires = [ 'cython >=3.0, != 3.0.3', 'gmpy2 ~=2.1.b999', 'memory_allocator', - 'numpy >=1.25', + 'numpy >=2.2.4', 'jinja2', ] [tool.meson-python.args] From b4473ef4e3625f0f276a3112d532f5d6a66da3a7 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 26 Aug 2025 12:59:34 +0800 Subject: [PATCH 64/66] Specify build dir also for non-editable installs (and fix typo) --- build/pkgs/sagelib/spkg-install.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/sagelib/spkg-install.in b/build/pkgs/sagelib/spkg-install.in index 6bbea48fce6..0b5d45e35ca 100644 --- a/build/pkgs/sagelib/spkg-install.in +++ b/build/pkgs/sagelib/spkg-install.in @@ -60,7 +60,7 @@ else (cd "$SITEPACKAGESDIR" && rm -f sagemath-standard.egg-link) # Use --no-build-isolation to avoid rebuilds because of dependencies: # Compiling sage/interfaces/sagespawn.pyx because it depends on /private/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gp/T/pip-build-env-609n5985/overlay/lib/python3.10/site-packages/Cython/Includes/posix/unistd.pxd - sdh_pip_install --no-build-isolation . --config-settings=setup-args="-DSAGE_LOCAL=$SAGE_LOCAL" + sdh_pip_install --no-build-isolation . --config-setting=build-dir="build/sage-distro" --config-setting=setup-args="-DSAGE_LOCAL=$SAGE_LOCAL" fi # Remove (potentially invalid) star import caches. From 51339d1032d7b0a7c522b10b3c7b35648c8050ec Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 27 Aug 2025 09:15:21 +0800 Subject: [PATCH 65/66] Remove unused `conf.py` files Co-authored-by: Kwankyu Lee --- .../explicit_methods_in_number_theory/conf.py | 42 ------------------- .../meson.build | 1 - .../thematic_tutorials/numerical_sage/conf.py | 42 ------------------- .../numerical_sage/meson.build | 1 - tools/update-meson.py | 9 ++++ 5 files changed, 9 insertions(+), 86 deletions(-) delete mode 100644 src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py delete mode 100644 src/doc/en/thematic_tutorials/numerical_sage/conf.py diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py deleted file mode 100644 index b8eef385e4f..00000000000 --- a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py +++ /dev/null @@ -1,42 +0,0 @@ -# nodoctest -# Numerical Sage documentation build configuration file, created by -# sphinx-quickstart on Sat Dec 6 11:08:04 2008. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# The contents of this file are pickled, so don't put values in the namespace -# that aren't pickleable (module imports are okay, they're removed automatically). -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -from sage_docbuild.conf import release -from sage_docbuild.conf import * # NOQA - -# Add any paths that contain custom static files (such as style sheets), -# relative to this directory to html_static_path. They are copied after the -# builtin static files, so a file named "default.css" will overwrite the -# builtin "default.css". html_common_static_path imported from sage_docbuild.conf -# contains common paths. -html_static_path = [] + html_common_static_path - -# General information about the project. -name = 'bordeaux_2008' -project = 'Three Lectures about Explicit Methods in\nNumber Theory Using Sage' - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = project + " v" + release -copyright = "2008, William Stein" - -html_short_title = 'Bordeaux Lectures v' + release - -# Output file base name for HTML help builder. -htmlhelp_basename = name - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, document class [howto/manual]). -latex_documents = [ - ('index', name + '.tex', 'Three Lectures about Explicit Methods in\nNumber Theory Using Sage', - 'William Stein', 'manual'), -] diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build index 975216f15ee..107f2aec29c 100644 --- a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build +++ b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/meson.build @@ -2,7 +2,6 @@ doc_sources = [ 'birch.png', 'birds_eye_view.rst', 'birds_other.rst', - 'conf.py', 'elliptic_curves.rst', 'generators_for_rings.rst', 'half_integral.rst', diff --git a/src/doc/en/thematic_tutorials/numerical_sage/conf.py b/src/doc/en/thematic_tutorials/numerical_sage/conf.py deleted file mode 100644 index 5772289f6fa..00000000000 --- a/src/doc/en/thematic_tutorials/numerical_sage/conf.py +++ /dev/null @@ -1,42 +0,0 @@ -# nodoctest -# Numerical Sage documentation build configuration file, created by -# sphinx-quickstart on Sat Dec 6 11:08:04 2008. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# The contents of this file are pickled, so don't put values in the namespace -# that aren't pickleable (module imports are okay, they're removed automatically). -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -from sage_docbuild.conf import release -from sage_docbuild.conf import * # NOQA - -# Add any paths that contain custom static files (such as style sheets), -# relative to this directory to html_static_path. They are copied after the -# builtin static files, so a file named "default.css" will overwrite the -# builtin "default.css". html_common_static_path imported from sage_docbuild.conf -# contains common paths. -html_static_path = [] + html_common_static_path - -# General information about the project. -project = 'Numerical Computing with Sage' -copyright = '2008, Josh Kantor' -name = 'numerical_sage' - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = project + " v" + release - -html_short_title = 'Numerical Sage v' + release - -# Output file base name for HTML help builder. -htmlhelp_basename = name - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, document class [howto/manual]). -latex_documents = [ - ('index', name + '.tex', 'Numerical Computing with Sage', - 'The Sage Development Team', 'manual'), -] diff --git a/src/doc/en/thematic_tutorials/numerical_sage/meson.build b/src/doc/en/thematic_tutorials/numerical_sage/meson.build index 7f1fa562e0b..5d806e86827 100644 --- a/src/doc/en/thematic_tutorials/numerical_sage/meson.build +++ b/src/doc/en/thematic_tutorials/numerical_sage/meson.build @@ -1,6 +1,5 @@ doc_sources = [ 'comparison_to_cython.rst', - 'conf.py', 'ctypes.rst', 'ctypes_examples.rst', 'cvxopt.rst', diff --git a/tools/update-meson.py b/tools/update-meson.py index 43ddc00d7fe..d605205e64c 100755 --- a/tools/update-meson.py +++ b/tools/update-meson.py @@ -196,6 +196,15 @@ def update_doc_sources(self: Rewriter, visitor: AstPython): target.value.args.arguments.append(StringNode(token)) if target not in self.modified_nodes: self.modified_nodes += [target] + # Remove all files that are no longer existing + for file in existing_sources: + if not (folder / file).exists(): + existing_sources.remove(file) + token = next((x for x in target.value.args.arguments if getattr(x, "value", None) == file), None) + if token is not None: + target.value.args.arguments.remove(token) + if target not in self.modified_nodes: + self.modified_nodes += [target] # Add all missing meson files in the src/doc folder doc_folder = Path(options.sourcedir) / "src" / "doc" From 122092c89ef086010de22a90eebf7355bcd73f1a Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 28 Aug 2025 12:08:22 +0800 Subject: [PATCH 66/66] Fix linter --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 82f8a9498f0..d2bb2086a62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,11 +90,11 @@ R = ['rpy2 >=3.3'] extra = [ 'igraph', 'lrcalc ~=2.1; sys_platform != "win32"', - 'p_group_cohomology >=3.3', # Only used in tests + 'p_group_cohomology >=3.3', # Only used in tests 'pycosat >=0.6.3', 'pynormaliz >=2.18; platform_machine != "aarch64" and platform_machine != "arm64"', # Not yet available for Linux aarch64 'sage_numerical_backends_coin', - 'symengine >= 0.6.1', # Only used in tests + 'symengine >= 0.6.1', # Only used in tests ] giac = ['sagemath_giac'] @@ -237,9 +237,9 @@ ignore = [ "E501", # Line too long - hard to avoid in doctests, and better handled by black. ] select = [ - "E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e - "F", # pyflakes - https://docs.astral.sh/ruff/rules/#pyflakes-f - "I", # isort - https://docs.astral.sh/ruff/rules/#isort-i + "E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e + "F", # pyflakes - https://docs.astral.sh/ruff/rules/#pyflakes-f + "I", # isort - https://docs.astral.sh/ruff/rules/#isort-i "PL", # pylint - https://docs.astral.sh/ruff/rules/#pylint-pl ]