Skip to content

Commit 73e52a4

Browse files
author
Release Manager
committed
gh-36900: Fix build of optional Cython modules broken in #29386
The Cython modules depending on optional packages (such as sage.libs.coxeter3) were not being built after #29386. This showed up in the CI as numerous doctest failures; as reported in #36775 (comment) Fixed here by avoiding a clash of environment variables that prevented the function `is_package_installed_and_updated` from functioning during the build of sagelib. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36900 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik
2 parents 3c18c7c + 3350f7f commit 73e52a4

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=7f2fe8137f5998559f8d3a0a7f965adf6d5ebc78
3-
md5=586738771174a2d26d29ce7ba571a95d
4-
cksum=1156937644
2+
sha1=8b7ffb6e3984e747b42d30b458220fe60c8ea50a
3+
md5=eee78cc60e5bb6176640574eb28c17cb
4+
cksum=1389896899
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2395f7bb45fd7da537a953055df5e0a70dd96c6a
1+
4a970443cd567705f67fcafa7ce1173c45361e3a

src/bin/sage-env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ fi
228228
# depending on SAGE_ROOT and SAGE_LOCAL which are already defined.
229229
if [ -n "$SAGE_LOCAL" ]; then
230230
export SAGE_SHARE="$SAGE_LOCAL/share"
231-
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
231+
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed" # deprecated
232232
fi
233233
if [ -n "$SAGE_SHARE" ]; then
234234
export SAGE_DOC="$SAGE_SHARE/doc/sage"

src/sage/env.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st
177177
SAGE_LOCAL = var("SAGE_LOCAL", SAGE_VENV)
178178
SAGE_SHARE = var("SAGE_SHARE", join(SAGE_LOCAL, "share"))
179179
SAGE_DOC = var("SAGE_DOC", join(SAGE_SHARE, "doc", "sage"))
180-
SAGE_SPKG_INST = var("SAGE_SPKG_INST", join(SAGE_LOCAL, "var", "lib", "sage", "installed"))
180+
SAGE_LOCAL_SPKG_INST = var("SAGE_LOCAL_SPKG_INST", join(SAGE_LOCAL, "var", "lib", "sage", "installed"))
181+
SAGE_SPKG_INST = var("SAGE_SPKG_INST", join(SAGE_LOCAL, "var", "lib", "sage", "installed")) # deprecated
181182

182183
# source tree of the Sage distribution
183184
SAGE_ROOT = var("SAGE_ROOT") # no fallback for SAGE_ROOT

src/sage/misc/package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def _spkg_inst_dirs():
390390
"""
391391
Generator for the installation manifest directories as resolved paths.
392392
393-
It yields first ``SAGE_SPKG_INST``, then ``SAGE_VENV_SPKG_INST``,
393+
It yields first ``SAGE_LOCAL_SPKG_INST``, then ``SAGE_VENV_SPKG_INST``,
394394
if defined; but it both resolve to the same directory, it only yields
395395
one element.
396396
@@ -402,7 +402,7 @@ def _spkg_inst_dirs():
402402
403403
"""
404404
last_inst_dir = None
405-
for inst_dir in (sage.env.SAGE_SPKG_INST, sage.env.SAGE_VENV_SPKG_INST):
405+
for inst_dir in (sage.env.SAGE_LOCAL_SPKG_INST, sage.env.SAGE_VENV_SPKG_INST):
406406
if inst_dir:
407407
inst_dir = Path(inst_dir).resolve()
408408
if inst_dir.is_dir() and inst_dir != last_inst_dir:

0 commit comments

Comments
 (0)