From 2101b8cccc8b0b2fc782dbeb8c476e6a52243498 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Oct 2021 20:06:14 -0700 Subject: [PATCH] build/pkgs/python3/spkg-build.in: Make sure that python finds sqlite3 when determining which extension modules to build --- build/pkgs/python3/spkg-build.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/pkgs/python3/spkg-build.in b/build/pkgs/python3/spkg-build.in index c8c02917cbc..b75958ab0fd 100644 --- a/build/pkgs/python3/spkg-build.in +++ b/build/pkgs/python3/spkg-build.in @@ -84,8 +84,13 @@ sdh_configure --enable-shared $PYTHON_CONFIGURE # Make sure -L. is placed before -L$SAGE_LOCAL/lib so that python and extension # modules are linked with the right libpython; we pass this in at make time # only, since we don't want -L. to be saved as one of the default LDFLAGS -# used for building third-party extension modules -sdh_make LDFLAGS="-L. $LDFLAGS" +# used for building third-party extension modules. +# +# Trac #32442: As we now install python in SAGE_VENV, not SAGE_LOCAL, +# we need to provide paths into $SAGE_LOCAL, so that setup.py finds +# the libraries needed for the extension modules - in particular sqlite3. +# (The search code there does not know about CPATH and LIBRARY_PATH.) +sdh_make LDFLAGS="-L. -L$SAGE_LOCAL/lib $LDFLAGS" CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS" if [ "$UNAME" = "Darwin" ]; then export DYLD_LIBRARY_PATH="."