@@ -154,6 +154,7 @@ AC_DEFUN([SAGE_SPKG_FINALIZE], [dnl
154
154
m4_pushdef ( [ SPKG_NAME] , [ $1 ] ) dnl
155
155
m4_pushdef ( [ SPKG_TYPE] , [ $2 ] ) dnl
156
156
m4_pushdef ( [ SPKG_SOURCE] , [ $3 ] ) dnl
157
+ m4_pushdef ( [ SPKG_TREE_VAR] , [ $4 ] ) dnl
157
158
dnl add SPKG_NAME to the SAGE_PACKAGE_VERSIONS and
158
159
dnl SAGE_PACKAGE_DEPENDENCIES lists, and to one or more of the above variables
159
160
dnl depending on the package type and other criteria (such as whether or not it
@@ -193,20 +194,12 @@ AC_DEFUN([SAGE_SPKG_FINALIZE], [dnl
193
194
dnl trees. For example, if we decide to create a separate tree for a venv with the
194
195
dnl Jupyter notebook, then packages such as jupyter_core would have to be installed into
195
196
dnl two trees.
196
- if test -f "$DIR/trees.txt"; then
197
- SPKG_TREE_VAR="$(sed "s/#.*//;" "$DIR/trees.txt")"
198
- else
199
- SPKG_TREE_VAR=SAGE_LOCAL
200
- if test -f "$DIR/requirements.txt" -o -f "$DIR/install-requires.txt"; then
201
- dnl A Python package
202
- SPKG_TREE_VAR=SAGE_VENV
203
- fi
204
- fi
205
- SAGE_PACKAGE_TREES="${SAGE_PACKAGE_TREES}$(printf '\ntrees_')SPKG_NAME = ${SPKG_TREE_VAR}"
197
+ SAGE_PACKAGE_TREES="${SAGE_PACKAGE_TREES}$(printf '\ntrees_')SPKG_NAME = SPKG_TREE_VAR"
206
198
207
199
dnl Determine whether it is installed already
208
200
AS_VAR_SET ( [ is_installed] , [ no] )
209
- for treevar in ${SPKG_TREE_VAR} SAGE_LOCAL; do
201
+ m4_append_uniq_w ( [ SPKG_TREE_VAR] , [ SAGE_LOCAL] )
202
+ for treevar in SPKG_TREE_VAR; do
210
203
AS_VAR_COPY ( [ t] , [ $treevar] )
211
204
AS_IF ( [ test -n "$t" -a -d "$t/var/lib/sage/installed/" ] , [ dnl
212
205
for f in "$t/var/lib/sage/installed/SPKG_NAME"-*; do
0 commit comments