aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/CMakeLists.txt4
-rw-r--r--test/CMakeLists.txt10
-rw-r--r--test/pathological_tests.py2
-rwxr-xr-xtest/spec_tests.py2
4 files changed, 11 insertions, 7 deletions
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index 2c3f5ef..b37966a 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(PYTHON python2)
+
if (NOT MSVC)
add_custom_target(man ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/cmark.3
@@ -6,7 +8,7 @@ if (NOT MSVC)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark.3
DEPENDS ${CMAKE_SOURCE_DIR}/src/cmark.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/make_man_page.py
+ COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/make_man_page.py
${CMAKE_SOURCE_DIR}/src/cmark.h >
${CMAKE_CURRENT_BINARY_DIR}/cmark.3
)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 1032f17..c2c4714 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,5 +1,7 @@
# To get verbose output: cmake --build build --target "test" -- ARGS='-V'
+set(PYTHON python2)
+
if (WIN32)
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR)
set_tests_properties(api_test PROPERTIES
@@ -8,22 +10,22 @@ if (WIN32)
endif(WIN32)
add_test(html_normalization
- python "-m" "doctest"
+ ${PYTHON} "-m" "doctest"
"${CMAKE_CURRENT_SOURCE_DIR}/normalize.py"
)
add_test(spectest_library
- python "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
+ ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
"${CMAKE_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src"
)
add_test(pathological_tests_library
- python "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py"
+ ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py"
"--library-dir" "${CMAKE_BINARY_DIR}/src"
)
add_test(NAME api_test COMMAND api_test)
add_test(spectest_executable
- python "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
+ ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
) \ No newline at end of file
diff --git a/test/pathological_tests.py b/test/pathological_tests.py
index 3cf1662..49ed6db 100644
--- a/test/pathological_tests.py
+++ b/test/pathological_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import re
diff --git a/test/spec_tests.py b/test/spec_tests.py
index 77a6be5..aa172a0 100755
--- a/test/spec_tests.py
+++ b/test/spec_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys