Skip to content

Commit 71b6dca

Browse files
committed
remove unused python-build-watch command
1 parent 4a276bd commit 71b6dca

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,71 +2564,6 @@ def python_coverage(args):
25642564
mx.run(['coverage-uploader.py', '--associated-repos', f.name])
25652565

25662566

2567-
def python_build_watch(args):
2568-
"""
2569-
Watch the suite and on any changes to .class, .jar, .h, or .c files rebuild.
2570-
By default, rebuilds only the archives and non-Java projects.
2571-
"""
2572-
parser = ArgumentParser(prog='mx python-build-watch')
2573-
parser.add_argument('--full', action='store_true', help='Run a full mx build', required=False)
2574-
parser.add_argument('--graalvm', action='store_true', help='Build a graalvm', required=False)
2575-
parser.add_argument('--no-java', action='store_true', help='Build only archives and native projects [default]', required=False)
2576-
args = parser.parse_args(args)
2577-
if sum([args.full, args.graalvm, args.no_java]) > 1:
2578-
mx.abort("Only one of --full, --graalvm, --no-java can be specified")
2579-
if args.full:
2580-
# suffixes = [".c", ".h", ".class", ".jar", ".java"]
2581-
excludes = [".*\\.py$"]
2582-
elif args.graalvm:
2583-
# suffixes = [".c", ".h", ".class", ".jar", ".java", ".py"]
2584-
excludes = ["mx_.*\\.py$"]
2585-
else:
2586-
# suffixes = [".c", ".h", ".class", ".jar"]
2587-
excludes = [".*\\.py$", ".*\\.java$"]
2588-
2589-
cmd = ["inotifywait", "-q", "-e", "close_write,moved_to", "-r", "--format=%f"]
2590-
for e in excludes:
2591-
cmd += ["--exclude", e]
2592-
cmd += ["@%s" % os.path.join(SUITE.dir, ".git"), SUITE.dir]
2593-
cmd_qq = cmd[:]
2594-
cmd_qq[1] = "-qq"
2595-
was_quiet = mx.get_opts().quiet
2596-
2597-
while True:
2598-
out = mx.OutputCapture()
2599-
if mx.run(cmd, out=out, nonZeroIsFatal=False) != 0:
2600-
continue
2601-
changed_file = out.data.strip()
2602-
mx.logv(changed_file)
2603-
if any(changed_file.endswith(ext) for ext in [".c", ".h", ".class", ".jar"]):
2604-
if not mx.get_opts().quiet:
2605-
sys.stdout.write("Build needed ")
2606-
sys.stdout.flush()
2607-
while True:
2608-
# re-run this until it times out, which we'll interpret as quiet
2609-
# time
2610-
if not mx.get_opts().quiet:
2611-
sys.stdout.write(".")
2612-
sys.stdout.flush()
2613-
mx.get_opts().quiet = True
2614-
try:
2615-
retcode = mx.run(cmd_qq, timeout=3, nonZeroIsFatal=False)
2616-
finally:
2617-
mx.get_opts().quiet = was_quiet
2618-
if retcode == mx.ERROR_TIMEOUT:
2619-
if not mx.get_opts().quiet:
2620-
sys.stdout.write("\n")
2621-
break
2622-
mx.log("Building.")
2623-
if args.full:
2624-
mx.command_function("build")()
2625-
elif args.graalvm:
2626-
mx.log(python_jvm())
2627-
else:
2628-
nativebuild([])
2629-
mx.log("Build done.")
2630-
2631-
26322567
class ETMavenPOM:
26332568
DefaultNamespace = "http://maven.apache.org/POM/4.0.0"
26342569

@@ -3491,7 +3426,6 @@ def graalpy_standalone_wrapper(args_in):
34913426
# ----------------------------------------------------------------------------------------------------------------------
34923427
full_python_cmd = [full_python, '[--hosted, run on the currently executing JVM from source tree, default is to run from GraalVM] [Python args|@VM options]']
34933428
mx.update_commands(SUITE, {
3494-
'python-build-watch': [python_build_watch, ''],
34953429
'python': full_python_cmd,
34963430
'python3': full_python_cmd,
34973431
'deploy-binary-if-master': [deploy_binary_if_main, ''],

0 commit comments

Comments
 (0)