diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-11-18 00:10:45 (GMT) |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-01-03 20:41:32 (GMT) |
commit | bd716d5889ffd141f0668a883f275ab28536605e (patch) | |
tree | ddaed44d80ea97a1403e7749cc8089f93847a160 | |
parent | b84c09d533faf576c406ce9f7163efecf3037787 (diff) | |
download | ghc-wip/T17483.zip ghc-wip/T17483.tar.gz ghc-wip/T17483.tar.bz2 |
configure: Find Python3 for testsuitewip/T17483
In addition, we prefer the Mingw64 Python distribution on Windows due
to #17483.
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | aclocal.m4 | 11 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | distrib/configure.ac.in | 3 | ||||
-rw-r--r-- | hadrian/cfg/system.config.in | 2 | ||||
-rw-r--r-- | testsuite/mk/boilerplate.mk | 2 |
6 files changed, 20 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fddeebf..0263439 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -861,7 +861,7 @@ nightly-i386-windows-hadrian: - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist-prep TAR_COMP_OPTS=-1" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make test_bindist TEST_PREP=YES" - - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' + - bash -c 'make V=0 test PYTHON=/mingw64/bin/python3 THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' tags: - x86_64-windows artifacts: @@ -2508,4 +2508,15 @@ AC_DEFUN([FIND_LD],[ CHECK_LD_COPY_BUG([$1]) ]) +# FIND_PYTHON +# ----------- +# Find the version of `python` to use (for the testsuite driver) +# +AC_DEFUN([FIND_PYTHON],[ + dnl Prefer the mingw64 distribution on Windows due to #17483. + AC_PATH_PROG([PYTHON], [python3], [], [/mingw64/bin $PATH]) + PythonCmd="$PYTHON" + AC_SUBST([PythonCmd]) +]) + # LocalWords: fi diff --git a/configure.ac b/configure.ac index 812984f..9f0e156 100644 --- a/configure.ac +++ b/configure.ac @@ -855,6 +855,9 @@ AC_PATH_PROG(XELATEX,xelatex) dnl ** check for makeinfo AC_PATH_PROG(MAKEINFO,makeinfo) +dnl ** check for Python for testsuite driver +FIND_PYTHON + dnl ** check for ghc-pkg command FP_PROG_GHC_PKG diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in index 027df47..c3df620 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -77,6 +77,9 @@ dnl ** Find the path to sed ** # AC_PATH_PROG(SedCmd,gsed sed,sed) +dnl ** check for Python for testsuite driver +FIND_PYTHON + XCODE_VERSION() dnl ** Which gcc to use? diff --git a/hadrian/cfg/system.config.in b/hadrian/cfg/system.config.in index b531bd8..5c494cf 100644 --- a/hadrian/cfg/system.config.in +++ b/hadrian/cfg/system.config.in @@ -28,7 +28,7 @@ makeinfo = @MAKEINFO@ # Python 3 is required to run test driver. # See: https://github.com/ghc/ghc/blob/master/testsuite/mk/boilerplate.mk#L220 -python = python3 +python = @PythonCmd@ # Information about builders: #============================ diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk index 7eb89d9..5cdc40e 100644 --- a/testsuite/mk/boilerplate.mk +++ b/testsuite/mk/boilerplate.mk @@ -217,7 +217,7 @@ $(eval $(call canonicalise,TOP_ABS)) GS = gs CP = cp RM = rm -f -PYTHON = python3 +PYTHON ?= python3 ifeq "$(CHECK_API_ANNOTATIONS)" "" CHECK_API_ANNOTATIONS := $(abspath $(TOP)/../inplace/bin/check-api-annotations) |