File tree 3 files changed +20
-4
lines changed
3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -235,4 +235,4 @@ jobs:
235
235
236
236
- name : Build and Test
237
237
shell : bash
238
- run : cmake --build out --config $BUILD_TYPE --target run- test
238
+ run : cmake --build out --config $BUILD_TYPE --target test-20python
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ endif()
30
30
31
31
add_subdirectory (lib)
32
32
33
- if (${Python3_Interpreter_FOUND} AND ${Python3_VERSION} VERSION_GREATER "3.8 " )
33
+ if (${Python3_Interpreter_FOUND} AND ${Python3_VERSION} VERSION_GREATER_EQUAL "3.9 " )
34
34
35
35
file (GLOB UNICODE_DATA ${CMAKE_CURRENT_LIST_DIR} /unicode/data/*.txt)
36
36
file (GLOB UNICODE_SCRIPTS ${CMAKE_CURRENT_LIST_DIR} /unicode/scripts/*.py)
Original file line number Diff line number Diff line change @@ -73,6 +73,15 @@ JNIEnv * g_env;
73
73
74
74
#endif
75
75
76
+ #if defined(SYS_STRING_USE_PYTHON) && defined(PYPY_VERSION)
77
+
78
+ extern " C" {
79
+ void rpython_startup_code (void );
80
+ int pypy_setup_home (char *home, int verbose);
81
+ }
82
+
83
+ #endif
84
+
76
85
int main (int argc, char ** argv)
77
86
{
78
87
#if defined(__ANDROID__)
@@ -85,9 +94,16 @@ int main(int argc, char** argv)
85
94
SetConsoleOutputCP (CP_UTF8);
86
95
#endif
87
96
88
- #if defined(SYS_STRING_USE_PYTHON) && !defined(PYPY_VERSION)
89
- Py_Initialize ();
97
+ #if defined(SYS_STRING_USE_PYTHON)
98
+ #if !defined(PYPY_VERSION)
99
+ Py_Initialize ();
100
+ #else
101
+ rpython_startup_code ();
102
+ pypy_setup_home (nullptr , 1 );
103
+ #endif
90
104
#endif
105
+
106
+
91
107
92
108
return doctest::Context (argc, argv).run ();
93
109
}
You can’t perform that action at this time.
0 commit comments