Skip to content

Commit 22001aa

Browse files
author
Release Manager
committed
Trac #32759: ./configure --disable-doc
This switch will disable the docbuild and avoid installing its many dependencies (sphinx...). In contrast to other packages, `pplpy`'s docbuild is enabled unless explicitly disabled by setting `SAGE_SPKG_INSTALL_DOCS=no`. We move it to a separate package `pplpy_doc` and make it a dependency of `sagemath_doc_html`. Split out from #31396. We also add `argon2_cffi` and `nbclient` to the packages disabled upon `--disable-notebook`. URL: https://trac.sagemath.org/32759 Reported by: mkoeppe Ticket author(s): Matthias Koeppe, John Palmieri Reviewer(s): John Palmieri, Matthias Koeppe
2 parents d5d2b5b + 43221d0 commit 22001aa

File tree

67 files changed

+264
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+264
-148
lines changed

Makefile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,10 @@ TESTALL = ./sage -t --all
225225
PTESTALL = ./sage -t -p --all
226226

227227
# Flags for ./sage -t --all.
228-
# By default, include all tests marked 'dochtml' -- see
229-
# https://trac.sagemath.org/ticket/25345 and
230-
# https://trac.sagemath.org/ticket/26110.
231-
TESTALL_FLAGS = --optional=sage,dochtml,optional,external,build
232-
TESTALL_NODOC_FLAGS = --optional=sage,optional,external,build
228+
# When the documentation is installed, "optional" also includes all tests marked 'sagemath_doc_html',
229+
# see https://trac.sagemath.org/ticket/25345, https://trac.sagemath.org/ticket/26110, and
230+
# https://trac.sagemath.org/ticket/32759
231+
TESTALL_FLAGS = --optional=sage,optional,external,build
233232

234233
test: all
235234
$(TESTALL) --logfile=logs/test.log
@@ -275,25 +274,25 @@ test-nodoc: build
275274
check-nodoc: test-nodoc
276275

277276
testall-nodoc: build
278-
$(TESTALL) $(TESTALL_NODOC_FLAGS) --logfile=logs/testall.log
277+
$(TESTALL) $(TESTALL_FLAGS) --logfile=logs/testall.log
279278

280279
testlong-nodoc: build
281280
$(TESTALL) --long --logfile=logs/testlong.log
282281

283282
testalllong-nodoc: build
284-
$(TESTALL) --long $(TESTALL_NODOC_FLAGS) --logfile=logs/testalllong.log
283+
$(TESTALL) --long $(TESTALL_FLAGS) --logfile=logs/testalllong.log
285284

286285
ptest-nodoc: build
287286
$(PTESTALL) --logfile=logs/ptest.log
288287

289288
ptestall-nodoc: build
290-
$(PTESTALL) $(TESTALL_NODOC_FLAGS) --logfile=logs/ptestall.log
289+
$(PTESTALL) $(TESTALL_FLAGS) --logfile=logs/ptestall.log
291290

292291
ptestlong-nodoc: build
293292
$(PTESTALL) --long --logfile=logs/ptestlong.log
294293

295294
ptestalllong-nodoc: build
296-
$(PTESTALL) --long $(TESTALL_NODOC_FLAGS) --logfile=logs/ptestalllong.log
295+
$(PTESTALL) --long $(TESTALL_FLAGS) --logfile=logs/ptestalllong.log
297296

298297
testoptional-nodoc: build
299298
$(TESTALL) --logfile=logs/testoptional.log

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ SAGE_ROOT Root directory (sage-x.y in Sage tarball)
450450
│ │
451451
│ └── tmp/sage/ Temporary files when building Sage
452452
├── logs
453-
│ ├── dochtml.log Log of the documentation build
454453
│ ├── install.log Full install log
455454
│ └── pkgs Build logs of individual packages
456455
│ ├── alabaster-0.7.12.log

build/make/Makefile.in

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ SAGE_SPKG_OPTIONS = @SAGE_SPKG_OPTIONS@
5454

5555
# Where the Sage distribution installs documentation.
5656
# set to empty if --disable-doc is used
57-
SAGE_DOCS = $(SAGE_LOCAL)
57+
SAGE_DOCS = @SAGE_DOCS@
58+
SAGE_DOCS_DISABLED_MESSAGE = This Sage build is configured with "configure --disable-doc", so building the documentation will not work.
5859

5960
# Where the Sage distribution installs Python packages.
6061
# This can be overridden by 'make SAGE_VENV=/some/venv'.
@@ -219,7 +220,7 @@ endif
219220
# the doc build takes the most time and should be started as soon as
220221
# possible.
221222
all-start: toolchain-deps
222-
+$(MAKE_REC) doc all-sage
223+
+$(MAKE_REC) all-sage-docs all-sage
223224

