summaryrefslogtreecommitdiff
path: root/tests/run.sh
diff options
context:
space:
mode:
authorScott Talbert <swt@techie.net>2022-09-13 16:02:43 -0400
committerScott Talbert <swt@techie.net>2022-09-13 16:02:43 -0400
commit78a01acebb81b83013fb0efe80906500a6e25136 (patch)
tree86c93600a48ca0ce8a1d2120908c7f2019945661 /tests/run.sh
parent39f4ceb33e292f2a2d9e3d76a6612a7f9fdb2855 (diff)
downloadpycurl-78a01acebb81b83013fb0efe80906500a6e25136.tar.gz
Fix tests/building docs with newer setuptools
In newer setuptools/distutils, the build directory has been changed from using the Python version (e.g., 3.10) to using the cache tag (e.g., cpython-38). So, support both variants by making the dot optional.
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-xtests/run.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/run.sh b/tests/run.sh
index 36a6fb1..52b5227 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -7,8 +7,9 @@ test -n "$PYTHON" || PYTHON=python
test -n "$PYTEST" || PYTEST=pytest
mkdir -p tests/tmp
-export PYTHONSUFFIX=$($PYTHON -V 2>&1 |awk '{print $2}' |awk -F. '{print $1 "." $2}')
-export PYTHONPATH=$(ls -d build/lib.*$PYTHONSUFFIX):$PYTHONPATH
+export PYTHONMAJOR=$($PYTHON -V 2>&1 |awk '{print $2}' |awk -F. '{print $1}')
+export PYTHONMINOR=$($PYTHON -V 2>&1 |awk '{print $2}' |awk -F. '{print $2}')
+export PYTHONPATH=$(ls -d build/lib.*$PYTHONMAJOR*$PYTHONMINOR):$PYTHONPATH
extra_attrs=
if test "$CI" = true; then