File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1147,7 +1147,18 @@ def __str__(self):
1147
1147
def run (self , args , env , cwd ):
1148
1148
return do_run_python (args , env = env , cwd = cwd )
1149
1149
1150
+ def _prepare_headers (self ):
1151
+ # This should only be done for the base task, otherwise we'll duplicate
1152
+ # the work. This is a development-time thing, because we need the
1153
+ # include directory for the C API to be next to lib-graalpython
1154
+ if type (self ) == GraalpythonCAPIBuildTask :
1155
+ target_dir = os .path .join (SUITE .dir , "graalpython" , "include" )
1156
+ if os .path .exists (target_dir ):
1157
+ shutil .rmtree (target_dir )
1158
+ shutil .copytree (os .path .join (self .src_dir (), "include" ), target_dir )
1159
+
1150
1160
def build (self ):
1161
+ self ._prepare_headers ()
1151
1162
env = os .environ .copy ()
1152
1163
cwd = os .path .join (self .subject .get_output_root (), "mxbuild_temp" )
1153
1164
args = []
Original file line number Diff line number Diff line change 346
346
"extracted-dependency:graalpython:GRAALPYTHON_PYTHON_LIB" ,
347
347
"file:mx.graalpython/native-image.properties" ,
348
348
"file:graalpython/lib-graalpython" ,
349
+ "file:graalpython/com.oracle.graal.python.cext/include" ,
349
350
],
350
351
"./lib-graalpython/" : [
351
352
"dependency:graalpython:com.oracle.graal.python.cext/*" ,
You can’t perform that action at this time.
0 commit comments