Skip to content

Commit 62164e3

Browse files
committed
configure.ac: disable pytz with --disable-doc and --disable-r
The pytz package is a dependency of three others: babel, rpy2, and tzlocal. And tzlocal is itself a dependency of rpy2. Babel is already disabled with --disable-doc, and rpy2 and tzlocal are disabled with --disable-r. It therefore makes sense to disable pytz when both --disable-doc and --disable-r are given.
1 parent 80f6d77 commit 62164e3

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

configure.ac

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,6 @@ AC_ARG_ENABLE([notebook],
512512
done
513513
])
514514

515-
AS_IF([test "$SAGE_ENABLE_notebook" = no -a "$SAGE_ENABLE_sagelib" = no], [
516-
for pkg in jupyter_client ipykernel ipython zeromq pyzmq; do
517-
AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval])
518-
done
519-
])
520-
521515
AC_ARG_ENABLE([r],
522516
AS_HELP_STRING([--disable-r],
523517
[disable build of the R package and related packages]), [
@@ -546,6 +540,22 @@ AC_ARG_ENABLE([sagelib],
546540
done
547541
])
548542

543+
544+
dnl Handle combinations of --disable-foo flags that may enable us to
545+
dnl prune even more dependencies.
546+
AS_IF([test "$SAGE_ENABLE_notebook" = no -a "$SAGE_ENABLE_sagelib" = no], [
547+
for pkg in jupyter_client ipykernel ipython zeromq pyzmq; do
548+
AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval])
549+
done
550+
])
551+
AS_IF([test "$SAGE_ENABLE_r" = no -a "$SAGE_ENABLE_sage_docbuild" = no], [
552+
dnl pytz is needed only by rpy2 and babel, and babel is already
553+
dnl disabled by --disable-doc.
554+
for pkg in pytz; do
555+
AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval])
556+
done
557+
])
558+
549559
dnl Packages that require a special override to use the SPKG
550560
dnl when the system package is not usable.
551561
AS_VAR_SET([sage_use_system_gcc], [force])

0 commit comments

Comments
 (0)