From 9cba975913c9ca3a4c7f7ff69a8a39dba80c04cd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 26 Dec 2021 23:15:10 -0800 Subject: [PATCH 01/62] build/pkgs/{_prereq,python3}/distros/cygwin.txt: Switch to python 3.9 --- build/pkgs/_prereq/distros/cygwin.txt | 2 +- build/pkgs/python3/distros/cygwin.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt index 635afe8f9c9..115d2555745 100644 --- a/build/pkgs/_prereq/distros/cygwin.txt +++ b/build/pkgs/_prereq/distros/cygwin.txt @@ -13,7 +13,7 @@ binutils make m4 # a system python is needed for downloading the sage packages, https://trac.sagemath.org/ticket/29090 -python37-urllib3 python37 +python39-urllib3 python39 perl perl-ExtUtils-MakeMaker tar diff --git a/build/pkgs/python3/distros/cygwin.txt b/build/pkgs/python3/distros/cygwin.txt index b8611cad54e..72e7cb73847 100644 --- a/build/pkgs/python3/distros/cygwin.txt +++ b/build/pkgs/python3/distros/cygwin.txt @@ -1,2 +1,2 @@ # as of #27824, we use python3 for venv as well -python38-devel +python39-devel From 65418dec55872e7daa196cd13d2568ed66552b45 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 28 Dec 2021 09:38:15 -0800 Subject: [PATCH 02/62] .github/workflows/ci-cygwin*.yml: Use python39 --- .github/workflows/ci-cygwin-minimal.yml | 30 ++++++++++++------------ .github/workflows/ci-cygwin-standard.yml | 30 ++++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml index 9e847e74740..2219fad576b 100644 --- a/.github/workflows/ci-cygwin-minimal.yml +++ b/.github/workflows/ci-cygwin-minimal.yml @@ -43,7 +43,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - name: tox run: | @@ -103,7 +103,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - name: tox run: | @@ -168,7 +168,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -238,7 +238,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -306,7 +306,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -374,7 +374,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -442,7 +442,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -514,7 +514,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -586,7 +586,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -658,7 +658,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -728,7 +728,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -796,7 +796,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -864,7 +864,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -932,7 +932,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -1000,7 +1000,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml index cbbe0f46a8b..38267d591f9 100644 --- a/.github/workflows/ci-cygwin-standard.yml +++ b/.github/workflows/ci-cygwin-standard.yml @@ -43,7 +43,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - name: tox run: | @@ -103,7 +103,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - name: tox run: | @@ -168,7 +168,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -238,7 +238,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -306,7 +306,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -374,7 +374,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -442,7 +442,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -514,7 +514,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -586,7 +586,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -658,7 +658,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -728,7 +728,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -796,7 +796,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -864,7 +864,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -932,7 +932,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: @@ -1000,7 +1000,7 @@ jobs: shell: bash {0} run: | choco --version - PACKAGES="python38 python38-pip" + PACKAGES="python39 python39-pip" choco install $PACKAGES --source cygwin - uses: actions/download-artifact@v2 with: From 22d159a913e6c2a6104e1b6a9d3de9f3e09522e3 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Tue, 29 Mar 2022 18:16:24 +0100 Subject: [PATCH 03/62] better defaults for notebook launching --- build/pkgs/notebook/jupyter_notebook_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/pkgs/notebook/jupyter_notebook_config.py b/build/pkgs/notebook/jupyter_notebook_config.py index e8f44402396..723dd18940c 100644 --- a/build/pkgs/notebook/jupyter_notebook_config.py +++ b/build/pkgs/notebook/jupyter_notebook_config.py @@ -10,3 +10,7 @@ # See https://github.com/jupyter/notebook/issues/3249 c.FileContentsManager.delete_to_trash = False + +# redirect file is not always working, e.g. with WSL, +# see https://github.com/jupyter/jupyter_core/issues/191 +c.NotebookApp.use_redirect_file=False From b6f0404faf0cfc03baaebb07aa180d3310419c4f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 12:29:39 -0700 Subject: [PATCH 04/62] src/doc/en/installation/index.rst: Point to conda section in the manual, not the wiki --- src/doc/en/installation/conda.rst | 7 +++++++ src/doc/en/installation/index.rst | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 153456747eb..2b2cda9bd12 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -27,6 +27,8 @@ which uses a faster dependency solver than `conda`. conda install mamba +.. _sec-installation-conda-binary: + Installing all of SageMath from conda (not for development) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -45,6 +47,8 @@ To use Sage from there, * Start SageMath: ``sage`` +.. _sec-installation-conda-source: + Using conda to provide system packages for the Sage distribution ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -75,6 +79,9 @@ prepare for installing SageMath from source: $ ./configure --prefix=$CONDA_PREFIX $ make + +.. _sec-installation-conda-develop: + Using conda to provide all dependencies for the Sage library (experimental) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/doc/en/installation/index.rst b/src/doc/en/installation/index.rst index 4eb3a660e09..529daa4eb41 100644 --- a/src/doc/en/installation/index.rst +++ b/src/doc/en/installation/index.rst @@ -29,8 +29,8 @@ SageMath release. - Then build SageMath from source as described in section :ref:`sec-installation-from-sources`. - - Alternatively, follow the instructions in the SageMath wiki on - `Conda for Sage Developers `_; + - Alternatively, follow the instructions in section + :ref:`sec-installation-conda-develop`; these describe an experimental method that gets all required packages, including Python packages, from conda-forge. @@ -67,8 +67,8 @@ SageMath release. - Then build SageMath from source as described in section :ref:`sec-installation-from-sources`. - - Alternatively, follow the instructions in the SageMath wiki on - `Conda for Sage Developers `_; + - Alternatively, follow the instructions in section + :ref:`sec-installation-conda-develop`; these describe an experimental method that gets all required packages, including Python packages, from conda-forge. From 6cf090ebcf03e4b5600d40419716dec3a39330c2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 12:52:18 -0700 Subject: [PATCH 05/62] README.md: Point first to the decision tree in the installation guide; remove mention of binaries --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0771a11e7ac..b2ac8e5ba90 100644 --- a/README.md +++ b/README.md @@ -19,17 +19,14 @@ for modules and functions list the authors. Getting Started --------------- -If you downloaded a [binary](https://www.sagemath.org/download.html) -(i.e. a version of SageMath prepared for a specific operating system), -Sage is ready to start -- just open a terminal in the directory where -you extracted the binary archive and type: - - $ ./sage - -(Note that the first run will take more time, as Sage needs to get itself ready.) - -If you downloaded the [sources](https://www.sagemath.org/download-source.html), -please read below on how to build Sage and work around common issues. +The [Sage Installation Guide](https://doc.sagemath.org/html/en/installation/index.html) +provides a decision tree that guides you to the type of installation +that will work best for you. + +If you have already cloned the git repository or downloaded the +[sources](https://www.sagemath.org/download-source.html) in the form +of a tarball, please read the self-contained instructions below on how +to build Sage and work around common issues. If you have questions or encounter problems, please do not hesitate to email the [sage-support mailing list](https://groups.google.com/group/sage-support) From 296fd12e8b5316fa9117a009a27c062e28ceb03f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 12:52:39 -0700 Subject: [PATCH 06/62] README.md: Prefer WSL to Cygwin --- README.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b2ac8e5ba90..e99c549a31d 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Supported Platforms ------------------- Sage attempts to support all major Linux distributions, recent versions of -macOS, and Windows (using Cygwin, Windows Subsystem for Linux, or +macOS, and Windows (using Windows Subsystem for Linux, Cygwin, or virtualization). Detailed information on supported platforms for a specific version of Sage @@ -59,8 +59,17 @@ and follow the instructions on [Windows] Preparing the Platform -------------------------------- -The 64-bit version of Cygwin, also known as Cygwin64, is the current -target for Sage support on Windows. +The preferred way to run Sage on Windows is using the [Windows Subsystem for +Linux](https://docs.microsoft.com/en-us/windows/wsl/faq), which allows +you to install a standard Linux distribution such as Ubuntu within +your Windows. Then all instructions for installation in Linux apply. + +As an alternative, you can also run Linux on Windows using Docker (see +above) or other virtualization solutions. + +Finally, Sage also works on the 64-bit version of `Cygwin +`_. If you wish to use Cygwin, use the following +instructions to get started. 1. Download [cygwin64](https://cygwin.com/install.html) (do not get the 32-bit version; it is not supported by Sage). @@ -109,14 +118,6 @@ target for Sage support on Windows. $ install apt-cyg /usr/local/bin $ rm -f apt-cyg -An alternative to Cygwin is to use [Windows Subsystem for -Linux](https://docs.microsoft.com/en-us/windows/wsl/faq), which allows -you to install a standard Linux distribution such as Ubuntu within -your Windows. Then all instructions for installation in Linux apply. - -As another alternative, you can also run Linux on Windows using Docker -(see above) or other virtualization solutions. - [macOS] Preparing the Platform ------------------------------ From 9140ee7b387b22159fcec47bd8b85672cb402716 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 12:58:58 -0700 Subject: [PATCH 07/62] README.md [macOS]: Only need the Xcode CLT, not actual Xcode; remove instructions for ancient macOS --- README.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e99c549a31d..9413192e5b5 100644 --- a/README.md +++ b/README.md @@ -121,17 +121,9 @@ instructions to get started. [macOS] Preparing the Platform ------------------------------ -Make sure you have installed the most current version of Xcode -supported on your version of macOS. If you don't, either go to -https://developer.apple.com/, sign up, and download the free Xcode -package, or get it from Apple's app store. - -You also need to install the "command line tools": After installing -Xcode, run `xcode-select --install` from a terminal window; then click -"Install" in the pop-up window. (When using Mountain Lion or earlier, -you need to install the command line tools from Xcode: run Xcode; then -from the File menu, choose "Preferences", then the "Downloads" tab, -and then "Install" the Command Line Tools.) +You will need the Xcode Command Line Tools. Open a terminal window +and run `xcode-select --install`; then click "Install" in the pop-up +window. Optionally, you can consider installing Homebrew ("the missing package manager for macOS") from https://brew.sh/, which can provide libraries From 9cef218fd4ee492eda468d12120f65f138d362f4 Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Tue, 5 Apr 2022 16:39:00 -0400 Subject: [PATCH 08/62] typos in developer's guide, indicate sage directory --- src/doc/en/developer/walk_through.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/en/developer/walk_through.rst b/src/doc/en/developer/walk_through.rst index 158127070d5..bea22fd5c4c 100644 --- a/src/doc/en/developer/walk_through.rst +++ b/src/doc/en/developer/walk_through.rst @@ -116,7 +116,7 @@ Sage source code and which you can upload to trac tickets. To begin with, type the command ``git branch``. You will see the following:: - [user@localhost]$ git branch + [user@localhost sage]$ git branch * develop master @@ -144,7 +144,7 @@ to it. For this, you have to use ``git checkout``:: Now if you use the command ``git branch``, you will see the following:: - [user@localhost]$ git branch + [user@localhost sage]$ git branch develop * last_twin_prime master From 9df503518c30002e2badb5de9e443c6cf79f09ed Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 13:34:21 -0700 Subject: [PATCH 09/62] src/doc/en/installation/source.rst: Remove instructions for ancient OS X versions --- src/doc/en/installation/source.rst | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst index f06e9e0d633..b0b18ed1410 100644 --- a/src/doc/en/installation/source.rst +++ b/src/doc/en/installation/source.rst @@ -265,23 +265,15 @@ On macOS systems, you need a recent version of `Command Line Tools `_. It provides all the above requirements. +Run the command ``xcode-select --install`` from a Terminal window and click "Install" +in the pop-up dialog box. + If you have already installed `Xcode `_ (which at the time of writing is freely available in the Mac App Store, or through https://developer.apple.com/downloads/ provided you registered for an Apple Developer account), you can install the command line tools from there as well. -- With OS X Mavericks or Yosemite, run the command - ``xcode-select --install`` from a Terminal window and click "Install" - in the pop-up dialog box. - -- Using OS X Mountain Lion or earlier, run Xcode, open its "Downloads" - preference pane and install the command line tools from there. - -- On pre-Lion macOS systems, the command line tools are not available as a - separate download and you have to install the full-blown Xcode supporting your - system version. - If you have not installed `Xcode `_ you can get these tools as a relatively small download, but it does require a registration. @@ -1308,4 +1300,4 @@ the directory where you want to install Sage. -**This page was last updated in December 2021 (Sage 9.5).** +**This page was last updated in April 2022 (Sage 9.6).** From 0bb7e3620b871344d3bce41c67d469e18d5d6b74 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 14:03:46 -0700 Subject: [PATCH 10/62] README.md, src/doc/en/installation/source.rst: Update Python versions --- README.md | 4 ++-- src/doc/en/installation/source.rst | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9413192e5b5..f3cac26daff 100644 --- a/README.md +++ b/README.md @@ -221,8 +221,8 @@ in the Installation Guide. ``ExtUtils::MakeMaker``), `ranlib`, `git`, `tar`, `bc`. - Python 3.4 or later, or Python 2.7, a full installation including - `urllib`; but ideally version 3.7.x, 3.8.x, or 3.9.x, which will - avoid having to build Sage's own copy of Python 3. + `urllib`; but ideally version 3.7.x, 3.8.x, 3.9.x, or 3.10.x, which + will avoid having to build Sage's own copy of Python 3. We have collected lists of system packages that provide these build prerequisites. See, in the folder diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst index b0b18ed1410..d5900560188 100644 --- a/src/doc/en/installation/source.rst +++ b/src/doc/en/installation/source.rst @@ -147,24 +147,26 @@ Python for venv ^^^^^^^^^^^^^^^ By default, Sage will try to use system's `python3` to set up a virtual -environment, a.k.a. `venv `_ +environment, a.k.a. `venv `_ rather than building a Python 3 installation from scratch. -Use the configure option ``--without-system-python3`` in case you want Python 3 +Use the ``configure`` option ``--without-system-python3`` in case you want Python 3 built from scratch. -Sage will accept versions 3.7.x to 3.9.x. +Sage will accept versions 3.7.x to 3.10.x. You can also use ``--with-python=/path/to/python3_binary`` to tell Sage to use ``/path/to/python3_binary`` to set up the venv. Note that setting up venv requires a number of Python modules to be available within the Python in question. Currently, -for Sage 9.2, these modules are as follows: sqlite3, ctypes, math, hashlib, crypt, -readline, socket, zlib, distutils.core - they will be checked for by configure. +for Sage 9.2, these modules are as follows: ``sqlite3``, ``ctypes``, ``math``, +``hashlib``, ``crypt``, ``readline``, ``socket``, ``zlib``, ``distutils.core`` - +they will be checked for by the ``configure`` script. Other notes ^^^^^^^^^^^ -After extracting the Sage tarball, the subdirectory :file:`upstream` +After extracting the Sage source tarball, the subdirectory :file:`upstream` contains the source distributions for everything on which Sage depends. + If cloned from a git repository, the upstream tarballs will be downloaded, verified, and cached as part of the Sage installation process. We emphasize that all of this software is included with Sage, so you do not From 42b8e47672fa710ff85de9700f6380053482b929 Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Tue, 5 Apr 2022 18:03:08 -0400 Subject: [PATCH 11/62] fix a typo in developer/tools document --- src/doc/en/developer/tools.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/en/developer/tools.rst b/src/doc/en/developer/tools.rst index 77966e4f203..bc255c64c28 100644 --- a/src/doc/en/developer/tools.rst +++ b/src/doc/en/developer/tools.rst @@ -36,7 +36,7 @@ The tox configuration ``SAGE_ROOT/src/tox.ini`` can be invoked by using the comm you can just type ``tox`` instead.) This configuration provides an entry point for various testing/linting methods, -known as "tox environments". We can type ``./sage --advanced`` so see what is +known as "tox environments". We can type ``./sage --advanced`` to see what is available:: $ ./sage --advanced From b46c95330f6dc55e547dc9a85783195e16ac7432 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 15:46:41 -0700 Subject: [PATCH 12/62] README: Document --enable-editable and --enable-download-from-upstream-url --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index f3cac26daff..130ce6739e0 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,25 @@ in the Installation Guide. $ ./configure --help + Some notable options for Sage developers are the following: + + - Use `./configure --enable-editable` to configure the Sage distribution + to install the Sage library in "develop" ("editable", "in-place") mode + instead of using the Sage library's custom incremental build system. + + It has the benefit that to try out changes to Python files, one does not + need to run `./sage -b` any more; restarting Sage is enough. It may also + have benefits in certain develop environments that get confused by + sagelib's custom build system. + + Note that in an editable install, the source directory will be cluttered + with build artifacts (but they are `.gitignored`). This is normal. + + - Use `./configure --enable-download-from-upstream-url` to allow + downloading packages from their upstream URL if they cannot (yet) be + found on the Sage mirrors. This is useful for trying out ticket branches + that make package upgrades. + 9. Optional, but highly recommended: Set some environment variables to customize the build. From a3ffe84a836b5da8d7cd15c13eaef639b240f8cf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 16:12:43 -0700 Subject: [PATCH 13/62] README.md: Instructions for Apple Silicon --- README.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 130ce6739e0..cb852581421 100644 --- a/README.md +++ b/README.md @@ -121,13 +121,34 @@ instructions to get started. [macOS] Preparing the Platform ------------------------------ -You will need the Xcode Command Line Tools. Open a terminal window -and run `xcode-select --install`; then click "Install" in the pop-up -window. - -Optionally, you can consider installing Homebrew ("the missing package -manager for macOS") from https://brew.sh/, which can provide libraries -such as `gfortran`, `gmp`, etc. +If you wish to use conda, please see the [section on +conda](https://doc.sagemath.org/html/en/installation/conda.html) in the Sage +Installation Manual for guidance instead of the following instructions. + +In installations without conda, we strongly recommend to use Homebrew ("the +missing package manager for macOS") from https://brew.sh/, which provides +the ``gfortran`` compiler and many libraries. + +If your Mac uses the Apple Silicon (M1, arm64) architecture: + +- Using Homebrew is required because it provides a version of ``gfortran`` + with necessary changes for this platform that are not in a released upstream + version of GCC. (The ``gfortran`` package that comes with the Sage + distribution is not suitable for the M1.) + +- If you set up your Mac by transfering files from an older Mac, make sure + that the directory ``/usr/local`` does not contain an old copy of Homebrew + (or other software) for the x86_64 architecture that you may have copied + over. Note that Homebrew for the M1 is installed in ``/opt/homebrew``, not + ``/usr/local``. + +If your Mac uses the Intel (x86_64) architecture: + +- If you do not wish to install Homebrew, you will need to install the latest + version of Xcode Command Line Tools. Open a terminal window and run + `xcode-select --install`; then click "Install" in the pop-up window. + If the Xcode Command Line Tools are already installed, you may want to + check if they need to be updated by typing `softwareupdate -l`. Instructions to Build from Source --------------------------------- From d7708df1528d4e50301c7e2c1a4ed31ca5a1fe72 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 16:21:41 -0700 Subject: [PATCH 14/62] README.md: Restructure macOS prep instructions --- README.md | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index cb852581421..3c04c604a57 100644 --- a/README.md +++ b/README.md @@ -121,34 +121,39 @@ instructions to get started. [macOS] Preparing the Platform ------------------------------ -If you wish to use conda, please see the [section on -conda](https://doc.sagemath.org/html/en/installation/conda.html) in the Sage -Installation Manual for guidance instead of the following instructions. - -In installations without conda, we strongly recommend to use Homebrew ("the -missing package manager for macOS") from https://brew.sh/, which provides -the ``gfortran`` compiler and many libraries. - If your Mac uses the Apple Silicon (M1, arm64) architecture: -- Using Homebrew is required because it provides a version of ``gfortran`` - with necessary changes for this platform that are not in a released upstream - version of GCC. (The ``gfortran`` package that comes with the Sage - distribution is not suitable for the M1.) - - If you set up your Mac by transfering files from an older Mac, make sure that the directory ``/usr/local`` does not contain an old copy of Homebrew (or other software) for the x86_64 architecture that you may have copied over. Note that Homebrew for the M1 is installed in ``/opt/homebrew``, not ``/usr/local``. +- If you wish to use conda, please see the [section on + conda](https://doc.sagemath.org/html/en/installation/conda.html) in the Sage + Installation Manual for guidance. + +- Otherwise, using Homebrew ("the missing package manager for macOS") from + https://brew.sh/ required because it provides a version of ``gfortran`` with + necessary changes for this platform that are not in a released upstream + version of GCC. (The ``gfortran`` package that comes with the Sage + distribution is not suitable for the M1.) + If your Mac uses the Intel (x86_64) architecture: -- If you do not wish to install Homebrew, you will need to install the latest - version of Xcode Command Line Tools. Open a terminal window and run - `xcode-select --install`; then click "Install" in the pop-up window. - If the Xcode Command Line Tools are already installed, you may want to - check if they need to be updated by typing `softwareupdate -l`. +- If you wish to use conda, please see the [section on + conda](https://doc.sagemath.org/html/en/installation/conda.html) in the Sage + Installation Manual for guidance. + +- Otherwise, we strongly recommend to use Homebrew ("the missing package + manager for macOS") from https://brew.sh/, which provides the ``gfortran`` + compiler and many libraries. + +- Otherwise, if you do not wish to install Homebrew, you will need to install + the latest version of Xcode Command Line Tools. Open a terminal window and + run `xcode-select --install`; then click "Install" in the pop-up window. If + the Xcode Command Line Tools are already installed, you may want to check if + they need to be updated by typing `softwareupdate -l`. Instructions to Build from Source --------------------------------- From 2e1d22d63fa6b4968ede6f2f69ac15d3a7a1a064 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 16:48:31 -0700 Subject: [PATCH 15/62] src/doc/en/installation/source.rst: Remove instructions for Solaris, AIX, HP-UX --- src/doc/en/installation/source.rst | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst index d5900560188..906cad5599a 100644 --- a/src/doc/en/installation/source.rst +++ b/src/doc/en/installation/source.rst @@ -433,27 +433,6 @@ Specific notes for ``make`` and ``tar`` On macOS, the system-wide BSD ``tar`` supplied will build Sage, so there is no need to install the GNU ``tar``. -On Solaris or OpenSolaris, the Sun/Oracle versions of ``make`` and ``tar`` are -unsuitable for building Sage. -Therefore, you must have the GNU versions of ``make`` and ``tar`` installed and -they must be the first ``make`` and ``tar`` in your :envvar:`PATH`. - -On Solaris 10, a version of GNU ``make`` may be found at -:file:`/usr/sfw/bin/gmake`, -but you will need to copy it somewhere else and rename it to ``make``. -The same is true for GNU ``tar``; a version of GNU ``tar`` may be found at -:file:`/usr/sfw/bin/gtar`, -but it will need to be copied somewhere else and renamed to ``tar``. -It is recommended to create a directory :file:`$HOME/bins-for-sage` and to put -the GNU versions of ``tar`` and ``make`` in that directory. -Then ensure that :file:`$HOME/bins-for-sage` is first in your :envvar:`PATH`. -That's because Sage also needs :file:`/usr/ccs/bin` in your :envvar:`PATH` to -execute programs like ``ar`` and ``ranlib``, but :file:`/usr/ccs/bin` has the -Sun/Oracle versions of ``make`` and ``tar`` in it. - -If you attempt to build Sage on AIX or HP-UX, you will need to install both -GNU ``make`` and GNU ``tar``. - .. _section_compilers: Using alternative compilers From 9ca39a275edec33fbc256193e2823c90218cf208 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 17:36:05 -0700 Subject: [PATCH 16/62] README.md: Point to developer guide for git details --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3c04c604a57..93b1d566829 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ in the Installation Guide. - [Cygwin] Avoid building in home directories of Windows domain users or in paths with capital letters. -2. Download/unpack the sources. +2. Download/unpack or clone the sources. - Go to https://www.sagemath.org/download-source.html, select a mirror, and download the file :file:`sage-x.y.tar.gz`. @@ -214,12 +214,16 @@ in the Installation Guide. $ cd sage-x.y/ # adapt x.y - - [Git] Alternatively, clone the Sage git repository: + - [Git] Alternatively, and required for Sage development, clone the Sage + git repository: $ ORIG=https://github.com/sagemath/sage.git $ git clone -c core.symlinks=true --branch develop --tags $ORIG - This will create the directory `sage`. + This will create the directory `sage`. (See the section + [Setting up git](https://doc.sagemath.org/html/en/developer/git_setup.html) + and the following sections in the Sage Developer's Guide + for more information.) Change into it and pick the branch you need, typically the latest development branch: From f1e1166e90ec89a10be2754808e015dfdc82936b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 17:42:56 -0700 Subject: [PATCH 17/62] src/doc/en/installation/source.rst: Point to README.md for step-by-step instructions --- src/doc/en/installation/source.rst | 34 +++++++----------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst index 906cad5599a..34b44aea2e3 100644 --- a/src/doc/en/installation/source.rst +++ b/src/doc/en/installation/source.rst @@ -14,41 +14,23 @@ Install from Source Code .. contents:: Table of contents :depth: 2 -More familiarity with computers may be required to build Sage from -the :wikipedia:`source code `. -If you do have all the :ref:`pre-requisite tools `, -the process should be completely -painless, basically consisting in extracting the source tarball and typing -``make``. It can take your computer a while to build Sage from the source code, -although the procedure is fully automated and should need no human -intervention. +Some familiarity with the use of the Unix command line may be required to +build Sage from the :wikipedia:`source code `. Building Sage from the source code has the major advantage that your install will be optimized for your particular computer and should therefore offer better performance and compatibility than a binary install. + Moreover, it offers you full development capabilities: you can change absolutely any part of Sage or the programs on which it depends, and recompile the modified parts. -`Download the Sage source code `_ -or get it from the `git repository `_. -Note: if you are installing Sage for development, you should rather follow -the instructions in -`The Sage Developer's Guide `_. - -It is also possible to download a -`binary distribution `_ -for some operating systems, rather than compiling from source. - -Supported platforms -------------------- - -Sage runs on all major :wikipedia:`Linux ` -distributions, `macOS `_ , and Windows -(via the `Cygwin `_ Linux API layer). +See the file `README.md `_ +in ``SAGE_ROOT`` for information on supported platforms and +step-by-step instructions. -Other installation options for Windows are using the Windows Subsystem -for Linux (WSL), or with the aid of a :wikipedia:`virtual machine `. +The following sections provide some additional details. Most users +will not need to read them. .. _section-prereqs: From 3f6c6e00e6cc8a4d593ab4d0a80ab0cb22bfebc1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Apr 2022 20:04:41 -0700 Subject: [PATCH 18/62] src/doc/en/developer/workspace.rst: Link to Trac #30500 --- src/doc/en/developer/coding_basics.rst | 2 +- src/doc/en/developer/workspace.rst | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 3dc549e71a7..76989fa5923 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -1283,7 +1283,7 @@ whitespace, see https://www.emacswiki.org/emacs/DeletingWhitespace for various solutions. If you use another editor, we recommend to configure it so you do not -add tabs to files. +add tabs to files. See :ref:`section-ide`. Global Options diff --git a/src/doc/en/developer/workspace.rst b/src/doc/en/developer/workspace.rst index 238f171fd82..fcca167149a 100644 --- a/src/doc/en/developer/workspace.rst +++ b/src/doc/en/developer/workspace.rst @@ -6,10 +6,19 @@ Setting up your workspace ========================= +.. _section-ide: + +Configuring text editors and IDEs for use with Sage +=================================================== + +In Meta-ticket :trac:`30500` we are collecting instructions how to configure +various text editors and IDEs for use with Sage. + + .. _section-gitpod: Gitpod -================= +====== `Gitpod `_ is a free service that will let you build and run Sage from an online development environment based on VS Code. From 8716d800b03eb0ce2a19b5dfcc51c7282c9bfcff Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 6 Apr 2022 10:35:44 -0700 Subject: [PATCH 19/62] src/doc/en/installation/source.rst: Update required venv Python extension modules from build/pkgs/python3/spkg-configure.m4 --- src/doc/en/installation/source.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst index 34b44aea2e3..dc24eb9f0dd 100644 --- a/src/doc/en/installation/source.rst +++ b/src/doc/en/installation/source.rst @@ -139,8 +139,8 @@ Sage will accept versions 3.7.x to 3.10.x. You can also use ``--with-python=/path/to/python3_binary`` to tell Sage to use ``/path/to/python3_binary`` to set up the venv. Note that setting up venv requires a number of Python modules to be available within the Python in question. Currently, -for Sage 9.2, these modules are as follows: ``sqlite3``, ``ctypes``, ``math``, -``hashlib``, ``crypt``, ``readline``, ``socket``, ``zlib``, ``distutils.core`` - +for Sage 9.6, these modules are as follows: ``sqlite3``, ``ctypes``, ``math``, +``hashlib``, ``crypt``, ``socket``, ``zlib``, ``distutils.core``, ``ssl`` - they will be checked for by the ``configure`` script. Other notes From 88b04d4979b70f8b8b2fa58d9d0132f28c1f16de Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 8 Apr 2022 16:09:04 -0700 Subject: [PATCH 20/62] src/doc/en/developer/manual_git.rst: Do not recommend mixed sagetrac-mirror / trac operation when using VS Code --- src/doc/en/developer/manual_git.rst | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/doc/en/developer/manual_git.rst b/src/doc/en/developer/manual_git.rst index 61404ffa7c5..b7fd1b96e34 100644 --- a/src/doc/en/developer/manual_git.rst +++ b/src/doc/en/developer/manual_git.rst @@ -42,16 +42,19 @@ repository, use these commands:: [user@localhost sage]$ git remote add trac https://github.com/sagemath/sagetrac-mirror.git -t master [user@localhost sage]$ git remote set-url --push trac git@trac.sagemath.org:sage.git + +Instead of ``trac`` you can use any other name you want, of course. +To verify that it is set up correctly:: + [user@localhost sage]$ git remote -v origin https://github.com/sagemath/sage.git (fetch) origin https://github.com/sagemath/sage.git (push) trac https://github.com/sagemath/sagetrac-mirror.git (fetch) trac git@trac.sagemath.org:sage.git (push) -Instead of ``trac`` you can use any local name you want, of course. It -is perfectly fine to have multiple remote repositories for git, think -of them as bookmarks. You can then use ``git pull`` to get changes and -``git push`` to upload your local changes using:: +It is perfectly fine to have multiple remote repositories for git, +think of them as bookmarks. You can then use ``git pull`` to get +changes and ``git push`` to upload your local changes using:: [user@localhost sage]$ git trac [ARGS] @@ -65,19 +68,20 @@ of them as bookmarks. You can then use ``git pull`` to get changes and tell git which branch you want to get from trac. See the :ref:`section-git-checkout` section for examples. -We set up the remote here to perform read-only operations (``fetch``) -using HTTPS from a mirror of the trac repository and write -operations (``push``) using the ssh protocol (specified by the ``git@`` -part). - -Note that to use the ssh protocol, you -need to have a trac account and to set up your ssh public key as -described in `Trac authentication through ssh +Note that write operations (``push``) use the ssh protocol (specified by the ``git@`` +part). For this to work, you need to have a trac account and to set up your ssh public +key as described in `Trac authentication through ssh `_. Authentication is necessary if you want to upload anything to ensure that it really is from you. -If you want to use ssh only, use the following commands instead:: +The above instructions set up the remote to perform read-only operations (``fetch``) +using HTTPS from a mirror of the trac repository instead. The mirror is faster and +more reliable than our git server. However, this configuration is not recommended if +you use VS Code as an IDE. + +If you want to use ssh only for both ``fetch`` and ``push``, use the +following commands instead:: [user@localhost sage]$ git remote add trac git@trac.sagemath.org:sage.git -t master [user@localhost sage]$ git remote -v From fc7aa4fec734969d09ab127a775a9501b74d1911 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 8 Apr 2022 18:10:46 -0700 Subject: [PATCH 21/62] src/doc/en/developer/advanced_git.rst: Mention git log --first-parent --- src/doc/en/developer/advanced_git.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doc/en/developer/advanced_git.rst b/src/doc/en/developer/advanced_git.rst index 44794849a55..b9fa45d288a 100644 --- a/src/doc/en/developer/advanced_git.rst +++ b/src/doc/en/developer/advanced_git.rst @@ -171,7 +171,8 @@ successfully, it would be possible to merge in our branch ``some_code`` into develop. This would produce the same source files and avoid unnecessary recompilations. However, it makes reading git's history very unpleasant: For example, it is hard to keep track of changes etc., -as one cannot simply pursue the first parent of each git commit. +as one cannot simply pursue the first parent of each git commit +(``git log --first-parent``). .. _section-git-recovery: From aa9faaab875780c2e90f4edb51c98bdc9396bbc7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 8 Apr 2022 18:21:23 -0700 Subject: [PATCH 22/62] src/doc/en/developer: move "git the hard way" earlier, present "git-trac" only as an additional convenience --- src/doc/en/developer/advanced_git.rst | 3 +- src/doc/en/developer/git_background.rst | 3 +- src/doc/en/developer/git_trac.rst | 41 +++++-------------------- src/doc/en/developer/index.rst | 38 ++++++----------------- src/doc/en/developer/manual_git.rst | 16 +++------- src/doc/en/developer/trac.rst | 14 ++++++--- src/doc/en/developer/walk_through.rst | 20 ++++++++---- 7 files changed, 48 insertions(+), 87 deletions(-) diff --git a/src/doc/en/developer/advanced_git.rst b/src/doc/en/developer/advanced_git.rst index b9fa45d288a..cb5422cfb3a 100644 --- a/src/doc/en/developer/advanced_git.rst +++ b/src/doc/en/developer/advanced_git.rst @@ -10,8 +10,7 @@ This chapter covers some advanced uses of git that go beyond what is required to work with branches. These features can be used in Sage development, but are not really necessary to contribute to Sage. If you are just getting started with Sage development, you should read -:ref:`chapter-walkthrough` instead. If you are new to git, please see -:ref:`chapter-manual-git`. +:ref:`chapter-walkthrough` and :ref:`chapter-manual-git` instead. Detached Heads and Reviewing Tickets diff --git a/src/doc/en/developer/git_background.rst b/src/doc/en/developer/git_background.rst index 7ec990ca365..dbea3ed11eb 100644 --- a/src/doc/en/developer/git_background.rst +++ b/src/doc/en/developer/git_background.rst @@ -7,8 +7,7 @@ Tips and References =================== This chapter contains additional material about the git revision -control system. It is not necessary if you stick with the Sage -development scripts. See :ref:`chapter-git-setup` for the minimal +control system. See :ref:`chapter-git-setup` for the minimal steps needed for Sage development. diff --git a/src/doc/en/developer/git_trac.rst b/src/doc/en/developer/git_trac.rst index 7b626e75239..580c791ce60 100644 --- a/src/doc/en/developer/git_trac.rst +++ b/src/doc/en/developer/git_trac.rst @@ -2,42 +2,21 @@ .. _chapter-git_trac: -======================================= -Collaborative Development with Git-Trac -======================================= - -Sometimes you will only want to work on local changes to Sage, for -your own private needs. However, typically it is beneficial to -share code and ideas with others; the manner in which the -`Sage project `_ does this (as well as fixing -bugs and upgrading components) is in a very collaborative and -public setting on `the Sage Trac server `_ -(the Sage bug and enhancement tracker). - -One can use ``git`` :ref:`the hard way ` for this, -but this section explains how to use the helper ``git trac`` command, which -simplifies many of the most common actions in collaboration on Sage. Some -of the :ref:`tutorials ` we suggest may be helpful -in navigating what they are for. - -Most of the commands in the following section will not work unless -you have an account on Trac. If you want to contribute to Sage, it -is a good idea to get an account now (see :ref:`section-trac-account`). +==================================== +Optional: Using the Git-Trac Command +==================================== +Git is a separate project from trac, and the two do not know how to +talk to each other. To simplify the development, we have a special +``git trac`` subcommand for the git suite. Note that this really is +only to simplify interaction with our trac issue management, you can +perform every development task with just git and a web browser. .. _section-git_trac-install: Installing the Git-Trac Command =============================== -Git is a separate project from trac, and the two do not know how to -talk to each other. To simplify the development, we have a special -``git trac`` subcommand for the git suite. Note that this really is -only to simplify interaction with our trac issue management, you can -perform every development task with just git and a web browser. See -:ref:`chapter-manual-git` instead if you prefer to do everything by -hand:: - [user@localhost]$ git clone https://github.com/sagemath/git-trac-command.git Cloning into 'git-trac-command'... [...] @@ -149,10 +128,6 @@ secured with SSH keys, which you must have set up as in :ref:`section-trac-ssh-key`. Read-only access happens through the fetch url and does not require SSH. -Finally, if you do not want to use the ``git trac`` subcommand at all -then you can set up the remote by hand as described in the section on -:ref:`section-git-trac`. - Trac Tickets and Git Branches ============================= diff --git a/src/doc/en/developer/index.rst b/src/doc/en/developer/index.rst index c15983ba378..de24e3e3b7e 100644 --- a/src/doc/en/developer/index.rst +++ b/src/doc/en/developer/index.rst @@ -59,13 +59,12 @@ development! need to learn about revision control; we use the software Git for this purpose. - - :ref:`Here is ` an overview of our development flow. - - :ref:`Unfamiliar with Git or revision control? ` - :ref:`How to install it? ` - :ref:`How to configure it for use with Trac? ` + - :ref:`Here is ` an overview of our development flow. -Git for Sage development -======================== +Git and Trac for Sage development +================================= First Steps with Git -------------------- @@ -78,41 +77,24 @@ Sage uses git for version control. git_setup walk_through -The git-trac command --------------------- - -Putting your local changes on a Trac ticket. - -.. toctree:: - :maxdepth: 2 - - git_trac - .. _section-git-tricks-and-tips: -Git Tricks & Tips ------------------ +Using Git with Trac +------------------- -When ``git trac`` is not enough. +To contribute back your changes to Sage source code to the project, +you will need a ticket on the +`Sage trac server `_. .. toctree:: :maxdepth: 2 + trac manual_git git_background advanced_git workflows - -Sage Trac and tickets -===================== - -All changes to Sage source code require a ticket on the -`Sage trac server `_. - -.. toctree:: - :maxdepth: 2 - - trac + git_trac .. _section-writing-code-for-sage: diff --git a/src/doc/en/developer/manual_git.rst b/src/doc/en/developer/manual_git.rst index b7fd1b96e34..f82d557758e 100644 --- a/src/doc/en/developer/manual_git.rst +++ b/src/doc/en/developer/manual_git.rst @@ -2,19 +2,11 @@ .. _chapter-manual-git: -================ -Git the Hard Way -================ +=================================== +Using Git with the Sage Trac Server +=================================== -If you have no ``git`` experience, we recommend you to read the -:ref:`chapter-git_trac` chapter instead. The ``git-trac`` simplifies the -interaction with our git and trac servers. - -If you want to contribute using ``git`` only, you are at the right place. This -chapter will tell you how to do so, assuming some basic familiarity with ``git``. In -particular, you should have read :ref:`chapter-walkthrough` first. - -Randall Munroe has provided a `basic overview `_. +Now we continue our introduction to git from :ref:`chapter-walkthrough`. In the following, we assume that you are in the source directory of Sage (``SAGE_ROOT``), obtained either from a source tarball or by cloning a Sage git repository diff --git a/src/doc/en/developer/trac.rst b/src/doc/en/developer/trac.rst index 7d1eb749f71..ad7b5f1db8a 100644 --- a/src/doc/en/developer/trac.rst +++ b/src/doc/en/developer/trac.rst @@ -6,9 +6,15 @@ The Sage Trac Server ==================== -All changes to Sage source code have to go through the `Sage Trac -development server `_. The purpose -of the Sage trac server is to +Sometimes you will only want to work on local changes to Sage, for +your own private needs. However, typically it is beneficial to +share code and ideas with others; the manner in which the +`Sage project `_ does this (as well as fixing +bugs and upgrading components) is in a very collaborative and +public setting on `the Sage Trac server `_ +(the Sage bug and enhancement tracker). + +The purpose of the Sage trac server is to 1. Provide a place for discussion on issues and store a permanent record. @@ -413,7 +419,7 @@ Only the Sage release manager will close tickets. Most likely, this is not you nor will your trac account have the necessary permissions. If you feel strongly that a ticket should be closed or deleted, then change the status of the ticket to *needs review* and change the -milestone to *sage-duplictate/invalid/wontfix*. You should also +milestone to *sage-duplicate/invalid/wontfix*. You should also comment on the ticket, explaining why it should be closed. If another developer agrees, he sets the ticket to *positive review*. diff --git a/src/doc/en/developer/walk_through.rst b/src/doc/en/developer/walk_through.rst index bea22fd5c4c..a4de6f5f138 100644 --- a/src/doc/en/developer/walk_through.rst +++ b/src/doc/en/developer/walk_through.rst @@ -10,17 +10,25 @@ This section is a concise overview of the Sage development process. In it, we will see how to make changes to the Sage source code and record them in the ``git`` revision control system. -In the following section on :ref:`chapter-git_trac` we will look at -communicating these changes back to the Sage project. We also have a handy -`one-page "cheat sheet" +We also have a handy `one-page "cheat sheet" `_ of commonly used git commands that you can print out and leave on your desk. We have some :ref:`recommended references and tutorials ` as well. -You can alternatively fork and create a merge request at -`GitLab `_ which will automatically fetch -your code and open a ticket on our trac server. +In the following sections on :ref:`chapter-sage-trac` and +:ref:`section-git-tricks-and-tips` we will look at communicating these +changes back to the Sage project. All changes to Sage source code +have to go through the `Sage Trac development server +`_. + +As an alternative to using the Trac server directly, you can fork and +create a Merge Request (MR) at `GitLab `_ +which will automatically fetch your code and open a ticket on our trac +server. + +Pull Requests (PR) on GitHub are currently not supported by the +SageMath project. .. _section-walkthrough-setup-git: From 35c4dc6d8b8f8d7ee079a455b8cbab0cc8708633 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 10 Apr 2022 15:06:25 -0700 Subject: [PATCH 23/62] m4/sage_check_python_for_venv.m4: Suppress error output from python3 --- 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 a6da1f84167..da89e93a7ed 100644 --- a/m4/sage_check_python_for_venv.m4 +++ b/m4/sage_check_python_for_venv.m4 @@ -20,7 +20,7 @@ AC_DEFUN([SAGE_CHECK_PYTHON_FOR_VENV], [ dnl Otherwise, some system site-package may be providing this module to the system python. dnl m4_define([conftest_venv], [config-venv]) .... for debugging only rm -rf conftest_venv - AS_IF(["]PYTHON_EXE[" build/bin/sage-venv conftest_venv && conftest_venv/bin/python3 -c "import ]REQUIRED_MODULES["], [ + AS_IF(["]PYTHON_EXE[" build/bin/sage-venv conftest_venv && conftest_venv/bin/python3 -c "import ]REQUIRED_MODULES[" 2>& ]AS_MESSAGE_LOG_FD, [ AS_VAR_SET([python3_result], [yes]) SAGE_PYTHON_CHECK_DISTUTILS([CC="$CC" CXX="$CXX" conftest_venv/bin/python3], [ SAGE_ARCHFLAGS="unset" From f635ad162226a544c0348f2affa0fd9516565035 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Sun, 10 Apr 2022 11:33:22 +0200 Subject: [PATCH 24/62] clear cache after catching type error when obtaining Vrepresentation --- src/sage/geometry/polyhedron/backend_ppl.py | 69 ++++++++++++++++++++- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/src/sage/geometry/polyhedron/backend_ppl.py b/src/sage/geometry/polyhedron/backend_ppl.py index 3ac2bb267f7..6ac7a21ce65 100644 --- a/src/sage/geometry/polyhedron/backend_ppl.py +++ b/src/sage/geometry/polyhedron/backend_ppl.py @@ -178,9 +178,38 @@ def set_immutable(self): sage: p.set_immutable() sage: hasattr(p, "_Vrepresentation") True + + TESTS: + + Check that :trac:`33666` is fixed:: + + sage: cube = polytopes.cube() + sage: parent = cube.parent() + sage: smaller_cube_ZZ = parent._element_constructor_(1/2 * cube, mutable=True) + sage: smaller_cube_ZZ.set_immutable() + Traceback (most recent call last): + ... + TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)`` + sage: smaller_cube_ZZ.is_immutable() + False + sage: smaller_cube_ZZ.set_immutable() + Traceback (most recent call last): + ... + TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)`` + sage: smaller_cube_ZZ.is_immutable() + False + sage: smaller_cube_QQ = smaller_cube_ZZ.base_extend(QQ) + sage: smaller_cube_QQ.set_immutable() + sage: smaller_cube_QQ.is_immutable() + True """ if not hasattr(self, '_Vrepresentation'): - self._init_Vrepresentation_from_ppl(True) + try: + self._init_Vrepresentation_from_ppl(True) + except TypeError: + # Apparently the polyhedron is (no longer) integral. + self._clear_cache() + raise TypeError("the polyhedron is not integral; do a base extension ``self.base_extend(QQ)``") if not hasattr(self, '_Hrepresentation'): self._init_Hrepresentation_from_ppl(True) self._is_mutable = False @@ -221,9 +250,45 @@ def Vrepresentation(self, index=None): sage: p.Vrepresentation(0) A vertex at (-1, -1, -1) sage: TestSuite(p).run() + + TESTS: + + Check that :trac:`33666` is fixed:: + + sage: cube = polytopes.cube() + sage: parent = cube.parent() + sage: smaller_cube_ZZ = parent._element_constructor_(1/2 * cube, mutable=True) + sage: smaller_cube_ZZ.Hrepresentation() + (An inequality (0, 0, -2) x + 1 >= 0, + An inequality (0, -2, 0) x + 1 >= 0, + An inequality (-2, 0, 0) x + 1 >= 0, + An inequality (2, 0, 0) x + 1 >= 0, + An inequality (0, 0, 2) x + 1 >= 0, + An inequality (0, 2, 0) x + 1 >= 0) + sage: smaller_cube_ZZ.Vrepresentation() + Traceback (most recent call last): + ... + TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)`` + sage: smaller_cube_ZZ.Vrepresentation() + Traceback (most recent call last): + ... + TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)`` + sage: smaller_cube_QQ = smaller_cube_ZZ.base_extend(QQ) + sage: smaller_cube_QQ.Hrepresentation() + (An inequality (0, 0, -2) x + 1 >= 0, + An inequality (0, -2, 0) x + 1 >= 0, + An inequality (-2, 0, 0) x + 1 >= 0, + An inequality (2, 0, 0) x + 1 >= 0, + An inequality (0, 0, 2) x + 1 >= 0, + An inequality (0, 2, 0) x + 1 >= 0) """ if not hasattr(self, '_Vrepresentation'): - self._init_Vrepresentation_from_ppl(True) + try: + self._init_Vrepresentation_from_ppl(True) + except TypeError: + # Apparently the polyhedron is (no longer) integral. + self._clear_cache() + raise TypeError("the polyhedron is not integral; do a base extension ``self.base_extend(QQ)``") if index is None: return self._Vrepresentation else: From ed109aea4e7b1a7d334ce64de12542547954d5ed Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Mon, 11 Apr 2022 08:10:48 +0200 Subject: [PATCH 25/62] keep old type error at initialization --- src/sage/geometry/polyhedron/backend_ppl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/geometry/polyhedron/backend_ppl.py b/src/sage/geometry/polyhedron/backend_ppl.py index 6ac7a21ce65..3a5b7aa94b6 100644 --- a/src/sage/geometry/polyhedron/backend_ppl.py +++ b/src/sage/geometry/polyhedron/backend_ppl.py @@ -189,13 +189,13 @@ def set_immutable(self): sage: smaller_cube_ZZ.set_immutable() Traceback (most recent call last): ... - TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)`` + TypeError: no conversion of this rational to integer sage: smaller_cube_ZZ.is_immutable() False sage: smaller_cube_ZZ.set_immutable() Traceback (most recent call last): ... - TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)`` + TypeError: no conversion of this rational to integer sage: smaller_cube_ZZ.is_immutable() False sage: smaller_cube_QQ = smaller_cube_ZZ.base_extend(QQ) @@ -206,10 +206,10 @@ def set_immutable(self): if not hasattr(self, '_Vrepresentation'): try: self._init_Vrepresentation_from_ppl(True) - except TypeError: + except TypeError as e: # Apparently the polyhedron is (no longer) integral. self._clear_cache() - raise TypeError("the polyhedron is not integral; do a base extension ``self.base_extend(QQ)``") + raise e if not hasattr(self, '_Hrepresentation'): self._init_Hrepresentation_from_ppl(True) self._is_mutable = False From 7c46c086cf81fe32ae8e1210a89650d869831111 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 25 Mar 2022 11:45:00 -0700 Subject: [PATCH 26/62] src/bin/sage-runtests: Do not run pytest if the pytest configuration is not available --- src/bin/sage-runtests | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests index b45eb1949a7..15d7ffcd4a0 100755 --- a/src/bin/sage-runtests +++ b/src/bin/sage-runtests @@ -150,6 +150,14 @@ if __name__ == "__main__": DC = DocTestController(args, args.filenames) err = DC.run() + # Trac #33521: Do not run pytest if the pytest configuration is not available. + # This happens when the source tree is not available and SAGE_SRC falls back + # to SAGE_LIB. + from sage.env import SAGE_SRC + if not all(os.path.isfile(os.path.join(SAGE_SRC, f)) + for f in ["conftest.py", "tox.ini"]): + sys.exit(err) + try: exit_code_pytest = 0 import pytest From 84d3d9e5ca7b6d15355743f94c6c917359136998 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Apr 2022 19:48:09 -0700 Subject: [PATCH 27/62] src/bin/sage-runtests: Clarify where pytest would have to be installed --- src/bin/sage-runtests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests index 15d7ffcd4a0..1976bcee5d8 100755 --- a/src/bin/sage-runtests +++ b/src/bin/sage-runtests @@ -177,7 +177,7 @@ if __name__ == "__main__": exit_code_pytest = 0 except ModuleNotFoundError: - print("Pytest is not installed, skip checking tests that rely on it.") + print("pytest is not installed in the venv, skip checking tests that rely on it") if err == 0: sys.exit(exit_code_pytest) From 9a7edb904e68eff3fa39363470b95182e820deb0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 12 Apr 2022 09:33:16 -0700 Subject: [PATCH 28/62] Remove mention of src/module_list.py removed in #29701 --- build/pkgs/meataxe/spkg-install.in | 2 +- src/doc/en/developer/coding_basics.rst | 4 ---- src/doc/en/developer/coding_in_cython.rst | 19 +------------------ src/sage_setup/clean.py | 3 +-- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/build/pkgs/meataxe/spkg-install.in b/build/pkgs/meataxe/spkg-install.in index 0c795517cd8..09028160aa9 100644 --- a/build/pkgs/meataxe/spkg-install.in +++ b/build/pkgs/meataxe/spkg-install.in @@ -1,7 +1,7 @@ # Delete old (Shared)MeatAxe libraries. This ensures a sane state if # installation of this package fails: the mtx library should exist if # and only if meataxe is installed. In detail: the build-time check in -# src/module_list.py checks whether or not the "meataxe" package is +# src/setup.py checks whether or not the "meataxe" package is # marked as installed but the run-time check for the matrix_gfpn_dense # module checks whether it can be imported. We need to ensure that these # two conditions are equivalent, otherwise strange things can happen. diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 3dc549e71a7..96192406d7b 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -103,13 +103,9 @@ of the directory containing the Sage sources: sage # the Sage launcher Makefile # top level Makefile build/ # Sage's build system - deps - install - ... pkgs/ # install, patch, and metadata from spkgs src/ setup.py - module_list.py ... sage/ # Sage library ext_data/ # extra Sage resources (formerly src/ext) diff --git a/src/doc/en/developer/coding_in_cython.rst b/src/doc/en/developer/coding_in_cython.rst index 397758e0fba..f5aa767c3cc 100644 --- a/src/doc/en/developer/coding_in_cython.rst +++ b/src/doc/en/developer/coding_in_cython.rst @@ -66,24 +66,7 @@ There are several ways to create and build Cython code in Sage. the notebook). #. Create a ``.pyx`` file and add it to the Sage library. - - #. First, add a listing for the Cython extension to the variable - ``ext_modules`` in the file - ``SAGE_ROOT/src/module_list.py``. See the - ``distutils.extension.Extension`` class for more information on - creating a new Cython extension. - - #. Run ``sage -b`` to rebuild Sage. - - For example, in order to compile - ``SAGE_ROOT/src/sage/graphs/chrompoly.pyx``, we see the following - lines in ``module_list.py``: - - .. CODE-BLOCK:: python - - Extension('sage.graphs.chrompoly', - sources = ['sage/graphs/chrompoly.pyx'], - libraries = ['gmp']), + Then run ``sage -b`` to rebuild Sage. Attaching or Loading .spyx Files diff --git a/src/sage_setup/clean.py b/src/sage_setup/clean.py index 2c82806f75b..e37e6c9c52c 100644 --- a/src/sage_setup/clean.py +++ b/src/sage_setup/clean.py @@ -87,8 +87,7 @@ def _find_stale_files(site_packages, python_packages, python_modules, ext_module ....: ['sage', 'sage_setup'], cythonized_dir, []).items()) sage: from sage_setup.clean import _find_stale_files - TODO: move ``module_list.py`` into ``sage_setup`` and also check - extension modules:: + TODO: Also check extension modules:: sage: stale_iter = _find_stale_files(SAGE_LIB, python_packages, python_modules, [], extra_files) sage: from importlib.machinery import EXTENSION_SUFFIXES From 3480069e02d3021e9c3b42b247c9a3667cb46b75 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Apr 2022 10:35:47 -0700 Subject: [PATCH 29/62] build/pkgs/symengine/spkg-install.in: Use sdh_cmake so that CMAKE_INSTALL_PREFIX is set --- build/pkgs/symengine/spkg-install.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/symengine/spkg-install.in b/build/pkgs/symengine/spkg-install.in index d617d634e46..8eaaf6fbcbe 100644 --- a/build/pkgs/symengine/spkg-install.in +++ b/build/pkgs/symengine/spkg-install.in @@ -1,7 +1,7 @@ cd src mkdir build cd build -cmake -DCMAKE_PREFIX_PATH="$SAGE_LOCAL" \ +sdh_cmake -DCMAKE_PREFIX_PATH="$SAGE_LOCAL" \ -DWITH_SYMENGINE_THREAD_SAFE=yes \ -DWITH_ECM=yes \ -DWITH_FLINT=yes \ From ca1dc9c68bbd36e06f7c2aef17f172640bda7e83 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 16 Apr 2022 17:32:25 +0000 Subject: [PATCH 30/62] Add enable-download-from-upstream-url to github actions --- .github/workflows/build.yml | 2 +- .github/workflows/doc-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8267f3de1b0..e795a9e7ad9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: run: | # Reuse built SAGE_LOCAL contained in the Docker image ./bootstrap - ./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable + ./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable --enable-download-from-upstream-url # Install test tools apt-get install -y git ./sage -python -m pip install coverage diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 1b501600e67..32cab1e0ffb 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -23,7 +23,7 @@ jobs: run: | # Reuse built SAGE_LOCAL contained in the Docker image ./bootstrap - ./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv + ./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-download-from-upstream-url - name: Build run: make doc-html From ecd3895717f1e6434771b670fb710a29613c0855 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 17 Apr 2022 12:25:36 -0700 Subject: [PATCH 31/62] build/pkgs/giac/patches/0001-src-global.cc-Do-not-send-SIGINT-to-process-1.patch: New --- build/pkgs/giac/package-version.txt | 2 +- ...l.cc-Do-not-send-SIGINT-to-process-1.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/giac/patches/0001-src-global.cc-Do-not-send-SIGINT-to-process-1.patch diff --git a/build/pkgs/giac/package-version.txt b/build/pkgs/giac/package-version.txt index dc9d0d659ba..f490da152c5 100644 --- a/build/pkgs/giac/package-version.txt +++ b/build/pkgs/giac/package-version.txt @@ -1 +1 @@ -1.6.0.47p3 +1.6.0.47p3.p0 diff --git a/build/pkgs/giac/patches/0001-src-global.cc-Do-not-send-SIGINT-to-process-1.patch b/build/pkgs/giac/patches/0001-src-global.cc-Do-not-send-SIGINT-to-process-1.patch new file mode 100644 index 00000000000..5ab40921c98 --- /dev/null +++ b/build/pkgs/giac/patches/0001-src-global.cc-Do-not-send-SIGINT-to-process-1.patch @@ -0,0 +1,25 @@ +From 5546fba822d4816eb27c94964b96caa69989b846 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Sun, 17 Apr 2022 12:20:55 -0700 +Subject: [PATCH] src/global.cc: Do not send SIGINT to process 1 + +--- + src/global.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/global.cc b/src/global.cc +index c343aea..87e4575 100755 +--- a/src/global.cc ++++ b/src/global.cc +@@ -1978,7 +1978,7 @@ extern "C" void Sleep(unsigned int miliSecond); + void ctrl_c_signal_handler(int signum){ + ctrl_c=true; + #if !defined KHICAS && !defined NSPIRE_NEWLIB && !defined WIN32 && !defined BESTA_OS && !defined NSPIRE && !defined FXCG && !defined POCKETCAS +- if (child_id) ++ if (child_id && child_id != 1) + kill(child_id,SIGINT); + #endif + #if defined HAVE_SIGNAL_H && !defined HAVE_NO_SIGNAL_H +-- +2.35.1 + From 11f7a34ba66dc5c3407b45c360aea1cad97ef975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Labb=C3=A9?= Date: Thu, 7 Apr 2022 16:28:24 +0200 Subject: [PATCH 32/62] 33588: adding do_fixup method in the SageOutputChecker --- src/sage/doctest/parsing.py | 65 ++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 98cb73b3753..eae22ae6c05 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -946,18 +946,73 @@ def check_output(self, want, got, optionflags): if ok: return ok + # Last resort: try to fix-up the got string removing few typical warnings + did_fixup, want, got = self.do_fixup(want, got) + + if not did_fixup: + # Return the same result as before + return ok + + return doctest.OutputChecker.check_output(self, want, got, optionflags) + + def do_fixup(self, want, got): + r""" + Performs few changes to the strings ``want`` and ``got``. + + For example, remove warnings to be ignored. + + INPUT: + + - ``want`` -- a string or :class:`MarkedOutput` + - ``got`` -- a string + + OUTPUT: + + A tuple: + + - bool, True when some fixup were performed + - string, (unchanged) wanted string + - string, edited got string + + EXAMPLES:: + + sage: from sage.doctest.parsing import SageOutputChecker + sage: OC = SageOutputChecker() + sage: OC.do_fixup('1.3090169943749475','1.3090169943749475') + (False, '1.3090169943749475', '1.3090169943749475') + sage: OC.do_fixup('1.3090169943749475','ANYTHING1.3090169943749475') + (False, '1.3090169943749475', 'ANYTHING1.3090169943749475') + sage: OC.do_fixup('1.3090169943749475','Long-step dual simplex will be used\n1.3090169943749475') + (True, '1.3090169943749475', '\n1.3090169943749475') + + When ``want`` is an instance of class :class:`MarkedOutput`:: + + sage: from sage.doctest.parsing import SageOutputChecker, SageDocTestParser + sage: import doctest + sage: optflag = doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS + sage: DTP = SageDocTestParser(('sage','magma','guava')) + sage: OC = SageOutputChecker() + sage: example = "sage: 1.3090169943749475\n1.3090169943749475" + sage: ex = DTP.parse(example)[1] + sage: ex.want + '1.3090169943749475\n' + sage: OC.do_fixup(ex.want,'1.3090169943749475') + (False, '1.3090169943749475\n', '1.3090169943749475') + sage: OC.do_fixup(ex.want,'ANYTHING1.3090169943749475') + (False, '1.3090169943749475\n', 'ANYTHING1.3090169943749475') + sage: OC.do_fixup(ex.want,'Long-step dual simplex will be used\n1.3090169943749475') + (True, '1.3090169943749475\n', '\n1.3090169943749475') + + """ did_fixup = False + for quick_check, fixup in _repr_fixups: do_fixup = quick_check(got, want) if do_fixup: got, want = fixup(got, want) did_fixup = True - if not did_fixup: - # Return the same result as before - return ok - - return doctest.OutputChecker.check_output(self, want, got, optionflags) + return did_fixup, want, got def output_difference(self, example, got, optionflags): r""" From 1d337e4ef96af446735eff7ffd52576f2d4cb24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Labb=C3=A9?= Date: Thu, 7 Apr 2022 17:07:32 +0200 Subject: [PATCH 33/62] 33588: continue to compare the non-floats part of doctests when tolerance is given --- src/sage/doctest/parsing.py | 43 +++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index eae22ae6c05..f320d507c52 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -916,6 +916,22 @@ def check_output(self, want, got, optionflags): ['Fermat', 'Euler'] sage: c = 'you'; c 'you' + + This illustrates that :trac:`33588` is fixed:: + + sage: from sage.doctest.parsing import SageOutputChecker, SageDocTestParser + sage: import doctest + sage: optflag = doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS + sage: DTP = SageDocTestParser(('sage','magma','guava')) + sage: OC = SageOutputChecker() + sage: example = "sage: 1.3090169943749475 # tol 1e-8\n1.3090169943749475" + sage: ex = DTP.parse(example)[1] + sage: OC.check_output(ex.want, '1.3090169943749475', optflag) + True + sage: OC.check_output(ex.want, 'ANYTHING1.3090169943749475', optflag) + False + sage: OC.check_output(ex.want, 'Long-step dual simplex will be used\n1.3090169943749475', optflag) + True """ got = self.human_readable_escape_sequences(got) @@ -923,35 +939,34 @@ def check_output(self, want, got, optionflags): if want.random: return True elif want.tol or want.rel_tol or want.abs_tol: - # First check the doctest without the numbers + # First check that the number of float appearing match want_str = [g[0] for g in float_regex.findall(want)] got_str = [g[0] for g in float_regex.findall(got)] if len(want_str) != len(got_str): return False - starwant = float_regex.sub('*', want) - stargot = float_regex.sub('*', got) - if not doctest.OutputChecker.check_output(self, starwant, stargot, optionflags): - return False - # Now check the numbers + # Then check the numbers want_values = [RIFtol(g) for g in want_str] want_intervals = [self.add_tolerance(v, want) for v in want_values] got_values = [RIFtol(g) for g in got_str] - # The doctest is successful if the "want" and "got" - # intervals have a non-empty intersection - return all(a.overlaps(b) for a, b in zip(want_intervals, got_values)) + # The doctest is not successful if one of the "want" and "got" + # intervals have an empty intersection + if not all(a.overlaps(b) for a, b in zip(want_intervals, got_values)): + return False - ok = doctest.OutputChecker.check_output(self, want, got, optionflags) + # Then check the part of the doctests without the numbers + # Continue the check process with floats replaced by stars + want = float_regex.sub('*', want) + got = float_regex.sub('*', got) - if ok: - return ok + if doctest.OutputChecker.check_output(self, want, got, optionflags): + return True # Last resort: try to fix-up the got string removing few typical warnings did_fixup, want, got = self.do_fixup(want, got) if not did_fixup: - # Return the same result as before - return ok + return False return doctest.OutputChecker.check_output(self, want, got, optionflags) From 79071f527e440ecda24feb7d0ec303d204d8b6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Labb=C3=A9?= Date: Thu, 7 Apr 2022 17:34:18 +0200 Subject: [PATCH 34/62] 33588: using if-else is better at showing the logic structure of the cases --- src/sage/doctest/parsing.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index f320d507c52..ff008f3fa15 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -961,14 +961,13 @@ def check_output(self, want, got, optionflags): if doctest.OutputChecker.check_output(self, want, got, optionflags): return True - - # Last resort: try to fix-up the got string removing few typical warnings - did_fixup, want, got = self.do_fixup(want, got) - - if not did_fixup: - return False - - return doctest.OutputChecker.check_output(self, want, got, optionflags) + else: + # Last resort: try to fix-up the got string removing few typical warnings + did_fixup, want, got = self.do_fixup(want, got) + if did_fixup: + return doctest.OutputChecker.check_output(self, want, got, optionflags) + else: + return False def do_fixup(self, want, got): r""" From 2afb47293d0fb63f017d3e9acb6035166dfc92aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Labb=C3=A9?= Date: Mon, 18 Apr 2022 12:57:16 +0200 Subject: [PATCH 35/62] 33588: raw-string for documentation of check_output --- src/sage/doctest/parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index ff008f3fa15..d2939218bb9 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -807,7 +807,7 @@ def add_tolerance(self, wantval, want): return wantval def check_output(self, want, got, optionflags): - """ + r""" Checks to see if the output matches the desired output. If ``want`` is a :class:`MarkedOutput` instance, takes into account the desired tolerance. From ad69a5b07b86a62dd20693056208f234ba4b06b9 Mon Sep 17 00:00:00 2001 From: Release Manager Date: Tue, 19 Apr 2022 22:34:41 +0200 Subject: [PATCH 36/62] Updated SageMath version to 9.6.rc1 --- .zenodo.json | 8 ++++---- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sagelib/package-version.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index a9a5f57485d..b186023807f 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,10 +1,10 @@ { "description": "Mirror of the Sage https://sagemath.org/ source tree", "license": "other-open", - "title": "sagemath/sage: 9.6.rc0", - "version": "9.6.rc0", + "title": "sagemath/sage: 9.6.rc1", + "version": "9.6.rc1", "upload_type": "software", - "publication_date": "2022-04-10", + "publication_date": "2022-04-19", "creators": [ { "affiliation": "SageMath.org", @@ -15,7 +15,7 @@ "related_identifiers": [ { "scheme": "url", - "identifier": "https://github.com/sagemath/sage/tree/9.6.rc0", + "identifier": "https://github.com/sagemath/sage/tree/9.6.rc1", "relation": "isSupplementTo" }, { diff --git a/VERSION.txt b/VERSION.txt index 87e16176a2a..3723a0332a0 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 9.6.rc0, Release Date: 2022-04-10 +SageMath version 9.6.rc1, Release Date: 2022-04-19 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 8477e334015..6eb79408a29 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=b0bdee46694dcd644eb44afb88cc39200d9dd8d2 -md5=878189976be30e8e4079e5e2b1181f78 -cksum=311767680 +sha1=1524f97042a658d1c6b797ccaf9281ed32474930 +md5=b2db89f2ac4c76b3f6b30f57ee15171d +cksum=3697337668 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 2147688bc77..706836e510c 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -d131751682b8901ecc10738b95c2470c2a21e7a9 +9da7c13c6970e13984373574ed04410134120370 diff --git a/build/pkgs/sagelib/package-version.txt b/build/pkgs/sagelib/package-version.txt index 0e45e9855af..491046ea819 100644 --- a/build/pkgs/sagelib/package-version.txt +++ b/build/pkgs/sagelib/package-version.txt @@ -1 +1 @@ -9.6.rc0 +9.6.rc1 diff --git a/src/VERSION.txt b/src/VERSION.txt index 0e45e9855af..491046ea819 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -9.6.rc0 +9.6.rc1 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index 12f6af6cbaf..fc988085ac7 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -1,5 +1,5 @@ # Sage version information for shell scripts # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='9.6.rc0' -SAGE_RELEASE_DATE='2022-04-10' -SAGE_VERSION_BANNER='SageMath version 9.6.rc0, Release Date: 2022-04-10' +SAGE_VERSION='9.6.rc1' +SAGE_RELEASE_DATE='2022-04-19' +SAGE_VERSION_BANNER='SageMath version 9.6.rc1, Release Date: 2022-04-19' diff --git a/src/sage/version.py b/src/sage/version.py index 91b2393d614..e00e4ce00ae 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '9.6.rc0' -date = '2022-04-10' -banner = 'SageMath version 9.6.rc0, Release Date: 2022-04-10' +version = '9.6.rc1' +date = '2022-04-19' +banner = 'SageMath version 9.6.rc1, Release Date: 2022-04-19' From 8eb67b8d9de1ba7f1a48e4f443b05b8b0d7ce08b Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 20 Apr 2022 13:10:52 +0900 Subject: [PATCH 37/62] Add macro definitions recursively to latex output --- src/sage/misc/html.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/sage/misc/html.py b/src/sage/misc/html.py index 7a7e81eec60..68ddc5f3dfc 100644 --- a/src/sage/misc/html.py +++ b/src/sage/misc/html.py @@ -25,7 +25,7 @@ from sage.misc.sage_eval import sage_eval from sage.structure.sage_object import SageObject -macro_regex = re.compile(r'\\newcommand{(?P\\[a-zA-Z]+)}') +macro_regex = re.compile(r'\\newcommand{(?P\\[a-zA-Z]+)}(\[.+\])?{(?P.+)}') class HtmlFragment(str, SageObject): @@ -353,10 +353,16 @@ def eval(self, x, globals=None, locals=None, mode='display', combine_all=False): # add a macro definition only if it appears in the latex string macros_string = '' - for line in sage_latex_macros(): - m = macro_regex.match(line) - if m['name'] in latex_string: - macros_string += line + latex_macros = sage_latex_macros() + test_string = latex_string + while test_string: + new_test_string = '' + for line in latex_macros: + m = macro_regex.match(line) + if m['name'] in test_string: + macros_string += line + new_test_string += '{' + m['definition'] + '}' + test_string = new_test_string latex_string = macros_string + latex_string From 9e2190cc73f9c2064ec7001b2097b4bc805f52bf Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 20 Apr 2022 17:16:13 +0900 Subject: [PATCH 38/62] Add a test --- src/sage/misc/html.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sage/misc/html.py b/src/sage/misc/html.py index 68ddc5f3dfc..0c7524674bc 100644 --- a/src/sage/misc/html.py +++ b/src/sage/misc/html.py @@ -299,6 +299,12 @@ def eval(self, x, globals=None, locals=None, mode='display', combine_all=False): \(3\) sage: MathJax().eval(type(3), mode='inline') \(\verb|<class|\verb| |\verb|'sage.rings.integer.Integer'>|\) + + TESTS: + + sage: from sage.misc.html import MathJax + sage: MathJax().eval(IntegerModRing(6)) + \[\newcommand{\ZZ}{\Bold{Z}}\newcommand{\Bold}[1]{\mathbf{#1}}\ZZ/6\ZZ\] """ # Get a regular LaTeX representation of x x = latex(x, combine_all=combine_all) From 413b081b16ace2392d362ed54d12f166ad30cf6a Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 21 Apr 2022 11:54:53 +0000 Subject: [PATCH 39/62] Add conda dev environment --- src/doc/bootstrap | 14 ++- src/environment-dev.yml | 206 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 219 insertions(+), 1 deletion(-) create mode 100644 src/environment-dev.yml diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 4a85f15d57e..a00811223fa 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -65,7 +65,7 @@ for SYSTEM in arch debian fedora cygwin homebrew conda; do done if [ "${SYSTEM}" = "conda" ]; then if [ "${BOOTSTRAP_QUIET}" = "no" ]; then - echo >&2 $0:$LINENO: installing environment.yml, environment-optional.yml, src/environment.yml and src/environment-optional.yml + echo >&2 $0:$LINENO: generate conda enviroment files fi echo "name: sage-build" > environment.yml echo "channels:" >> environment.yml @@ -79,6 +79,18 @@ for SYSTEM in arch debian fedora cygwin homebrew conda; do for pkg in $SAGELIB_SYSTEM_PACKAGES; do echo " - $pkg" >> src/environment.yml done + sed 's/name: sage/name: sage-dev/' src/environment.yml > src/environment-dev.yml + echo " # Packages needed for ./bootstrap" >> src/environment-dev.yml + BOOTSTRAP_PACKAGES=$(echo $(${STRIP_COMMENTS} build/pkgs/_bootstrap/distros/conda.txt)) + for pkg in $BOOTSTRAP_PACKAGES; do + echo " - $pkg" >> src/environment-dev.yml + done + echo " # Additional dev tools" >> src/environment-dev.yml + echo " - openssh" >> src/environment-dev.yml + echo " - pycodestyle" >> src/environment-dev.yml + echo " - pytest" >> src/environment-dev.yml + echo " - jupyter_sphinx" >> src/environment-dev.yml + cp environment.yml environment-optional.yml echo " # optional packages" >> environment-optional.yml for pkg in $OPTIONAL_SYSTEM_PACKAGES; do diff --git a/src/environment-dev.yml b/src/environment-dev.yml new file mode 100644 index 00000000000..6d99447b852 --- /dev/null +++ b/src/environment-dev.yml @@ -0,0 +1,206 @@ +name: sage-dev +channels: + - conda-forge + - nodefaults +dependencies: + - compilers + - make + - m4 + - perl + - python + - tar + - bc + - pkg-config + - arb + - boost-cpp + - brial + - bzip2 + - cddlib + - cliquer + - cmake + - curl + - ecl + - eclib + - ecm + - fflas-ffpack + - libflint + - flintqs + - fplll + - freetype + - bdw-gc + - gengetopt + - gf2x + - gfan + - fortran-compiler + - giac + - givaro + - glpk + - gmp + - gsl + - iml + - lcalc + - libatomic_ops + - libbraiding + - libffi + - libgd + - libhomfly + - xz + - libpng + - linbox + - lrcalc + - m4ri + - m4rie + - mpc + - mpfi + - mpfr + - nauty + - ncurses + - ntl + - openblas + - blas=2.*=openblas + - openssl + - palp + - pari + - pari-elldata + - pari-galdata + - pari-galpol + - pari-seadata + - pari-galdata + - pari-seadata-small + - patch + - pcre + - pkg-config + - planarity + - ppl + - primecount + - primesieve + - qhull + - r + - r-essentials + - readline + - rw + - singular + - sqlite + - suitesparse + - symmetrica + - sympow + - tachyon + - tox + - xz + - zeromq + - zlib + - zn_poly + - alabaster + - attrs + - babel + - backcall + - beautifulsoup4 + - bleach + - certifi + - cffi + - sagemath-db-combinatorial-designs + - sagemath-db-conway-polynomials + - cvxopt + - cycler + - cypari2 + - cysignals + - cython + - python-dateutil + - decorator + - defusedxml + - docutils + - sagemath-db-elliptic-curves + - entrypoints + - fpylll + - gap-defaults + - gmpy2 + - sagemath-db-graphs + - html5lib + - imagesize + - importlib_metadata + - ipykernel + - ipython + - ipython_genutils + - ipywidgets + - jedi + - jinja2 + - jmol + - jsonschema + - jupyter_client + - jupyter_core + - kiwisolver + - python-lrcalc + - markupsafe + - mathjax + - "matplotlib>=3.5.1" + - maxima + - memory-allocator + - mistune + - mpmath + - nbconvert + - nbformat + - networkx + - notebook + - numpy + - packaging + - pandocfilters + - parso + - pexpect + - pickleshare + - pillow + - pip + - pkgconfig + - sagemath-db-polytopes + - pplpy + - primecountpy + - prometheus_client + - prompt_toolkit + - ptyprocess + - pybind11 + - pycparser + - pygments + - pyparsing + - pyrsistent + - pytz + - pyzmq + - requests + - rpy2 + - sagetex + - scipy + - send2trash + - setuptools + - setuptools_scm + - simplegeneric + - six + - snowballstemmer + - sphinx + - sphinxcontrib-applehelp + - sphinxcontrib-devhelp + - sphinxcontrib-htmlhelp + - sphinxcontrib-jsmath + - sphinxcontrib-qthelp + - sphinxcontrib-serializinghtml + - sphinxcontrib-websupport + - sympy + - terminado + - testpath + - three.js + - tornado + - traitlets + - tzlocal + - vcversioner + - wcwidth + - webencodings + - wheel + - widgetsnbextension + - zipp + # Packages needed for ./bootstrap + - gettext + - autoconf + - automake + - libtool + # Additional dev tools + - openssh + - pycodestyle + - pytest + - jupyter_sphinx From aa144e6c45fa9a76ebfbe69b011d4da0b8a76b7c Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 22 Apr 2022 10:11:52 +0000 Subject: [PATCH 40/62] Add distros/conda for jupyter_sphinx --- build/pkgs/jupyter_sphinx/distros/conda.txt | 1 + src/doc/bootstrap | 1 - src/environment-dev.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 build/pkgs/jupyter_sphinx/distros/conda.txt diff --git a/build/pkgs/jupyter_sphinx/distros/conda.txt b/build/pkgs/jupyter_sphinx/distros/conda.txt new file mode 100644 index 00000000000..e9b59e89755 --- /dev/null +++ b/build/pkgs/jupyter_sphinx/distros/conda.txt @@ -0,0 +1 @@ +jupyter_sphinx diff --git a/src/doc/bootstrap b/src/doc/bootstrap index a00811223fa..14886524d58 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -89,7 +89,6 @@ for SYSTEM in arch debian fedora cygwin homebrew conda; do echo " - openssh" >> src/environment-dev.yml echo " - pycodestyle" >> src/environment-dev.yml echo " - pytest" >> src/environment-dev.yml - echo " - jupyter_sphinx" >> src/environment-dev.yml cp environment.yml environment-optional.yml echo " # optional packages" >> environment-optional.yml diff --git a/src/environment-dev.yml b/src/environment-dev.yml index 6d99447b852..bef6a1f4a2b 100644 --- a/src/environment-dev.yml +++ b/src/environment-dev.yml @@ -128,6 +128,7 @@ dependencies: - jsonschema - jupyter_client - jupyter_core + - jupyter_sphinx - kiwisolver - python-lrcalc - markupsafe @@ -203,4 +204,3 @@ dependencies: - openssh - pycodestyle - pytest - - jupyter_sphinx From da79f27d3675ec1da331020561185fe57ca129f6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:25:30 -0700 Subject: [PATCH 41/62] build/pkgs/virtualenv: Update to 20.14.1 --- build/pkgs/virtualenv/checksums.ini | 6 +++--- build/pkgs/virtualenv/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/virtualenv/checksums.ini b/build/pkgs/virtualenv/checksums.ini index bc8df2a4f32..5e1728927f4 100644 --- a/build/pkgs/virtualenv/checksums.ini +++ b/build/pkgs/virtualenv/checksums.ini @@ -1,5 +1,5 @@ tarball=virtualenv-VERSION.tar.gz -sha1=b5e76bd08c1bebac54de72c7209d85fab8db9e08 -md5=0695fb2609140cedd0e7388ad8664296 -cksum=2836864806 +sha1=3c00a243652c2bdbf700828b2bca7733941e1453 +md5=1f7ddaff06a58ee4508bed1f03a5ce1c +cksum=2270354493 upstream_url=https://pypi.io/packages/source/v/virtualenv/virtualenv-VERSION.tar.gz diff --git a/build/pkgs/virtualenv/package-version.txt b/build/pkgs/virtualenv/package-version.txt index 936280a3a7c..418ef16ce2b 100644 --- a/build/pkgs/virtualenv/package-version.txt +++ b/build/pkgs/virtualenv/package-version.txt @@ -1 +1 @@ -20.7.2 +20.14.1 From dfbbd6a8e80f147a0645afad553843d460494e50 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:26:51 -0700 Subject: [PATCH 42/62] build/pkgs/platformdirs: New, dependency of virtualenv --- build/pkgs/platformdirs/SPKG.rst | 16 ++++++++++++++++ build/pkgs/platformdirs/checksums.ini | 5 +++++ build/pkgs/platformdirs/dependencies | 4 ++++ build/pkgs/platformdirs/install-requires.txt | 1 + build/pkgs/platformdirs/package-version.txt | 1 + build/pkgs/platformdirs/spkg-install.in | 2 ++ build/pkgs/platformdirs/type | 1 + 7 files changed, 30 insertions(+) create mode 100644 build/pkgs/platformdirs/SPKG.rst create mode 100644 build/pkgs/platformdirs/checksums.ini create mode 100644 build/pkgs/platformdirs/dependencies create mode 100644 build/pkgs/platformdirs/install-requires.txt create mode 100644 build/pkgs/platformdirs/package-version.txt create mode 100644 build/pkgs/platformdirs/spkg-install.in create mode 100644 build/pkgs/platformdirs/type diff --git a/build/pkgs/platformdirs/SPKG.rst b/build/pkgs/platformdirs/SPKG.rst new file mode 100644 index 00000000000..ef40ff09e0c --- /dev/null +++ b/build/pkgs/platformdirs/SPKG.rst @@ -0,0 +1,16 @@ +platformdirs: A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir". +=============================================================================================================== + +Description +----------- + +A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir". + +License +------- + +Upstream Contact +---------------- + +https://pypi.org/project/platformdirs/ + diff --git a/build/pkgs/platformdirs/checksums.ini b/build/pkgs/platformdirs/checksums.ini new file mode 100644 index 00000000000..8dc4a85a66d --- /dev/null +++ b/build/pkgs/platformdirs/checksums.ini @@ -0,0 +1,5 @@ +tarball=platformdirs-VERSION.tar.gz +sha1=344841a3cd4eb5b1a1b8adb8a57e845e5a06b236 +md5=2301a8a29c3082a49ee293073d893887 +cksum=1100125935 +upstream_url=https://pypi.io/packages/source/p/platformdirs/platformdirs-VERSION.tar.gz diff --git a/build/pkgs/platformdirs/dependencies b/build/pkgs/platformdirs/dependencies new file mode 100644 index 00000000000..0738c2d7777 --- /dev/null +++ b/build/pkgs/platformdirs/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/platformdirs/install-requires.txt b/build/pkgs/platformdirs/install-requires.txt new file mode 100644 index 00000000000..67fd014bbdd --- /dev/null +++ b/build/pkgs/platformdirs/install-requires.txt @@ -0,0 +1 @@ +platformdirs diff --git a/build/pkgs/platformdirs/package-version.txt b/build/pkgs/platformdirs/package-version.txt new file mode 100644 index 00000000000..f225a78adf0 --- /dev/null +++ b/build/pkgs/platformdirs/package-version.txt @@ -0,0 +1 @@ +2.5.2 diff --git a/build/pkgs/platformdirs/spkg-install.in b/build/pkgs/platformdirs/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/platformdirs/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/platformdirs/type b/build/pkgs/platformdirs/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/platformdirs/type @@ -0,0 +1 @@ +standard From ae25dd1ef48e16b628d840771c32127a6449327a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:27:35 -0700 Subject: [PATCH 43/62] build/pkgs/filelock: Update to 3.6.0, needed for virtualenv --- build/pkgs/filelock/checksums.ini | 6 +++--- build/pkgs/filelock/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/filelock/checksums.ini b/build/pkgs/filelock/checksums.ini index a7a437ebb3c..24a5e470bef 100644 --- a/build/pkgs/filelock/checksums.ini +++ b/build/pkgs/filelock/checksums.ini @@ -1,5 +1,5 @@ tarball=filelock-VERSION.tar.gz -sha1=ca03bf213ee1d7a9b6353cebc265072aae40fdcb -md5=c1fe6d9a7433a7ca6ce4f36e273317d1 -cksum=2927344437 +sha1=e0340015dcb7bbe19b5bf33ff8b9c94670994585 +md5=b1032075ddada92874377426337c38a6 +cksum=3903629392 upstream_url=https://pypi.io/packages/source/f/filelock/filelock-VERSION.tar.gz diff --git a/build/pkgs/filelock/package-version.txt b/build/pkgs/filelock/package-version.txt index f93fc9f42ea..40c341bdcdb 100644 --- a/build/pkgs/filelock/package-version.txt +++ b/build/pkgs/filelock/package-version.txt @@ -1 +1 @@ -3.0.12 +3.6.0 From 62cf7725638ca102aec476fa9b67836fa74de52c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:28:55 -0700 Subject: [PATCH 44/62] build/pkgs/virtualenv/dependencies: Add platformdirs --- build/pkgs/virtualenv/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/virtualenv/dependencies b/build/pkgs/virtualenv/dependencies index fe7890ee1d0..a8b8def7051 100644 --- a/build/pkgs/virtualenv/dependencies +++ b/build/pkgs/virtualenv/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) appdirs distlib filelock six importlib_metadata importlib_resources | $(PYTHON_TOOLCHAIN) +$(PYTHON) appdirs distlib filelock six importlib_metadata importlib_resources platformdirs | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. From 8306b6071510a136cc9045b0c309dba95f17ed1d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:37:34 -0700 Subject: [PATCH 45/62] build/pkgs/platformdirs: Downgrade to 2.5.1, which still uses setuptools as the build system --- build/pkgs/platformdirs/checksums.ini | 6 +++--- build/pkgs/platformdirs/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/platformdirs/checksums.ini b/build/pkgs/platformdirs/checksums.ini index 8dc4a85a66d..e6a6c0613a8 100644 --- a/build/pkgs/platformdirs/checksums.ini +++ b/build/pkgs/platformdirs/checksums.ini @@ -1,5 +1,5 @@ tarball=platformdirs-VERSION.tar.gz -sha1=344841a3cd4eb5b1a1b8adb8a57e845e5a06b236 -md5=2301a8a29c3082a49ee293073d893887 -cksum=1100125935 +sha1=16e9a89587b4471041c6d1a2444d200a92292c73 +md5=83d3ce3feb4af1ccfaca24375574f44d +cksum=1234653032 upstream_url=https://pypi.io/packages/source/p/platformdirs/platformdirs-VERSION.tar.gz diff --git a/build/pkgs/platformdirs/package-version.txt b/build/pkgs/platformdirs/package-version.txt index f225a78adf0..73462a5a134 100644 --- a/build/pkgs/platformdirs/package-version.txt +++ b/build/pkgs/platformdirs/package-version.txt @@ -1 +1 @@ -2.5.2 +2.5.1 From 3e6d7183def10829e9c85ab942d7d5c9affe9ead Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:47:28 -0700 Subject: [PATCH 46/62] build/pkgs/soupsieve: New --- build/pkgs/soupsieve/SPKG.rst | 16 ++++++++++++++++ build/pkgs/soupsieve/checksums.ini | 5 +++++ build/pkgs/soupsieve/dependencies | 4 ++++ build/pkgs/soupsieve/install-requires.txt | 1 + build/pkgs/soupsieve/package-version.txt | 1 + build/pkgs/soupsieve/spkg-install.in | 2 ++ build/pkgs/soupsieve/type | 1 + 7 files changed, 30 insertions(+) create mode 100644 build/pkgs/soupsieve/SPKG.rst create mode 100644 build/pkgs/soupsieve/checksums.ini create mode 100644 build/pkgs/soupsieve/dependencies create mode 100644 build/pkgs/soupsieve/install-requires.txt create mode 100644 build/pkgs/soupsieve/package-version.txt create mode 100644 build/pkgs/soupsieve/spkg-install.in create mode 100644 build/pkgs/soupsieve/type diff --git a/build/pkgs/soupsieve/SPKG.rst b/build/pkgs/soupsieve/SPKG.rst new file mode 100644 index 00000000000..401519ceec9 --- /dev/null +++ b/build/pkgs/soupsieve/SPKG.rst @@ -0,0 +1,16 @@ +soupsieve: A modern CSS selector implementation for Beautiful Soup. +=================================================================== + +Description +----------- + +A modern CSS selector implementation for Beautiful Soup. + +License +------- + +Upstream Contact +---------------- + +https://pypi.org/project/soupsieve/ + diff --git a/build/pkgs/soupsieve/checksums.ini b/build/pkgs/soupsieve/checksums.ini new file mode 100644 index 00000000000..973075eac93 --- /dev/null +++ b/build/pkgs/soupsieve/checksums.ini @@ -0,0 +1,5 @@ +tarball=soupsieve-VERSION.tar.gz +sha1=164c25b194b83750ddb6cf0085ebfbd8441955d2 +md5=f64640a3b112d3deb1d3469037bed5e3 +cksum=1782838732 +upstream_url=https://pypi.io/packages/source/s/soupsieve/soupsieve-VERSION.tar.gz diff --git a/build/pkgs/soupsieve/dependencies b/build/pkgs/soupsieve/dependencies new file mode 100644 index 00000000000..0738c2d7777 --- /dev/null +++ b/build/pkgs/soupsieve/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/soupsieve/install-requires.txt b/build/pkgs/soupsieve/install-requires.txt new file mode 100644 index 00000000000..9eb997f7a10 --- /dev/null +++ b/build/pkgs/soupsieve/install-requires.txt @@ -0,0 +1 @@ +soupsieve diff --git a/build/pkgs/soupsieve/package-version.txt b/build/pkgs/soupsieve/package-version.txt new file mode 100644 index 00000000000..2bf1c1ccf36 --- /dev/null +++ b/build/pkgs/soupsieve/package-version.txt @@ -0,0 +1 @@ +2.3.1 diff --git a/build/pkgs/soupsieve/spkg-install.in b/build/pkgs/soupsieve/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/soupsieve/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/soupsieve/type b/build/pkgs/soupsieve/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/soupsieve/type @@ -0,0 +1 @@ +standard From 1f35d8535b90c2a3327adb7c9b6e91aa930c2f44 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 14:47:55 -0700 Subject: [PATCH 47/62] build/pkgs/beautifulsoup4/dependencies: Add soupsieve --- build/pkgs/beautifulsoup4/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/beautifulsoup4/dependencies b/build/pkgs/beautifulsoup4/dependencies index 0738c2d7777..01af7f65566 100644 --- a/build/pkgs/beautifulsoup4/dependencies +++ b/build/pkgs/beautifulsoup4/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | $(PYTHON_TOOLCHAIN) +$(PYTHON) soupsieve | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. From 71e9a37894153053859e66d5bd6eb281fca65822 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 22 Apr 2022 15:05:16 -0700 Subject: [PATCH 48/62] .github/workflows/build.yml: Install coverage after the Sage venv has been created --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e795a9e7ad9..b8e901d82af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,6 @@ jobs: ./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable --enable-download-from-upstream-url # Install test tools apt-get install -y git - ./sage -python -m pip install coverage - name: Static code check with pyright run: pyright @@ -46,7 +45,9 @@ jobs: SAGE_NUM_THREADS: 2 - name: Test - run: ../sage -python -m coverage run ./bin/sage-runtests --all -p2 + run: | + ../sage -python -m pip install coverage + ../sage -python -m coverage run ./bin/sage-runtests --all -p2 working-directory: ./src - name: Prepare coverage results From 67c34fee1dc0ec0bddf4fa6a0e2633c8b9cf7fa2 Mon Sep 17 00:00:00 2001 From: Release Manager Date: Tue, 26 Apr 2022 00:29:17 +0200 Subject: [PATCH 49/62] Updated SageMath version to 9.6.rc2 --- .zenodo.json | 8 ++++---- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sagelib/package-version.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index b186023807f..92b3c3d5810 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,10 +1,10 @@ { "description": "Mirror of the Sage https://sagemath.org/ source tree", "license": "other-open", - "title": "sagemath/sage: 9.6.rc1", - "version": "9.6.rc1", + "title": "sagemath/sage: 9.6.rc2", + "version": "9.6.rc2", "upload_type": "software", - "publication_date": "2022-04-19", + "publication_date": "2022-04-25", "creators": [ { "affiliation": "SageMath.org", @@ -15,7 +15,7 @@ "related_identifiers": [ { "scheme": "url", - "identifier": "https://github.com/sagemath/sage/tree/9.6.rc1", + "identifier": "https://github.com/sagemath/sage/tree/9.6.rc2", "relation": "isSupplementTo" }, { diff --git a/VERSION.txt b/VERSION.txt index 3723a0332a0..d9a5b2a99a3 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 9.6.rc1, Release Date: 2022-04-19 +SageMath version 9.6.rc2, Release Date: 2022-04-25 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 08a41fab2ad..afc0eba20c0 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=daf3b443bb98c11c5b28432f96dec4a30b7bc56c -md5=c43bf6385cb898650fd84c21266b2346 -cksum=282325747 +sha1=586eb612f05d0bc8e37e63d6740d7e7104ae10e9 +md5=44f1f222057ebe2bdbb8c9dbf41fc034 +cksum=1590172438 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 66fec61003b..797778dbb82 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -4cbe2dbc886452608a95b033679dc86425da72fe +9b2069cf00a00d955fc13cf7e3fbf8ea541aec5c diff --git a/build/pkgs/sagelib/package-version.txt b/build/pkgs/sagelib/package-version.txt index 491046ea819..f6c161a47f6 100644 --- a/build/pkgs/sagelib/package-version.txt +++ b/build/pkgs/sagelib/package-version.txt @@ -1 +1 @@ -9.6.rc1 +9.6.rc2 diff --git a/src/VERSION.txt b/src/VERSION.txt index 491046ea819..f6c161a47f6 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -9.6.rc1 +9.6.rc2 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index fc988085ac7..bf183ccb59d 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -1,5 +1,5 @@ # Sage version information for shell scripts # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='9.6.rc1' -SAGE_RELEASE_DATE='2022-04-19' -SAGE_VERSION_BANNER='SageMath version 9.6.rc1, Release Date: 2022-04-19' +SAGE_VERSION='9.6.rc2' +SAGE_RELEASE_DATE='2022-04-25' +SAGE_VERSION_BANNER='SageMath version 9.6.rc2, Release Date: 2022-04-25' diff --git a/src/sage/version.py b/src/sage/version.py index e00e4ce00ae..f62c878a15f 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '9.6.rc1' -date = '2022-04-19' -banner = 'SageMath version 9.6.rc1, Release Date: 2022-04-19' +version = '9.6.rc2' +date = '2022-04-25' +banner = 'SageMath version 9.6.rc2, Release Date: 2022-04-25' From 281155921993173a75e18c7c23af782acc6a902e Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 27 Apr 2022 17:17:32 +0000 Subject: [PATCH 50/62] Introduce new bootstrap-conda command --- .gitignore | 1 + bootstrap-conda | 78 +++++++++++++++ src/doc/bootstrap | 52 ++-------- src/environment-dev.yml | 206 ---------------------------------------- 4 files changed, 86 insertions(+), 251 deletions(-) create mode 100755 bootstrap-conda delete mode 100644 src/environment-dev.yml diff --git a/.gitignore b/.gitignore index 942a4388eeb..84c0c28eca8 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ /environment.yml /environment-optional.yml /src/environment.yml +/src/environment-dev.yml /src/environment-optional.yml /src/setup.cfg diff --git a/bootstrap-conda b/bootstrap-conda new file mode 100755 index 00000000000..9fac4e8d58a --- /dev/null +++ b/bootstrap-conda @@ -0,0 +1,78 @@ +#!/bin/bash + +######################################################################## +# Generate auto-generated conda environment files +######################################################################### + +STRIP_COMMENTS="sed s/#.*//;" +RECOMMENDED_SPKG_PATTERN="@(_recommended$(for a in $(head -n 1 build/pkgs/_recommended/dependencies); do echo -n "|"$a; done))" + +BOOTSTRAP_PACKAGES=$(echo $(${STRIP_COMMENTS} build/pkgs/_bootstrap/distros/conda.txt)) +SYSTEM_PACKAGES= +OPTIONAL_SYSTEM_PACKAGES= +SAGELIB_SYSTEM_PACKAGES= +SAGELIB_OPTIONAL_SYSTEM_PACKAGES= +RECOMMENDED_SYSTEM_PACKAGES= +for PKG_BASE in $(./sage --package list --has-file distros/conda.txt); do + PKG_SCRIPTS=build/pkgs/$PKG_BASE + SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/conda.txt + PKG_TYPE=$(cat $PKG_SCRIPTS/type) + PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE)) + if [ -n "PKG_SYSTEM_PACKAGES" ]; then + if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then + case "$PKG_BASE:$PKG_TYPE" in + *:standard) + SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + $RECOMMENDED_SPKG_PATTERN:*) + RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + *) + OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + esac + else + case "$PKG_TYPE" in + standard) + SAGELIB_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + *) + SAGELIB_OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + esac + fi + fi +done +echo >&2 $0:$LINENO: generate conda enviroment files +echo "name: sage-build" > environment.yml +echo "channels:" >> environment.yml +echo " - conda-forge" >> environment.yml +echo " - nodefaults" >> environment.yml +echo "dependencies:" >> environment.yml +for pkg in $SYSTEM_PACKAGES; do + echo " - $pkg" >> environment.yml +done +echo " # Packages needed for ./bootstrap" >> environment.yml +for pkg in $BOOTSTRAP_PACKAGES; do + echo " - $pkg" >> environment.yml +done +sed 's/name: sage-build/name: sage/' environment.yml > src/environment.yml +for pkg in $SAGELIB_SYSTEM_PACKAGES; do + echo " - $pkg" >> src/environment.yml +done +sed 's/name: sage/name: sage-dev/' src/environment.yml > src/environment-dev.yml +echo " # Additional dev tools" >> src/environment-dev.yml +echo " - openssh" >> src/environment-dev.yml +echo " - pycodestyle" >> src/environment-dev.yml +echo " - pytest" >> src/environment-dev.yml + +cp environment.yml environment-optional.yml + echo " # optional packages" >> environment-optional.yml +for pkg in $OPTIONAL_SYSTEM_PACKAGES; do + echo " - $pkg" >> environment-optional.yml + done +cp src/environment.yml src/environment-optional.yml + echo " # optional packages" >> src/environment-optional.yml +for pkg in $OPTIONAL_SYSTEM_PACKAGES $SAGELIB_OPTIONAL_SYSTEM_PACKAGES; do + echo " - $pkg" >> src/environment-optional.yml +done diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 14886524d58..90ae09160ba 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -27,7 +27,7 @@ shopt -s extglob RECOMMENDED_SPKG_PATTERN="@(_recommended$(for a in $(head -n 1 build/pkgs/_recommended/dependencies); do echo -n "|"$a; done))" -for SYSTEM in arch debian fedora cygwin homebrew conda; do +for SYSTEM in arch debian fedora cygwin homebrew; do SYSTEM_PACKAGES= OPTIONAL_SYSTEM_PACKAGES= SAGELIB_SYSTEM_PACKAGES= @@ -63,51 +63,13 @@ for SYSTEM in arch debian fedora cygwin homebrew conda; do fi fi done - if [ "${SYSTEM}" = "conda" ]; then - if [ "${BOOTSTRAP_QUIET}" = "no" ]; then - echo >&2 $0:$LINENO: generate conda enviroment files - fi - echo "name: sage-build" > environment.yml - echo "channels:" >> environment.yml - echo " - conda-forge" >> environment.yml - echo " - nodefaults" >> environment.yml - echo "dependencies:" >> environment.yml - for pkg in $SYSTEM_PACKAGES; do - echo " - $pkg" >> environment.yml - done - sed 's/name: sage-build/name: sage/' environment.yml > src/environment.yml - for pkg in $SAGELIB_SYSTEM_PACKAGES; do - echo " - $pkg" >> src/environment.yml - done - sed 's/name: sage/name: sage-dev/' src/environment.yml > src/environment-dev.yml - echo " # Packages needed for ./bootstrap" >> src/environment-dev.yml - BOOTSTRAP_PACKAGES=$(echo $(${STRIP_COMMENTS} build/pkgs/_bootstrap/distros/conda.txt)) - for pkg in $BOOTSTRAP_PACKAGES; do - echo " - $pkg" >> src/environment-dev.yml - done - echo " # Additional dev tools" >> src/environment-dev.yml - echo " - openssh" >> src/environment-dev.yml - echo " - pycodestyle" >> src/environment-dev.yml - echo " - pytest" >> src/environment-dev.yml - - cp environment.yml environment-optional.yml - echo " # optional packages" >> environment-optional.yml - for pkg in $OPTIONAL_SYSTEM_PACKAGES; do - echo " - $pkg" >> environment-optional.yml - done - cp src/environment.yml src/environment-optional.yml - echo " # optional packages" >> src/environment-optional.yml - for pkg in $OPTIONAL_SYSTEM_PACKAGES $SAGELIB_OPTIONAL_SYSTEM_PACKAGES; do - echo " - $pkg" >> src/environment-optional.yml - done - else - if [ "${BOOTSTRAP_QUIET}" = "no" ]; then - echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt" - fi - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt + + if [ "${BOOTSTRAP_QUIET}" = "no" ]; then + echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt" fi + echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt done OUTPUT_DIR="src/doc/en/reference/spkg" diff --git a/src/environment-dev.yml b/src/environment-dev.yml deleted file mode 100644 index bef6a1f4a2b..00000000000 --- a/src/environment-dev.yml +++ /dev/null @@ -1,206 +0,0 @@ -name: sage-dev -channels: - - conda-forge - - nodefaults -dependencies: - - compilers - - make - - m4 - - perl - - python - - tar - - bc - - pkg-config - - arb - - boost-cpp - - brial - - bzip2 - - cddlib - - cliquer - - cmake - - curl - - ecl - - eclib - - ecm - - fflas-ffpack - - libflint - - flintqs - - fplll - - freetype - - bdw-gc - - gengetopt - - gf2x - - gfan - - fortran-compiler - - giac - - givaro - - glpk - - gmp - - gsl - - iml - - lcalc - - libatomic_ops - - libbraiding - - libffi - - libgd - - libhomfly - - xz - - libpng - - linbox - - lrcalc - - m4ri - - m4rie - - mpc - - mpfi - - mpfr - - nauty - - ncurses - - ntl - - openblas - - blas=2.*=openblas - - openssl - - palp - - pari - - pari-elldata - - pari-galdata - - pari-galpol - - pari-seadata - - pari-galdata - - pari-seadata-small - - patch - - pcre - - pkg-config - - planarity - - ppl - - primecount - - primesieve - - qhull - - r - - r-essentials - - readline - - rw - - singular - - sqlite - - suitesparse - - symmetrica - - sympow - - tachyon - - tox - - xz - - zeromq - - zlib - - zn_poly - - alabaster - - attrs - - babel - - backcall - - beautifulsoup4 - - bleach - - certifi - - cffi - - sagemath-db-combinatorial-designs - - sagemath-db-conway-polynomials - - cvxopt - - cycler - - cypari2 - - cysignals - - cython - - python-dateutil - - decorator - - defusedxml - - docutils - - sagemath-db-elliptic-curves - - entrypoints - - fpylll - - gap-defaults - - gmpy2 - - sagemath-db-graphs - - html5lib - - imagesize - - importlib_metadata - - ipykernel - - ipython - - ipython_genutils - - ipywidgets - - jedi - - jinja2 - - jmol - - jsonschema - - jupyter_client - - jupyter_core - - jupyter_sphinx - - kiwisolver - - python-lrcalc - - markupsafe - - mathjax - - "matplotlib>=3.5.1" - - maxima - - memory-allocator - - mistune - - mpmath - - nbconvert - - nbformat - - networkx - - notebook - - numpy - - packaging - - pandocfilters - - parso - - pexpect - - pickleshare - - pillow - - pip - - pkgconfig - - sagemath-db-polytopes - - pplpy - - primecountpy - - prometheus_client - - prompt_toolkit - - ptyprocess - - pybind11 - - pycparser - - pygments - - pyparsing - - pyrsistent - - pytz - - pyzmq - - requests - - rpy2 - - sagetex - - scipy - - send2trash - - setuptools - - setuptools_scm - - simplegeneric - - six - - snowballstemmer - - sphinx - - sphinxcontrib-applehelp - - sphinxcontrib-devhelp - - sphinxcontrib-htmlhelp - - sphinxcontrib-jsmath - - sphinxcontrib-qthelp - - sphinxcontrib-serializinghtml - - sphinxcontrib-websupport - - sympy - - terminado - - testpath - - three.js - - tornado - - traitlets - - tzlocal - - vcversioner - - wcwidth - - webencodings - - wheel - - widgetsnbextension - - zipp - # Packages needed for ./bootstrap - - gettext - - autoconf - - automake - - libtool - # Additional dev tools - - openssh - - pycodestyle - - pytest From 2a8c1c3e160f15b27fcd51efc97c491009ab7aac Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 1 May 2022 10:27:07 +0000 Subject: [PATCH 51/62] Invoke bootstrap-conda during bootstrap --- bootstrap | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap b/bootstrap index afe67841f96..d059afc0482 100755 --- a/bootstrap +++ b/bootstrap @@ -158,6 +158,7 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])" # ONLY stderr, and to re-output the results back to stderr leaving # stdout alone. Basically we swap the two descriptors using a # third, filter, and then swap them back. + ./bootstrap-conda && \ src/doc/bootstrap && \ install_config_rpath && \ aclocal -I m4 && \ From 7f51ef0980537fcf2158c453ada6f8d5648ea38d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 1 May 2022 10:27:24 +0000 Subject: [PATCH 52/62] Also delete dev env config file --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9e8955a07f6..08c0d1b6beb 100644 --- a/Makefile +++ b/Makefile @@ -171,6 +171,7 @@ bootstrap-clean: rm -f src/doc/en/reference/repl/*.txt rm -f environment.yml rm -f src/environment.yml + rm -f src/environment-dev.yml rm -f environment-optional.yml rm -f src/environment-optional.yml rm -f src/Pipfile From d091d2772f6f6b9db2b9ae29dc5a1570d323d734 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 1 May 2022 11:17:36 +0000 Subject: [PATCH 53/62] Update documentation --- .vscode/settings.json | 4 +++ src/doc/en/installation/conda.rst | 50 ++++++++++++------------------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5844f80998f..82b8dd69b5d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,4 +19,8 @@ "src" ], "python.testing.unittestEnabled": false, + "cSpell.words": [ + "Conda", + "Cython" + ], } diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 153456747eb..a56d090f55e 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -48,25 +48,22 @@ To use Sage from there, Using conda to provide system packages for the Sage distribution ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If Conda is installed (check by typing ``conda info``), there are two ways to -prepare for installing SageMath from source: +If Conda is installed (check by typing ``conda info``), one can install SageMath +from source as follows: - If you are using a git checkout:: - $ ./bootstrap + $ ./bootstrap-conda - - Create a new empty environment and activate:: + - Create a new conda environment including all standard packages + recognized by sage, and activate it:: - $ conda create -n sage-build + $ conda env create --file environment.yml $ conda activate sage-build - - Install standard packages recognized by sage's ``spkg-configure`` mechanism:: - - $ conda env update --file environment.yml -n sage-build - - - Or install all standard and optional packages recognized by sage:: - - $ conda env update --file environment-optional.yml -n sage-build + Alternatively, use ``environment-optional.yml`` in place of + ``environment.yml`` to create an environment with all standard and optional + packages recognized by sage. - Then the SageMath distribution will be built using the compilers provided by Conda and using many packages installed by Conda:: @@ -100,29 +97,20 @@ Here we assume that you are using a git checkout. $ conda install mamba - - Create and activate a new conda environment that provides the - bootstrapping prerequisites. You can replace 3.9 by another Python - version:: - - $ mamba create -n sage-build python=3.9 \ - gettext autoconf automake libtool pkg-config - $ conda activate sage-build - - - Run ``bootstrap``; this generates the files ``src/environment*.yml`` used + - Generate the conda environment files ``src/environment*.yml`` used in the next step:: - $ ./bootstrap - - - Populate the conda environment with the dependencies of Sage:: + $ ./bootstrap-conda - $ mamba env update -n sage-build -f src/environment.yml # alternatively, use + - Create and activate a new conda environment with the dependencies of Sage + and a few additional developer tools:: - Alternatively, you can use ``src/environment-optional.yml``, which will - install some additional packages. + $ mamba env create --file src/environment-dev.yml + $ conda activate sage-dev - - Activate the conda environment again:: - - $ conda activate sage-build + Alternatively, you can use ``src/environment.yml`` or + ``src/environment-optional.yml``, which will only install standard + (and optional) packages without any additional developer tools. - Run the ``configure`` script:: @@ -147,7 +135,7 @@ Here we assume that you are using a git checkout. $ sage -c 'print(version())' SageMath version 9.6.beta5, Release Date: 2022-03-12 -Note that ``make`` is not used at all. All dependencies +Note that ``make`` is not used at all. All dependencies (including all Python packages) are provided by conda. Thus, you will get a working version of Sage much faster. However, From 0716595df2c4fbcf312dc9aab4039656e3b87efe Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 2 May 2022 15:06:13 +0000 Subject: [PATCH 54/62] Add missing bootstrap and combine pip install command --- src/doc/en/installation/conda.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 9eb026862ef..fc79c6974ce 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -121,6 +121,7 @@ Here we assume that you are using a git checkout. - Run the ``configure`` script:: + $ ./bootstrap $ ./configure --with-python=$CONDA_PREFIX/bin/python \ --prefix=$CONDA_PREFIX \ $(for pkg in $(./sage -package list :standard: \ @@ -129,13 +130,9 @@ Here we assume that you are using a git checkout. echo --with-system-$pkg=force; \ done) - - Install the build prerequisites of the Sage library:: - - $ pip install --no-build-isolation -v -v --editable pkgs/sage-conf pkgs/sage-setup - - - Install the Sage library:: + - Install the build prerequisites and the Sage library:: - $ pip install --no-build-isolation -v -v --editable src + $ pip install --no-build-isolation -v -v --editable pkgs/sage-conf pkgs/sage-setup src - Verify that Sage has been installed:: @@ -154,6 +151,6 @@ library is installed in editable mode. This means that when you only edit Python files, there is no need to rebuild the library; it suffices to restart Sage. -After editing any Cython files, rebuild by repeating the command:: +After editing any Cython files, rebuild the Sage library using:: $ pip install --no-build-isolation -v -v --editable src From 10338a76ce5812db62f4ac72a17e6c6330f1fb8c Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 2 May 2022 15:09:21 +0000 Subject: [PATCH 55/62] Change ci as well --- .github/workflows/ci-conda.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index a91f2efe044..42b15c52555 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -43,15 +43,8 @@ jobs: bash ~/miniconda.sh -b -p $HOME/miniconda echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV - - name: Install bootstrap prerequisites - run: | - export PATH="$(pwd)/build/bin:$PATH" - SYSTEM=$(sage-guess-package-system) - eval $(sage-print-system-package-command $SYSTEM --sudo install $(sage-get-system-packages $SYSTEM _bootstrap)) - - # Create conda environment file - - name: Bootstrap - run: ./bootstrap + - name: Create conda environment files + run: ./bootstrap-conda - name: Cache conda packages uses: actions/cache@v2 @@ -80,6 +73,7 @@ jobs: shell: bash -l {0} continue-on-error: true run: | + ./bootstrap echo "::add-matcher::.github/workflows/configure-systempackage-problem-matcher.json" ./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX $(for pkg in $(./sage -package list :standard: --has-file spkg-configure.m4 --has-file distros/conda.txt); do echo --with-system-$pkg=force; done) echo "::remove-matcher owner=configure-system-package-warning::" @@ -88,8 +82,7 @@ jobs: - name: Build shell: bash -l {0} run: | - pip install --no-build-isolation -v -v -e pkgs/sage-conf pkgs/sage-setup - pip install --no-build-isolation -v -v -e src + pip install --no-build-isolation -v -v -e pkgs/sage-conf pkgs/sage-setup src env: SAGE_NUM_THREADS: 2 From 0cf7334736fa9ec9fb2af8099722767fea2bdc0d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 3 May 2022 22:07:53 +0000 Subject: [PATCH 56/62] Add sage-setup as install-requires dep --- src/setup.cfg.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4 index aff2e5d7cf8..8cd7753b55a 100644 --- a/src/setup.cfg.m4 +++ b/src/setup.cfg.m4 @@ -30,6 +30,7 @@ python_requires = >=3.7, <3.11 install_requires = esyscmd(`sage-get-system-packages install-requires \ sage_conf \ + sage_setup \ six \ | sed "2,\$s/^/ /;"')dnl' dnl From build/pkgs/sagelib/dependencies From 6d2b14978335da5bfd8148266183a8abd5f32cce Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 3 May 2022 23:11:22 +0000 Subject: [PATCH 57/62] Use relative paths to not install src package --- .github/workflows/ci-conda.yml | 2 +- src/doc/en/installation/conda.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 42b15c52555..b8f551e2d63 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -82,7 +82,7 @@ jobs: - name: Build shell: bash -l {0} run: | - pip install --no-build-isolation -v -v -e pkgs/sage-conf pkgs/sage-setup src + pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup ./src env: SAGE_NUM_THREADS: 2 diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index fc79c6974ce..611b99a4684 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -132,7 +132,7 @@ Here we assume that you are using a git checkout. - Install the build prerequisites and the Sage library:: - $ pip install --no-build-isolation -v -v --editable pkgs/sage-conf pkgs/sage-setup src + $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf ./pkgs/sage-setup ./src - Verify that Sage has been installed:: From 1dba3ba01d15153940f310a9e1c427f00d4460d6 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 3 May 2022 23:15:25 +0000 Subject: [PATCH 58/62] Maybe thats the correct shebang? --- bootstrap-conda | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-conda b/bootstrap-conda index 9fac4e8d58a..356c621895b 100755 --- a/bootstrap-conda +++ b/bootstrap-conda @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ######################################################################## # Generate auto-generated conda environment files From c1b2fbf6b82fb388cbb143453b2eeaa428b604ff Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 3 May 2022 23:31:40 +0000 Subject: [PATCH 59/62] Revert install_requires change --- src/setup.cfg.m4 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4 index 8cd7753b55a..aff2e5d7cf8 100644 --- a/src/setup.cfg.m4 +++ b/src/setup.cfg.m4 @@ -30,7 +30,6 @@ python_requires = >=3.7, <3.11 install_requires = esyscmd(`sage-get-system-packages install-requires \ sage_conf \ - sage_setup \ six \ | sed "2,\$s/^/ /;"')dnl' dnl From build/pkgs/sagelib/dependencies From ad56ba3dab303edea7cdd2d449c69feaaf624beb Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 4 May 2022 09:40:18 +0000 Subject: [PATCH 60/62] Go back to two pip installs for now --- .github/workflows/ci-conda.yml | 3 ++- src/doc/en/installation/conda.rst | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index b8f551e2d63..74e37b3a408 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -82,7 +82,8 @@ jobs: - name: Build shell: bash -l {0} run: | - pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup ./src + pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup + pip install --no-build-isolation -v -v -e ./src env: SAGE_NUM_THREADS: 2 diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 611b99a4684..7b9d21a0772 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -132,7 +132,8 @@ Here we assume that you are using a git checkout. - Install the build prerequisites and the Sage library:: - $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf ./pkgs/sage-setup ./src + $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf ./pkgs/sage-setup + $ pip install --no-build-isolation -v -v --editable ./src - Verify that Sage has been installed:: From b42f5f51e716d6d01cb491699220ba42c674cd5c Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 8 May 2022 08:39:10 +0000 Subject: [PATCH 61/62] Readd how to use specific python version --- src/doc/en/installation/conda.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 7b9d21a0772..36b1834cca3 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -119,6 +119,10 @@ Here we assume that you are using a git checkout. ``src/environment-optional.yml``, which will only install standard (and optional) packages without any additional developer tools. + By default, the most recent version of Python supported by Sage is + installed. You can use the additional option ``python=3.9`` in the above + ``env create`` command to use another Python version (here 3.9). + - Run the ``configure`` script:: $ ./bootstrap From 87f360ca7a4703b6c45ad3427363ccf4ae531b2c Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 9 May 2022 11:47:37 +0000 Subject: [PATCH 62/62] Readd name arg --- src/doc/en/installation/conda.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 36b1834cca3..b9f70332a0d 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -62,7 +62,7 @@ from source as follows: - Create a new conda environment including all standard packages recognized by sage, and activate it:: - $ conda env create --file environment.yml + $ conda env create --file environment.yml --name sage-build $ conda activate sage-build Alternatively, use ``environment-optional.yml`` in place of @@ -98,7 +98,7 @@ Here we assume that you are using a git checkout. $ export SAGE_NUM_THREADS=24 - - As a recommended step, install the ``mamba`` package manager. If + - As a recommended step, install the ``mamba`` package manager. If you skip this step, replace ``mamba`` by ``conda`` in the following steps:: @@ -112,7 +112,7 @@ Here we assume that you are using a git checkout. - Create and activate a new conda environment with the dependencies of Sage and a few additional developer tools:: - $ mamba env create --file src/environment-dev.yml + $ mamba env create --file src/environment-dev.yml --name sage-dev $ conda activate sage-dev Alternatively, you can use ``src/environment.yml`` or @@ -121,7 +121,7 @@ Here we assume that you are using a git checkout. By default, the most recent version of Python supported by Sage is installed. You can use the additional option ``python=3.9`` in the above - ``env create`` command to use another Python version (here 3.9). + ``env create`` command to select another Python version (here 3.9). - Run the ``configure`` script::