224225
# Build everything except the documentation
225226
all-build: toolchain-deps
@@ -324,7 +325,7 @@ base: $(inst_patch) $(inst_pkgconf)
324325
#
325326
# $ ./sage --docbuild -H
326327

327-
doc: $(SAGE_DOCS_INSTALLED_PACKAGE_INSTS) $(SAGE_DOCS_UNINSTALLED_PACKAGES_CLEANS)
328+
doc: doc-html
328329

329330
# All doc-building is delegated to the script packages
330331
# sagemath_doc_html, sagemath_doc_pdf
@@ -492,9 +493,15 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3)
492493
$(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)
493494

494495
$(1)-$(4)-no-deps:
495-
+$(AM_V_at)sage-logger -p 'SAGE_CHECK=$$(SAGE_CHECK_$(1)) PATH=$$($(4))/bin:$$$$PATH $$(SAGE_SPKG) $$(SAGE_SPKG_OPTIONS) \
496+
+@if [ -z '$$($(4))' ]; then \
497+
echo "Error: The installation tree $(4) has been disabled" 2>&1; \
498+
echo "$$($(4)_DISABLED_MESSAGE)" 2>&1; \
499+
exit 1; \
500+
else \
501+
$(AM_V_at)sage-logger -p 'SAGE_CHECK=$$(SAGE_CHECK_$(1)) PATH=$$($(4))/bin:$$$$PATH $$(SAGE_SPKG) $$(SAGE_SPKG_OPTIONS) \
496502
$(if $(filter $(1),$(TOOLCHAIN_DEPS)),--keep-existing) \
497-
$(1)-$(2) $$($(4))' '$$(SAGE_LOGS)/$(1)-$(2).log'
503+
$(1)-$(2) $$($(4))' '$$(SAGE_LOGS)/$(1)-$(2).log'; \
504+
fi
498505

499506
$(1)-no-deps: $(1)-$(4)-no-deps
500507

@@ -596,7 +603,11 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3)
596603
$(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)
597604

598605
$(1)-$(4)-no-deps:
599-
@if [ -x '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' ]; then \
606+
+@if [ -z '$$($(4))' ]; then \
607+
echo "Error: The installation tree $(4) has been disabled" 2>&1; \
608+
echo "$$($(4)_DISABLED_MESSAGE)" 2>&1; \
609+
exit 1; \
610+
elif [ -x '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' ]; then \
600611
$(AM_V_at)cd '$$(SAGE_ROOT)/build/pkgs/$(1)' && \
601612
. '$$(SAGE_ROOT)/src/bin/sage-src-env-config' && \
602613
. '$$(SAGE_ROOT)/src/bin/sage-env-config' && \

build/make/install

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ during this run of 'make $@'):
107107
EOF
108108

109109
look_for_errors "$SAGE_LOGS/*.log" 20 "^Error" package >&2
110-
look_for_errors "$SAGE_LOGS/../doc*.log" 100 "^Error" documentation >&2
111110

112111
cat >&2 <<EOF
113112

build/pkgs/pplpy/dependencies

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
$(PYTHON) $(MP_LIBRARY) gmpy2 cysignals mpfr mpc ppl | $(PYTHON_TOOLCHAIN) $(if $(findstring no,$(SAGE_SPKG_INSTALL_DOCS)),,sphinx)
1+
$(PYTHON) $(MP_LIBRARY) gmpy2 cysignals mpfr mpc ppl | $(PYTHON_TOOLCHAIN)
22

33
----------
44
All lines of this file are ignored except the first.
5-
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.

build/pkgs/pplpy/spkg-install.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
cd src && sdh_pip_install .
2-
3-
# During spkg-install execution, the compiled files are still in a temporary
4-
# directory and are copied to their destination after the end of the script.
5-
# As sphinx need theses compiled files, the compilation and installation
6-
# of pplpy's documentation is done after the end of spkg-install
7-
# in the spkg-postinst script.

build/pkgs/pplpy/spkg-postinst.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

build/pkgs/pplpy/spkg-postrm.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

build/pkgs/pplpy_doc/SPKG.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pplpy_doc: Python interface to the Parma Polyhedra Library (documentation)
2+
==========================================================================
3+
4+
Description
5+
-----------
6+
7+
PPL Python wrapper (documentation)
8+
9+
License
10+
-------
11+
12+
GPL version 3
13+
14+
15+
Upstream Contact
16+
----------------
17+
18+
- https://github.com/videlec/pplpy

build/pkgs/pplpy_doc/checksums.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../pplpy/checksums.ini

0 commit comments

Comments
 (0)