summaryrefslogtreecommitdiff
path: root/math/sage/files/patch-build_make_install
blob: fcbd87b411de9781c0a880ca88919e142999bd67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- build/make/install.orig	2020-10-27 19:12:31 UTC
+++ build/make/install
@@ -31,7 +31,9 @@ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
 fi
 export PATH="$SAGE_ROOT/build/bin:$SAGE_SRC/bin:$SAGE_LOCAL/bin:$PATH"
 
-export PYTHONPATH="$SAGE_LOCAL"
+PYTHON_SITELIBDIR=`$PYTHON_FOR_VENV -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`
+REL_PYTHON_SITELIBDIR=`echo $PYTHON_SITELIBDIR | sed -e "s|$PYTHONBASE||"`
+export PYTHONPATH="$SAGE_LOCAL:$SAGE_LOCAL$REL_PYTHON_SITELIBDIR:$PYTHON_SITELIBDIR"
 
 ###############################################################################
 # Skip the rest if nothing to do (i.e., to [re]build).