Commit 34bc02c7 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

configure: Find Python3 for testsuite

In addition, we prefer the Mingw64 Python distribution on Windows due
to #17483.
parent acf40cae
......@@ -860,7 +860,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:
......
......@@ -2513,4 +2513,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
......@@ -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
......
......@@ -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?
......
......@@ -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:
#============================
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment