Skip to content

Commit

Permalink
configure.ac: remove pyvenv.cfg when ./configure is run
Browse files Browse the repository at this point in the history
This is necessary to trigger a rebuild of pyvenv.cfg, in case the
value of --enable-system-site-packages has changed.
  • Loading branch information
orlitzky committed Aug 30, 2023
1 parent c076df4 commit 409ac5a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,21 @@ AC_CONFIG_COMMANDS(links, [
eval SAGE_VENV="$SAGE_VENV"dnl eval so as to evaluate the embedded ${SAGE_LOCAL}
])

AC_CONFIG_COMMANDS([pyenv.cfg],[
dnl Erase the venv configuration so that it will be recreated,
dnl in case SAGE_VENV_FLAGS has changed. In particular we need
dnl to be able to toggle --enable-system-site-packages and have
dnl it actually take effect.
AC_MSG_NOTICE([Removing ${SAGE_VENV}/pyvenv.cfg in case SAGE_VENV_FLAGS have changed])
rm -f "${SAGE_VENV}/pyvenv.cfg"
],[
dnl Set $SAGE_LOCAL which does not happen automatically in
dnl in AC_CONFIG_COMMANDS actions.
SAGE_LOCAL="$SAGE_LOCAL"
dnl Evaluate the ${SAGE_LOCAL} often embedded in SAGE_VENV
eval SAGE_VENV="$SAGE_VENV"
])

AC_OUTPUT()

SAGE_SYSTEM_PACKAGE_NOTICE()
Expand Down

0 comments on commit 409ac5a

Please sign in to comment.