Skip to content

Commit

Permalink
Port event_rpcgen.py and test/check-dumpevents.py to Python 3.
Browse files Browse the repository at this point in the history
These scripts remain compatible with Python 2.
  • Loading branch information
VulpineAmethyst authored and azat committed Sep 25, 2017
1 parent 62866f9 commit 8b0aa7b
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 113 deletions.
21 changes: 10 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -915,19 +915,18 @@ if (NOT EVENT__DISABLE_TESTS)
# Generate Regress tests.
#
if (NOT EVENT__DISABLE_REGRESS)
# (We require python2 to generate the regress tests)
foreach (PY python2.6 python2.7 python2)
unset(FIND_PYTHON2 CACHE)
find_program(FIND_PYTHON2 ${PY})
if (FIND_PYTHON2)
set(PYTHON_EXECUTABLE "${PY}")
break()
endif()
endforeach()
find_package(PythonInterp)
# (We require python to generate the regress tests)
find_package(PythonInterp 3)

if (PYTHONINTERP_FOUND AND PYTHON_VERSION_STRING VERSION_LESS "3.0.0")
if (PYTHONINTERP_FOUND)
set(__FOUND_USABLE_PYTHON 1)
else()
find_package(PythonInterp 2)
if (PYTHONINTERP_FOUND)
set(__FOUND_USABLE_PYTHON 1)
else()
message(ERROR "No suitable Python version found, bailing...")
endif()
endif()

if (__FOUND_USABLE_PYTHON)
Expand Down
Loading

0 comments on commit 8b0aa7b

Please sign in to comment.