diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 75737acf106..e0968eef985 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -277,7 +277,6 @@ FROM with-system-packages AS bootstrapped RUN rm -rf /new /sage/.git $ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-conda configure.ac sage .homebrew-build-env tox.ini Pipfile.m4 .gitignore /new/ $ADD config/config.rpath /new/config/config.rpath -$ADD src/doc/bootstrap /new/src/doc/bootstrap $ADD src/bin /new/src/bin $ADD src/Pipfile.m4 src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/ $ADD m4 /new/m4 diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index dce25a132c9..5813b3ac3b6 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -2,7 +2,7 @@ name: Build documentation (PDF) on: pull_request: - push: + merge_group: workflow_dispatch: # Allow to run manually inputs: diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 9deab60f8be..d5c2ecdc798 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -39,6 +39,8 @@ env: FROM_DOCKER_TARGET: "with-targets" FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}} EXTRA_CONFIGURE_ARGS: --enable-fat-binary + # For deployment of the sagemath_doc_... wheels to PyPI + CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }} jobs: build-doc: @@ -164,6 +166,10 @@ jobs: git add -A && git commit --quiet -m 'old') fi + # + # On PRs and pushes to branches + # + - name: Build doc id: docbuild if: (success() || failure()) && steps.worktree.outcome == 'success' && !startsWith(github.ref, 'refs/tags/') @@ -221,7 +227,7 @@ jobs: - name: Upload doc id: upload - if: (success() || failure()) && steps.copy.outcome == 'success' + if: (success() || failure()) && steps.copy.outcome == 'success' && !startsWith(github.ref, 'refs/tags/') uses: actions/upload-artifact@v4 with: name: doc @@ -243,8 +249,8 @@ jobs: export SAGE_USE_CDNS=yes export SAGE_LIVE_DOC=yes export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev - make doc-clean doc-uninstall - ./config.status && make sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps + ./config.status && make SAGE_WHEELS=yes SAGE_EDITABLE=no sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps + (cd venv/var/lib/sage/ && zip /sage/sagemath_doc_wheels.zip wheels/sagemath_doc*.whl) shell: sh .ci/docker-exec-script.sh BUILD /sage {0} - name: Copy live doc @@ -257,6 +263,8 @@ jobs: docker cp --follow-link BUILD:/sage/local/share/doc/sage/pdf livedoc docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html livedoc zip -r livedoc.zip livedoc + docker cp BUILD:/sage/sagemath_doc_wheels.zip . + unzip sagemath_doc_wheels.zip - name: Upload live doc if: (success() || failure()) && steps.copylivedoc.outcome == 'success' @@ -265,3 +273,19 @@ jobs: name: livedoc path: livedoc.zip + - name: Upload sagemath-doc wheels + id: uploaddocwheels + if: (success() || failure()) && steps.buildlivedoc.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: sagemath_doc_wheels + path: sagemath_doc_wheels.zip + + - uses: pypa/gh-action-pypi-publish@release/v1 + if: (success() || failure()) && steps.buildlivedoc.outcome == 'success' && env.CAN_DEPLOY == 'true' + with: + user: __token__ + password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }} + packages-dir: wheels/ + skip-existing: true + verbose: true diff --git a/.gitignore b/.gitignore index 70a6739c33b..3a3c814fe44 100644 --- a/.gitignore +++ b/.gitignore @@ -200,6 +200,7 @@ build/pkgs/wheel/version_requirements.txt # Generated files in the top-level source trees /pkgs/*/build +/pkgs/*/.mesonpy-* /pkgs/*/dist /pkgs/*/MANIFEST /pkgs/*/*.egg-info @@ -235,6 +236,7 @@ build/pkgs/wheel/version_requirements.txt /pkgs/sagemath-sirocco/pyproject.toml /pkgs/sagemath-tdlib/pyproject.toml /pkgs/sagemath-categories/pyproject.toml +/pkgs/sagemath-doc-*/pyproject.toml /pkgs/sagemath-environment/pyproject.toml /pkgs/sagemath-repl/pyproject.toml /pkgs/sagemath-objects/requirements*.txt diff --git a/Makefile b/Makefile index 53d2c689843..1443d8be836 100644 --- a/Makefile +++ b/Makefile @@ -366,7 +366,7 @@ SPKG_INFO_DEPENDENCIES = \ build/pkgs/*/version_requirements.txt build/pkgs/*/package-version.txt \ build/pkgs/*/distros/*.txt -configure: bootstrap src/doc/bootstrap $(CONFIGURE_DEPENDENCIES) $(SPKG_INFO_DEPENDENCIES) +configure: bootstrap $(CONFIGURE_DEPENDENCIES) $(SPKG_INFO_DEPENDENCIES) ./bootstrap -d install: all diff --git a/build/make/Makefile.in b/build/make/Makefile.in index 420dadb9364..c6beda74023 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -58,6 +58,8 @@ SAGE_SPKG_OPTIONS = @SAGE_SPKG_OPTIONS@ # set to empty if --disable-doc is used SAGE_DOCS = @SAGE_DOCS@ SAGE_DOCS_DISABLED_MESSAGE = This Sage build is configured with "configure --disable-doc", so building the documentation will not work. +SAGE_VENV_DOCS = @SAGE_VENV_DOCS@ +SAGE_VENV_DOCS_DISABLED_MESSAGE = This Sage build is configured with "configure --disable-doc", so building the documentation will not work. # Where the Sage distribution installs Python packages. # This can be overridden by 'make SAGE_VENV=/some/venv'. @@ -148,11 +150,14 @@ PYPI_WHEEL_PACKAGES = $(PYPI_NOARCH_WHEEL_PACKAGES) \ sagemath_sirocco \ sagemath_meataxe -# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib +# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib. +# This can be changed when we have separate 'dependencies_build' files. WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) \ sage_conf \ sagelib \ - sage_docbuild + sage_docbuild \ + sagemath_doc_html \ + sagemath_doc_pdf # Packages for which build sdists for PyPI PYPI_SDIST_PACKAGES = $(WHEEL_PACKAGES) @@ -772,7 +777,7 @@ $(1)-uninstall: $(1)-$(4)-uninstall $(1)-clean: $(1)-uninstall -$(1)-sdist: FORCE python_build sage_setup cython +$(1)-sdist: FORCE python_build sage_setup cython meson_python $(AM_V_at) cd '$$(SAGE_ROOT)' && \ . '$$(SAGE_ROOT)/src/bin/sage-src-env-config' && \ . '$$(SAGE_ROOT)/src/bin/sage-env-config' && \ diff --git a/build/pkgs/sagemath_doc_html/bootstrap b/build/pkgs/sagemath_doc_html/bootstrap deleted file mode 120000 index 8dfc4b56a30..00000000000 --- a/build/pkgs/sagemath_doc_html/bootstrap +++ /dev/null @@ -1 +0,0 @@ -src/bootstrap \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_html/bootstrap b/build/pkgs/sagemath_doc_html/bootstrap new file mode 100755 index 00000000000..688d6e5d858 --- /dev/null +++ b/build/pkgs/sagemath_doc_html/bootstrap @@ -0,0 +1,184 @@ +#!/usr/bin/env bash + +######################################################################## +# Regenerate auto-generated files, using information in SAGE_ROOT/build/ +# +# This script is run by SAGE_ROOT/bootstrap as part of the bootstrapping phase +# (before configure, before creating source distributions). +# +# The BOOTSTRAP_QUIET variable is set by the top-level +# bootstrap script and controls how verbose we are. +######################################################################## + +set -e + +if [ -z "$SAGE_ROOT" ]; then + echo Please run the top-level bootstrap script of the Sage distribution. + exit 1 +fi + +./bootstrap_m4 + +cd "$SAGE_ROOT" + +OUTPUT_DIR="src/doc/en/installation" +mkdir -p "$OUTPUT_DIR" + +shopt -s extglob + +RECOMMENDED_SPKG_PATTERN="@(_recommended$(for a in $(head -n 1 build/pkgs/_recommended/dependencies); do echo -n "|"$a; done))" +DEVELOP_SPKG_PATTERN="@(_develop$(for a in $(head -n 1 build/pkgs/_develop/dependencies); do echo -n "|"$a; done))" + +for SYSTEM in arch debian fedora homebrew opensuse void; do + SYSTEM_PACKAGES= + OPTIONAL_SYSTEM_PACKAGES= + SAGELIB_SYSTEM_PACKAGES= + SAGELIB_OPTIONAL_SYSTEM_PACKAGES= + RECOMMENDED_SYSTEM_PACKAGES= + DEVELOP_SYSTEM_PACKAGES= + for PKG_BASE in $(sage-package list --has-file distros/$SYSTEM.txt); do + PKG_SCRIPTS=build/pkgs/$PKG_BASE + PKG_TYPE=$(cat $PKG_SCRIPTS/type) + PKG_SYSTEM_PACKAGES=$(sage-get-system-packages $SYSTEM $PKG_BASE) + 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" + ;; + $DEVELOP_SPKG_PATTERN:*) + DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + $RECOMMENDED_SPKG_PATTERN:*) + RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + *) + OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + esac + else + case "$PKG_BASE:$PKG_TYPE" in + $DEVELOP_SPKG_PATTERN:*) + DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + *:standard) + SAGELIB_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + *) + SAGELIB_OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" + ;; + esac + fi + fi + done + + if [ "${BOOTSTRAP_QUIET}" = "no" ]; then + echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt" + fi + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt + echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt +done + +OUTPUT_DIR="src/doc/en/reference/spkg" +mkdir -p "$OUTPUT_DIR" +if [ "${BOOTSTRAP_QUIET}" = "no" ]; then + echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/"*.rst" +fi +(cat < "$OUTPUT_DIR"/index_standard.rst +(cat < "$OUTPUT_DIR"/index_optional.rst +for PKG_BASE in $(sage-package list --has-file SPKG.rst | grep '^sagemath_'); do + echo "* :ref:\`spkg_$PKG_BASE\`" +done > "$OUTPUT_DIR"/index_sagemath.rst +(cat < "$OUTPUT_DIR"/index_experimental.rst +(cat < "$OUTPUT_DIR"/index_alph.rst +sage-package list --has-file SPKG.rst | OUTPUT_DIR=$OUTPUT_DIR OUTPUT_RST=1 xargs -P 99 -n 1 sage-spkg-info diff --git a/build/pkgs/sagemath_doc_html/bootstrap_m4 b/build/pkgs/sagemath_doc_html/bootstrap_m4 new file mode 120000 index 00000000000..40542346a4e --- /dev/null +++ b/build/pkgs/sagemath_doc_html/bootstrap_m4 @@ -0,0 +1 @@ +../sagelib/bootstrap \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_html/dependencies b/build/pkgs/sagemath_doc_html/dependencies index 40717629a77..9b152880d97 100644 --- a/build/pkgs/sagemath_doc_html/dependencies +++ b/build/pkgs/sagemath_doc_html/dependencies @@ -1,4 +1,4 @@ -sagelib sphinx sphinx_copybutton sphinx_inline_tabs pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon ipywidgets sage_docbuild elliptic_curves furo fpylll graphs +sagelib sphinx sphinx_copybutton sphinx_inline_tabs pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon ipywidgets sage_docbuild elliptic_curves furo fpylll graphs meson_python # Building the documentation has many dependencies, because all # documented modules are imported and because we use matplotlib to diff --git a/build/pkgs/sagemath_doc_html/package-version.txt b/build/pkgs/sagemath_doc_html/package-version.txt new file mode 120000 index 00000000000..c4540217bba --- /dev/null +++ b/build/pkgs/sagemath_doc_html/package-version.txt @@ -0,0 +1 @@ +src/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_html/spkg-install b/build/pkgs/sagemath_doc_html/spkg-install deleted file mode 100755 index 801aa7769fe..00000000000 --- a/build/pkgs/sagemath_doc_html/spkg-install +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -cd $SAGE_ROOT/src/doc -$MAKE doc-html diff --git a/build/pkgs/sagemath_doc_html/spkg-install.in b/build/pkgs/sagemath_doc_html/spkg-install.in new file mode 100644 index 00000000000..f9feb572666 --- /dev/null +++ b/build/pkgs/sagemath_doc_html/spkg-install.in @@ -0,0 +1,20 @@ +cd src + +# Needed because we have trees.txt, which directs us to $SAGE_LOCAL/... +export PIP_FIND_LINKS=$SAGE_VENV/var/lib/sage/wheels + +if [ "$SAGE_EDITABLE" = yes ]; then + # Editables 0.5 does not map non-package data files + # https://editables.readthedocs.io/en/latest/use-cases.html#mapping-non-python-directories-or-files + mkdir -p ${SAGE_DESTDIR}${SAGE_INST_LOCAL}/share/doc/sage + sdh_pip_editable_install . + # We expect a subdirectory like build/cp312. + # Use 'find -newer' to use the one just created/modified by the editable build. + find $(pwd -P)/build -maxdepth 1 -name "cp*" -newer ${SAGE_DESTDIR}${SAGE_INST_LOCAL} -exec \ + ln -svf {}/html {}/index.html ${SAGE_DESTDIR}${SAGE_INST_LOCAL}/share/doc/sage/ \; + if [ "$SAGE_WHEELS" = yes ]; then + sdh_build_and_store_wheel --no-build-isolation . + fi +else + sdh_pip_install --no-build-isolation . +fi diff --git a/build/pkgs/sagemath_doc_html/spkg-legacy-uninstall b/build/pkgs/sagemath_doc_html/spkg-legacy-uninstall new file mode 100755 index 00000000000..01d65f8603f --- /dev/null +++ b/build/pkgs/sagemath_doc_html/spkg-legacy-uninstall @@ -0,0 +1,4 @@ +#! /usr/bin/env bash +if [ -d "$SAGE_DOC" ]; then + rm -rf "$SAGE_DOC"/doctrees "$SAGE_DOC"/inventory "$SAGE_DOC"/html "$SAGE_DOC"/*.html +fi diff --git a/build/pkgs/sagemath_doc_html/spkg-postinst.in b/build/pkgs/sagemath_doc_html/spkg-postinst.in new file mode 100644 index 00000000000..6af97b2de3e --- /dev/null +++ b/build/pkgs/sagemath_doc_html/spkg-postinst.in @@ -0,0 +1,7 @@ +mkdir -p "${SAGE_DOC}" +cd "${SAGE_INST_LOCAL}/share/doc/sage" +for a in *; do + if [ -e "$a" -a ! -e "${SAGE_DOC}/$a" ]; then + ln -sf "${SAGE_INST_LOCAL}/share/doc/sage/$a" "${SAGE_DOC}/$a" + fi +done diff --git a/build/pkgs/sagemath_doc_html/spkg-src b/build/pkgs/sagemath_doc_html/spkg-src new file mode 100755 index 00000000000..9e824839cbf --- /dev/null +++ b/build/pkgs/sagemath_doc_html/spkg-src @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Script to prepare an sdist tarball for sagemath_doc_html +# This script is not used during build. +# +# HOW TO MAKE THE TARBALL: +# ./sage --sh build/pkgs/sagemath_doc_html/spkg-src + +if [ -z "$SAGE_ROOT" ] ; then + echo >&2 "Error - SAGE_ROOT undefined ... exiting" + echo >&2 "Maybe run 'sage -sh'?" + exit 1 +fi + +# Exit on failure +set -e + +cd build/pkgs/sagemath_doc_html + +cd src +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_doc_html/src b/build/pkgs/sagemath_doc_html/src index 95e24c1b7a5..545a86211ab 120000 --- a/build/pkgs/sagemath_doc_html/src +++ b/build/pkgs/sagemath_doc_html/src @@ -1 +1 @@ -../../../src/doc \ No newline at end of file +../../../pkgs/sagemath-doc-html \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_html/trees.txt b/build/pkgs/sagemath_doc_html/trees.txt index 77be9495f24..add51197440 100644 --- a/build/pkgs/sagemath_doc_html/trees.txt +++ b/build/pkgs/sagemath_doc_html/trees.txt @@ -1 +1 @@ -SAGE_DOCS +SAGE_VENV_DOCS diff --git a/build/pkgs/sagemath_doc_html/version_requirements.txt b/build/pkgs/sagemath_doc_html/version_requirements.txt new file mode 100644 index 00000000000..ca22dbf2936 --- /dev/null +++ b/build/pkgs/sagemath_doc_html/version_requirements.txt @@ -0,0 +1 @@ +sagemath-doc-html diff --git a/build/pkgs/sagemath_doc_pdf/bootstrap b/build/pkgs/sagemath_doc_pdf/bootstrap new file mode 120000 index 00000000000..40542346a4e --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/bootstrap @@ -0,0 +1 @@ +../sagelib/bootstrap \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_pdf/dependencies b/build/pkgs/sagemath_doc_pdf/dependencies index 7e3e7f136d2..b96c8fdad03 100644 --- a/build/pkgs/sagemath_doc_pdf/dependencies +++ b/build/pkgs/sagemath_doc_pdf/dependencies @@ -1 +1,5 @@ -sagemath_doc_html texlive texlive_luatex free_fonts xindy +sagelib sphinx sphinx_copybutton sphinx_inline_tabs pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets jupyter_sphinx sage_docbuild elliptic_curves furo fpylll graphs texlive texlive_luatex free_fonts xindy meson_python + +# Building the documentation has many dependencies, because all +# documented modules are imported and because we use matplotlib to +# produce plots. diff --git a/build/pkgs/sagemath_doc_pdf/package-version.txt b/build/pkgs/sagemath_doc_pdf/package-version.txt new file mode 120000 index 00000000000..c4540217bba --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/package-version.txt @@ -0,0 +1 @@ +src/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_pdf/spkg-install b/build/pkgs/sagemath_doc_pdf/spkg-install deleted file mode 100755 index f04f4b75d9a..00000000000 --- a/build/pkgs/sagemath_doc_pdf/spkg-install +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -cd $SAGE_ROOT/src/doc -$MAKE doc-pdf diff --git a/build/pkgs/sagemath_doc_pdf/spkg-install.in b/build/pkgs/sagemath_doc_pdf/spkg-install.in new file mode 100644 index 00000000000..c985d0a761a --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/spkg-install.in @@ -0,0 +1,20 @@ +cd src + +# Needed because we have trees.txt, which directs us to $SAGE_LOCAL/... +export PIP_FIND_LINKS=$SAGE_VENV/var/lib/sage/wheels + +if [ "$SAGE_EDITABLE" = yes ]; then + # Editables 0.5 does not map non-package data files + # https://editables.readthedocs.io/en/latest/use-cases.html#mapping-non-python-directories-or-files + mkdir -p ${SAGE_DESTDIR}${SAGE_INST_LOCAL}/share/doc/sage + sdh_pip_editable_install . + # We expect a subdirectory like build/cp312. + # Use 'find -newer' to use the one just created/modified by the editable build. + find $(pwd -P)/build -maxdepth 1 -name "cp*" -newer ${SAGE_DESTDIR}${SAGE_INST_LOCAL} -exec \ + ln -svf {}/pdf ${SAGE_DESTDIR}${SAGE_INST_LOCAL}/share/doc/sage/ \; + if [ "$SAGE_WHEELS" = yes ]; then + sdh_build_and_store_wheel --no-build-isolation . + fi +else + sdh_pip_install --no-build-isolation . +fi diff --git a/build/pkgs/sagemath_doc_pdf/spkg-legacy-uninstall b/build/pkgs/sagemath_doc_pdf/spkg-legacy-uninstall new file mode 100755 index 00000000000..74275ead407 --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/spkg-legacy-uninstall @@ -0,0 +1,4 @@ +#! /usr/bin/env bash +if [ -d "$SAGE_DOC" ]; then + rm -rf "$SAGE_DOC"/doctrees "$SAGE_DOC"/inventory "$SAGE_DOC"/pdf +fi diff --git a/build/pkgs/sagemath_doc_pdf/spkg-postinst.in b/build/pkgs/sagemath_doc_pdf/spkg-postinst.in new file mode 120000 index 00000000000..21f3c5c19c1 --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/spkg-postinst.in @@ -0,0 +1 @@ +../sagemath_doc_html/spkg-postinst.in \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_pdf/spkg-src b/build/pkgs/sagemath_doc_pdf/spkg-src new file mode 100755 index 00000000000..ab20cedb841 --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/spkg-src @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Script to prepare an sdist tarball for sagemath_doc_pdf +# This script is not used during build. +# +# HOW TO MAKE THE TARBALL: +# ./sage --sh build/pkgs/sagemath_doc_pdf/spkg-src + +if [ -z "$SAGE_ROOT" ] ; then + echo >&2 "Error - SAGE_ROOT undefined ... exiting" + echo >&2 "Maybe run 'sage -sh'?" + exit 1 +fi + +# Exit on failure +set -e + +cd build/pkgs/sagemath_doc_pdf + +cd src +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_doc_pdf/src b/build/pkgs/sagemath_doc_pdf/src new file mode 120000 index 00000000000..eaeb964eaf1 --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/src @@ -0,0 +1 @@ +../../../pkgs/sagemath-doc-pdf \ No newline at end of file diff --git a/build/pkgs/sagemath_doc_pdf/trees.txt b/build/pkgs/sagemath_doc_pdf/trees.txt index 77be9495f24..add51197440 100644 --- a/build/pkgs/sagemath_doc_pdf/trees.txt +++ b/build/pkgs/sagemath_doc_pdf/trees.txt @@ -1 +1 @@ -SAGE_DOCS +SAGE_VENV_DOCS diff --git a/build/pkgs/sagemath_doc_pdf/version_requirements.txt b/build/pkgs/sagemath_doc_pdf/version_requirements.txt new file mode 100644 index 00000000000..2bfeaf99083 --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/version_requirements.txt @@ -0,0 +1 @@ +sagemath-doc-pdf diff --git a/configure.ac b/configure.ac index 5c12ff36ac9..ba9f6dee4e3 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,7 @@ AC_ARG_WITH([sage-venv], AC_SUBST([SAGE_VENV]) AC_SUBST([SAGE_DOCS], ['${SAGE_LOCAL}'])dnl Quoted so that it is resolved at build time by shell/Makefile +AC_SUBST([SAGE_VENV_DOCS], ['${SAGE_VENV}'])dnl Quoted so that it is resolved at build time by shell/Makefile #--------------------------------------------------------- @@ -477,7 +478,8 @@ AC_ARG_ENABLE([doc], AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval]) done AS_VAR_IF([enableval], [no], [dnl Disable the docbuild by disabling the install tree for documentation - AS_VAR_SET([SAGE_DOCS], [])dnl + AS_VAR_SET([SAGE_DOCS], []) + AS_VAR_SET([SAGE_VENV_DOCS], []) ]) ]) diff --git a/pkgs/sage-conf_conda/MANIFEST.in b/pkgs/sage-conf_conda/MANIFEST.in index ea5f85f8c99..e8c6d841083 100644 --- a/pkgs/sage-conf_conda/MANIFEST.in +++ b/pkgs/sage-conf_conda/MANIFEST.in @@ -41,7 +41,6 @@ include sage_root/src/bin/sage-env-config.in include sage_root/src/bin/sage-src-env-config.in include sage_root/src/bin/sage-venv-config include sage_root/src/bin/sage-version.sh -include sage_root/src/doc/bootstrap # FIXME: should move to builds/pkgs/sagemath_doc_html/ global-exclude .tox global-exclude *~* diff --git a/pkgs/sage-conf_pypi/sage_root/src/doc/bootstrap b/pkgs/sage-conf_pypi/sage_root/src/doc/bootstrap deleted file mode 100755 index 2a2bb398b9a..00000000000 --- a/pkgs/sage-conf_pypi/sage_root/src/doc/bootstrap +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -# This version of the src/doc/bootstrap script does nothing. -exit 0 diff --git a/pkgs/sagemath-doc-html/README.rst b/pkgs/sagemath-doc-html/README.rst new file mode 100644 index 00000000000..7019c3f4210 --- /dev/null +++ b/pkgs/sagemath-doc-html/README.rst @@ -0,0 +1,29 @@ +====================================================================== + Sage: Open Source Mathematics Software: Documentation in HTML format +====================================================================== + +About SageMath +-------------- + + "Creating a Viable Open Source Alternative to + Magma, Maple, Mathematica, and MATLAB" + + Copyright (C) 2005-2024 The Sage Development Team + + https://www.sagemath.org + +SageMath fully supports all major Linux distributions, recent versions of +macOS, and Windows (using Cygwin or Windows Subsystem for Linux). + +The traditional and recommended way to install SageMath is from source via +Sage-the-distribution (https://www.sagemath.org/download-source.html). +Sage-the-distribution first builds a large number of open source packages from +source (unless it finds suitable versions installed in the system) and then +installs the Sage Library (sagelib, implemented in Python and Cython). + + +About this pip-installable source distribution +---------------------------------------------- + +When installed from source, the distribution `sagemath-doc-html` uses Sphinx +to build the SageMath documentation in HTML format. diff --git a/pkgs/sagemath-doc-html/VERSION.txt b/pkgs/sagemath-doc-html/VERSION.txt new file mode 100644 index 00000000000..1d2c036dee5 --- /dev/null +++ b/pkgs/sagemath-doc-html/VERSION.txt @@ -0,0 +1 @@ +10.4.beta0 diff --git a/pkgs/sagemath-doc-html/copy_doc_src.py b/pkgs/sagemath-doc-html/copy_doc_src.py new file mode 100755 index 00000000000..fbadf38b835 --- /dev/null +++ b/pkgs/sagemath-doc-html/copy_doc_src.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +# Copy from $SAGE_DOC_SRC to $SAGE_DOC/src + +from os import environ +from pathlib import Path +from shutil import copytree + +from_path = environ['SAGE_DOC_SRC'] +to_path = Path(environ['SAGE_DOC']) / "src" + +print(f"Copying {from_path} to {to_path}") +copytree(from_path, to_path, dirs_exist_ok=True) diff --git a/pkgs/sagemath-doc-html/doc b/pkgs/sagemath-doc-html/doc new file mode 120000 index 00000000000..b14ab9a4284 --- /dev/null +++ b/pkgs/sagemath-doc-html/doc @@ -0,0 +1 @@ +../../src/doc \ No newline at end of file diff --git a/pkgs/sagemath-doc-html/make.sh b/pkgs/sagemath-doc-html/make.sh new file mode 100755 index 00000000000..1d67060e379 --- /dev/null +++ b/pkgs/sagemath-doc-html/make.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Invoke make with -j N when called from a make running a jobserver. +OPTIONS= +case "$MAKEFLAGS" in + *jobserver*) + if [ -n "$SAGE_NUM_THREADS_PARALLEL" ]; then + # Maximum number of job slots requested from the token server. + OPTIONS="-j$SAGE_NUM_THREADS_PARALLEL" + fi + ;; +esac +exec ${MAKE:-make} $OPTIONS "$@" diff --git a/pkgs/sagemath-doc-html/meson.build b/pkgs/sagemath-doc-html/meson.build new file mode 100644 index 00000000000..4162a1fd704 --- /dev/null +++ b/pkgs/sagemath-doc-html/meson.build @@ -0,0 +1,31 @@ +project('sagemath-doc-html', + version: files('VERSION.txt') +) + +# This is a meson-python project, so this is subject to the wheel mappings +# defined in https://github.com/mesonbuild/meson-python/blob/main/mesonpy/__init__.py +docdir = get_option('datadir') / 'share' / 'doc' / 'sage' + +doc_src = custom_target('Writable documentation source tree', + output: 'doc-src', # phony + command: [meson.current_source_dir() / 'copy_doc_src.py'], + env: {'SAGE_DOC': meson.current_build_dir(), + 'SAGE_DOC_SRC': meson.current_source_dir() / 'doc'} +) + +html = custom_target('HTML documentation', + output: 'index.html', + depends: [doc_src], + command: [meson.current_source_dir() / 'make.sh', + '-C', meson.current_build_dir() / 'src', 'doc-html'], + env: {'SAGE_DOC': meson.current_build_dir(), + 'SAGE_DOC_SRC': meson.current_build_dir() / 'src'}, + console: true, + install: true, + install_dir: docdir +) + +install_subdir(meson.current_build_dir() / 'html', + install_dir: docdir) + +meson.add_dist_script('meson_dist_script.sh') diff --git a/pkgs/sagemath-doc-html/meson_dist_script.sh b/pkgs/sagemath-doc-html/meson_dist_script.sh new file mode 100755 index 00000000000..e8e7ed76dca --- /dev/null +++ b/pkgs/sagemath-doc-html/meson_dist_script.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +if [ -z "$MESON_SOURCE_ROOT" -o -z "$MESON_DIST_ROOT" ]; then + echo >&2 "$0: Should only be run by meson" + exit 1 +fi +set -ex +if [ -L "$MESON_DIST_ROOT"/doc -o ! -d "$MESON_DIST_ROOT"/doc ]; then + # Remove symlink copied in by meson + rm -f "$MESON_DIST_ROOT"/doc + # Follow symlink, copy source files. + # - We use git here so that the exclusions in SAGE_ROOT/.gitignore apply; + # in particular, editor backup files and the files such as + # src/doc/en/reference/*/sage (which are generated based on sagelib). + # - We can use git here because meson/mesonpy already refuses to make an sdist + # from something that is not a git working copy. + (cd "$MESON_SOURCE_ROOT/doc" && git archive HEAD --prefix=doc/ .) | (cd "$MESON_DIST_ROOT" && tar -x -f - --no-same-permissions --no-acls --no-same-owner --no-xattrs) + # Copy files that are not in the repository but generated by bootstrap. + (cd "$MESON_SOURCE_ROOT" && tar -c -f - doc/en/reference/spkg/*.rst doc/en/installation/*.txt doc/en/reference/repl/*.txt) | (cd "$MESON_DIST_ROOT" && tar -x -f - --no-same-permissions --no-acls --no-same-owner --no-xattrs) +fi +# Copy file generated by bootstrap (not in git) +cp "$MESON_SOURCE_ROOT"/pyproject.toml "$MESON_DIST_ROOT"/ +# Remove m4 source +rm -f "$MESON_DIST_ROOT"/pyproject.toml.m4 diff --git a/pkgs/sagemath-doc-html/pyproject.toml.m4 b/pkgs/sagemath-doc-html/pyproject.toml.m4 new file mode 100644 index 00000000000..863c3fceb14 --- /dev/null +++ b/pkgs/sagemath-doc-html/pyproject.toml.m4 @@ -0,0 +1,35 @@ +include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- +[build-system] +# Minimum requirements for the build system to execute. +requires = [ + SPKG_INSTALL_REQUIRES_meson_python + SPKG_INSTALL_REQUIRES_sage_docbuild + SPKG_INSTALL_REQUIRES_sphinx + SPKG_INSTALL_REQUIRES_sphinx_copybutton + SPKG_INSTALL_REQUIRES_sphinx_inline_tabs + SPKG_INSTALL_REQUIRES_furo + SPKG_INSTALL_REQUIRES_jupyter_sphinx + SPKG_INSTALL_REQUIRES_sagelib +] +build-backend = 'mesonpy' + +[project] +name = "sagemath-doc-html" +description = "Sage: Open Source Mathematics Software: Documentation in HTML format" +dependencies = [] +license = {text = "GNU General Public License (GPL) v2 or later; Creative Commons Attribution-ShareAlike 3.0 Unported"} +authors = [{name = "The Sage Developers", email = "sage-support@googlegroups.com"}] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Scientific/Engineering :: Mathematics", +] +urls = {Homepage = "https://www.sagemath.org"} +dynamic = ["version"] + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" diff --git a/pkgs/sagemath-doc-pdf/README.rst b/pkgs/sagemath-doc-pdf/README.rst new file mode 100644 index 00000000000..319af2e5b3f --- /dev/null +++ b/pkgs/sagemath-doc-pdf/README.rst @@ -0,0 +1,29 @@ +===================================================================== + Sage: Open Source Mathematics Software: Documentation in PDF format +===================================================================== + +About SageMath +-------------- + + "Creating a Viable Open Source Alternative to + Magma, Maple, Mathematica, and MATLAB" + + Copyright (C) 2005-2024 The Sage Development Team + + https://www.sagemath.org + +SageMath fully supports all major Linux distributions, recent versions of +macOS, and Windows (using Cygwin or Windows Subsystem for Linux). + +The traditional and recommended way to install SageMath is from source via +Sage-the-distribution (https://www.sagemath.org/download-source.html). +Sage-the-distribution first builds a large number of open source packages from +source (unless it finds suitable versions installed in the system) and then +installs the Sage Library (sagelib, implemented in Python and Cython). + + +About this pip-installable source distribution +---------------------------------------------- + +When installed from source, the distribution `sagemath-doc-pdf` uses Sphinx +and LuaLaTeX to build the SageMath documentation in PDF format. diff --git a/pkgs/sagemath-doc-pdf/VERSION.txt b/pkgs/sagemath-doc-pdf/VERSION.txt new file mode 100644 index 00000000000..1d2c036dee5 --- /dev/null +++ b/pkgs/sagemath-doc-pdf/VERSION.txt @@ -0,0 +1 @@ +10.4.beta0 diff --git a/pkgs/sagemath-doc-pdf/copy_doc_src.py b/pkgs/sagemath-doc-pdf/copy_doc_src.py new file mode 120000 index 00000000000..5f920c231c7 --- /dev/null +++ b/pkgs/sagemath-doc-pdf/copy_doc_src.py @@ -0,0 +1 @@ +../sagemath-doc-html/copy_doc_src.py \ No newline at end of file diff --git a/pkgs/sagemath-doc-pdf/doc b/pkgs/sagemath-doc-pdf/doc new file mode 120000 index 00000000000..b14ab9a4284 --- /dev/null +++ b/pkgs/sagemath-doc-pdf/doc @@ -0,0 +1 @@ +../../src/doc \ No newline at end of file diff --git a/pkgs/sagemath-doc-pdf/make.sh b/pkgs/sagemath-doc-pdf/make.sh new file mode 120000 index 00000000000..6db1db71d6a --- /dev/null +++ b/pkgs/sagemath-doc-pdf/make.sh @@ -0,0 +1 @@ +../sagemath-doc-html/make.sh \ No newline at end of file diff --git a/pkgs/sagemath-doc-pdf/meson.build b/pkgs/sagemath-doc-pdf/meson.build new file mode 100644 index 00000000000..eeffa9d3c30 --- /dev/null +++ b/pkgs/sagemath-doc-pdf/meson.build @@ -0,0 +1,30 @@ +project('sagemath-doc-pdf', + version: files('VERSION.txt') +) + +# This is a meson-python project, so this is subject to the wheel mappings +# defined in https://github.com/mesonbuild/meson-python/blob/main/mesonpy/__init__.py +docdir = get_option('datadir') / 'share' / 'doc' / 'sage' + +doc_src = custom_target('Writable documentation source tree', + output: 'doc-src', # phony + command: [meson.current_source_dir() / 'copy_doc_src.py'], + env: {'SAGE_DOC': meson.current_build_dir(), + 'SAGE_DOC_SRC': meson.current_source_dir() / 'doc'} +) + +pdf = custom_target('PDF documentation', + build_by_default: true, + output: 'doc-pdf', # phony + depends: [doc_src], + command: [meson.current_source_dir() / 'make.sh', + '-C', meson.current_build_dir() / 'src', '@OUTPUT@'], + env: {'SAGE_DOC': meson.current_build_dir(), + 'SAGE_DOC_SRC': meson.current_build_dir() / 'src'}, + console: true, +) + +install_subdir(meson.current_build_dir() / 'pdf', + install_dir: docdir) + +meson.add_dist_script('meson_dist_script.sh') diff --git a/pkgs/sagemath-doc-pdf/meson_dist_script.sh b/pkgs/sagemath-doc-pdf/meson_dist_script.sh new file mode 120000 index 00000000000..ffb5978895e --- /dev/null +++ b/pkgs/sagemath-doc-pdf/meson_dist_script.sh @@ -0,0 +1 @@ +../sagemath-doc-html/meson_dist_script.sh \ No newline at end of file diff --git a/pkgs/sagemath-doc-pdf/pyproject.toml.m4 b/pkgs/sagemath-doc-pdf/pyproject.toml.m4 new file mode 100644 index 00000000000..4f680532229 --- /dev/null +++ b/pkgs/sagemath-doc-pdf/pyproject.toml.m4 @@ -0,0 +1,35 @@ +include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- +[build-system] +# Minimum requirements for the build system to execute. +requires = [ + SPKG_INSTALL_REQUIRES_meson_python + SPKG_INSTALL_REQUIRES_sage_docbuild + SPKG_INSTALL_REQUIRES_sphinx + SPKG_INSTALL_REQUIRES_sphinx_copybutton + SPKG_INSTALL_REQUIRES_sphinx_inline_tabs + SPKG_INSTALL_REQUIRES_furo + SPKG_INSTALL_REQUIRES_jupyter_sphinx + SPKG_INSTALL_REQUIRES_sagelib +] +build-backend = 'mesonpy' + +[project] +name = "sagemath-doc-pdf" +description = "Sage: Open Source Mathematics Software: Documentation in PDF format" +dependencies = [] +license = {text = "GNU General Public License (GPL) v2 or later; Creative Commons Attribution-ShareAlike 3.0 Unported"} +authors = [{name = "The Sage Developers", email = "sage-support@googlegroups.com"}] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Scientific/Engineering :: Mathematics", +] +urls = {Homepage = "https://www.sagemath.org"} +dynamic = ["version"] + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" diff --git a/src/doc/Makefile b/src/doc/Makefile index 98a3d138baf..da99ba773a7 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -32,10 +32,6 @@ doc-html--%: sage --docbuild --no-pdf-links $(subst -,/,$(subst doc-html--,,$@)) html $(SAGE_DOCBUILD_OPTS) # reference manual, inventory -ifndef SAGE_ROOT -doc-inventory-reference: - $(error SAGE_ROOT undefined. This Makefile needs to be invoked by build/make/install) -else doc-inventory-reference: doc-src $(eval DOCS = $(shell sage --docbuild --all-documents reference)) @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi @@ -44,7 +40,6 @@ doc-inventory-reference: doc-src $(MAKE) doc-inventory--$(subst /,-,$(BIBLIO)) $(MAKE) $(foreach doc, $(OTHER_DOCS), doc-inventory--$(subst /,-,$(doc))) $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-inventory--reference_top -endif # sub docs of reference manual, html doc-html-reference-sub: doc-inventory-reference diff --git a/src/doc/bootstrap b/src/doc/bootstrap deleted file mode 100755 index e99ecd52c28..00000000000 --- a/src/doc/bootstrap +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env bash - -######################################################################## -# Regenerate auto-generated files, using information in SAGE_ROOT/build/ -# -# This script is run by SAGE_ROOT/bootstrap as part of the bootstrapping phase -# (before configure, before creating source distributions). -# -# The BOOTSTRAP_QUIET variable is set by the top-level -# bootstrap script and controls how verbose we are. -######################################################################## - -set -e - -if [ -z "$SAGE_ROOT" ]; then - echo Please run the top-level bootstrap script of the Sage distribution. - exit 1 -fi - -cd "$SAGE_ROOT" - -OUTPUT_DIR="src/doc/en/installation" -mkdir -p "$OUTPUT_DIR" - -shopt -s extglob - -RECOMMENDED_SPKG_PATTERN="@(_recommended$(for a in $(head -n 1 build/pkgs/_recommended/dependencies); do echo -n "|"$a; done))" -DEVELOP_SPKG_PATTERN="@(_develop$(for a in $(head -n 1 build/pkgs/_develop/dependencies); do echo -n "|"$a; done))" - -for SYSTEM in arch debian fedora homebrew opensuse void; do - SYSTEM_PACKAGES= - OPTIONAL_SYSTEM_PACKAGES= - SAGELIB_SYSTEM_PACKAGES= - SAGELIB_OPTIONAL_SYSTEM_PACKAGES= - RECOMMENDED_SYSTEM_PACKAGES= - DEVELOP_SYSTEM_PACKAGES= - for PKG_BASE in $(sage-package list --has-file distros/$SYSTEM.txt); do - PKG_SCRIPTS=build/pkgs/$PKG_BASE - PKG_TYPE=$(cat $PKG_SCRIPTS/type) - PKG_SYSTEM_PACKAGES=$(sage-get-system-packages $SYSTEM $PKG_BASE) - 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" - ;; - $DEVELOP_SPKG_PATTERN:*) - DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" - ;; - $RECOMMENDED_SPKG_PATTERN:*) - RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" - ;; - *) - OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" - ;; - esac - else - case "$PKG_BASE:$PKG_TYPE" in - $DEVELOP_SPKG_PATTERN:*) - DEVELOP_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" - ;; - *:standard) - SAGELIB_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" - ;; - *) - SAGELIB_OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES" - ;; - esac - fi - fi - done - - if [ "${BOOTSTRAP_QUIET}" = "no" ]; then - echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM"*.txt" - fi - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt - echo "$(sage-print-system-package-command $SYSTEM --prompt --wrap --sudo install $(echo $(echo $DEVELOP_SYSTEM_PACKAGES | xargs -n 1 echo | sort | uniq)))" > "$OUTPUT_DIR"/$SYSTEM-develop.txt -done - -OUTPUT_DIR="src/doc/en/reference/spkg" -mkdir -p "$OUTPUT_DIR" -if [ "${BOOTSTRAP_QUIET}" = "no" ]; then - echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/"*.rst" -fi -(cat < "$OUTPUT_DIR"/index_standard.rst -(cat < "$OUTPUT_DIR"/index_optional.rst -for PKG_BASE in $(sage-package list --has-file SPKG.rst | grep '^sagemath_'); do - echo "* :ref:\`spkg_$PKG_BASE\`" -done > "$OUTPUT_DIR"/index_sagemath.rst -(cat < "$OUTPUT_DIR"/index_experimental.rst -(cat < "$OUTPUT_DIR"/index_alph.rst -sage-package list --has-file SPKG.rst | OUTPUT_DIR=$OUTPUT_DIR OUTPUT_RST=1 xargs -P 99 -n 1 sage-spkg-info diff --git a/src/doc/en/developer/portability_testing.rst b/src/doc/en/developer/portability_testing.rst index 55cefd0bf60..76a5c94eb2a 100644 --- a/src/doc/en/developer/portability_testing.rst +++ b/src/doc/en/developer/portability_testing.rst @@ -383,7 +383,6 @@ Then, to bootstrap and configure...:: RUN mkdir -p /sage WORKDIR /sage ADD Makefile VERSION.txt README.md bootstrap configure.ac sage ./ - ADD src/doc/bootstrap src/doc/bootstrap ADD m4 ./m4 ADD build ./build RUN ./bootstrap @@ -769,7 +768,7 @@ positional arguments (separated from tox options by ``--``):: local-direct create: /Users/mkoeppe/.../worktree-local/.tox/local-direct local-direct run-test-pre: PYTHONHASHSEED='2211987514' ... - src/doc/bootstrap:48: installing src/doc/en/installation/debian.txt... + bootstrap:48: installing src/doc/en/installation/debian.txt... bootstrap:69: installing 'config/config.rpath' configure.ac:328: installing 'config/compile' configure.ac:113: installing 'config/config.guess' diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index ab39d93c280..a6292bc3782 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -290,7 +290,7 @@ def pdf(self): with open(tex_file, 'w') as f: f.write(ref) - make_target = "cd '%s' && $MAKE %s && mv -f *.pdf '%s'" + make_target = "cd '%s' && ${MAKE:-make} %s && mv -f *.pdf '%s'" error_message = "failed to run $MAKE %s in %s" command = 'all-pdf'