Skip to content

Commit f5a3850

Browse files
committed
Supporting different python versions better
1 parent 63afd51 commit f5a3850

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif()
3030

3131
add_subdirectory(lib)
3232

33-
if(${Python3_Interpreter_FOUND})
33+
if(${Python3_Interpreter_FOUND} AND ${Python3_VERSION} VERSION_GREATER "3.8")
3434

3535
file(GLOB UNICODE_DATA ${CMAKE_CURRENT_LIST_DIR}/unicode/data/*.txt)
3636
file(GLOB UNICODE_SCRIPTS ${CMAKE_CURRENT_LIST_DIR}/unicode/scripts/*.py)

test/test_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int main(int argc, char** argv)
8585
SetConsoleOutputCP(CP_UTF8);
8686
#endif
8787

88-
#if defined(SYS_STRING_USE_PYTHON)
88+
#if defined(SYS_STRING_USE_PYTHON) && !defined(PYPY_VERSION)
8989
Py_Initialize();
9090
#endif
9191

0 commit comments

Comments
 (0)