@@ -164,12 +164,21 @@ def punittest(args):
164
164
unittest (args + ['--regex' , r'(graal\.python)|(com\.oracle\.truffle\.tck\.tests)' , "-Dgraal.TraceTruffleCompilation=true" ])
165
165
166
166
167
+ PYTHON_ARCHIVES = ["GRAALPYTHON-LAUNCHER" ,
168
+ "GRAALPYTHON" ,
169
+ "GRAALPYTHON_GRAALVM_SUPPORT" ]
170
+ PYTHON_NATIVE_PROJECTS = ["com.oracle.graal.python.parser.antlr" ,
171
+ "com.oracle.graal.python.cext" ]
172
+
173
+
167
174
def nativebuild (args ):
168
- mx .build (["--only" , "com.oracle.graal.python.parser.antlr,com.oracle.graal.python.cext,GRAALPYTHON-LAUNCHER,GRAALPYTHON,GRAALPYTHON_GRAALVM_SUPPORT" ])
175
+ "Build the non-Java Python projects and archives"
176
+ mx .build (["--only" , "," .join (PYTHON_NATIVE_PROJECTS + PYTHON_ARCHIVES )])
169
177
170
178
171
179
def nativeclean (args ):
172
- mx .run (['find' , SUITE .dir , '-name' , '*.bc' , '-delete' ])
180
+ "Clean the non-Java Python projects"
181
+ mx .clean (["--dependencies" , "," .join (PYTHON_NATIVE_PROJECTS )])
173
182
174
183
175
184
def python3_unittests (args ):
@@ -244,6 +253,7 @@ def python_build_svm(args):
244
253
245
254
246
255
def python_svm (args ):
256
+ "Build and run the native graalpython image"
247
257
mx .run_mx (_SVM_ARGS + ["build" ])
248
258
out = mx .OutputCapture ()
249
259
mx .run_mx (_SVM_ARGS + ["graalvm-home" ], out = mx .TeeOutputCapture (out ))
@@ -633,6 +643,7 @@ def update_import_cmd(args):
633
643
634
644
635
645
def python_style_checks (args ):
646
+ "Check (and fix where possible) copyrights, eclipse formatting, and spotbugs"
636
647
python_checkcopyrights (["--fix" ])
637
648
if not os .environ .get ("ECLIPSE_EXE" ):
638
649
find_eclipse ()
@@ -664,6 +675,8 @@ def python_checkcopyrights(args):
664
675
665
676
666
677
def import_python_sources (args ):
678
+ "Update the inlined files from PyPy and CPython"
679
+
667
680
# mappings for files that are renamed
668
681
mapping = {
669
682
"_memoryview.c" : "memoryobject.c" ,
@@ -879,6 +892,7 @@ def mx_post_parse_cmd_line(namespace):
879
892
880
893
881
894
def python_coverage (args ):
895
+ "Generate coverage report either running python-junit gate or the gate passed as argument"
882
896
mx .run_mx (['--jacoco-whitelist-package' , 'com.oracle.graal.python' , '--primary' , 'gate' , '--tags' , args [0 ] if args else 'python-junit' , '--jacocout' , 'html' ])
883
897
884
898
@@ -898,6 +912,6 @@ def python_coverage(args):
898
912
'python-unittests' : [python3_unittests , '' ],
899
913
'nativebuild' : [nativebuild , '' ],
900
914
'nativeclean' : [nativeclean , '' ],
901
- 'python-src-import' : [import_python_sources , 'Update the inlined files from PyPy and CPython ' ],
902
- 'python-coverage' : [python_coverage , 'Generate coverage report either running python-junit gate or the gate passed as argument ' ],
915
+ 'python-src-import' : [import_python_sources , '' ],
916
+ 'python-coverage' : [python_coverage , '[ gate-tag] ' ],
903
917
})
0 commit comments