From c2bd478e829ae683e4ec3eeb6fbc3b1e6cf33d7b Mon Sep 17 00:00:00 2001 From: Wyatt Spear Date: Fri, 14 Feb 2025 15:37:18 -0800 Subject: [PATCH] Include sys/time.h for python3.13+ and fix PYTHONPATH ordering to allow selection of other python configs (thanks @nchaimov) Former-commit-id: ba1d83a99ad36b25494a8ab86e7baefa39204a9d --- src/Profile/ctau_impl.c | 5 ++++- tools/src/tau_exec | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Profile/ctau_impl.c b/src/Profile/ctau_impl.c index 3b51e6433..b7dd40e3e 100644 --- a/src/Profile/ctau_impl.c +++ b/src/Profile/ctau_impl.c @@ -230,8 +230,11 @@ hpTimerUnit(void) #else #include #include +#if PY_VERSION_HEX > 0x030D0000 // Python versions after 3.13 + // Include sys/time.h because pyport.h no longer does so. + #include +#endif #endif - static PY_LONG_LONG hpTimer(void) { diff --git a/tools/src/tau_exec b/tools/src/tau_exec index 4e21397e4..b0a02cbd8 100755 --- a/tools/src/tau_exec +++ b/tools/src/tau_exec @@ -878,7 +878,7 @@ else fi python_bindings=`echo $theBinding | sed -e 's/shared/bindings/'` -export PYTHONPATH=${BASEDIR}/lib:$BASEDIR/lib/$python_bindings:$PYTHONPATH +export PYTHONPATH=$BASEDIR/lib/$python_bindings:${BASEDIR}/lib:$PYTHONPATH if [ "x$LD_LIBRARY_PATH" = "x" ] ; then TAUEX_LD_LIBRARY_PATH=$BASEDIR/lib/$theBinding:$BASEDIR/lib