-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
just sys.argv instead of argparse and a bug fix
- Loading branch information
Showing
4 changed files
with
7 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,11 @@ | ||
from __future__ import annotations | ||
|
||
import argparse | ||
import subprocess | ||
import sys | ||
|
||
from .cpp_config import REMAGE_CPP_EXE_PATH | ||
|
||
|
||
def remage_cli(): | ||
parser = argparse.ArgumentParser( | ||
prog="remage", description="remage's command-line interface" | ||
) | ||
|
||
parser.add_argument( | ||
"--version", action="store_true", help="""Print remage version and exit""" | ||
) | ||
|
||
args = parser.parse_args() | ||
|
||
cmdline = [REMAGE_CPP_EXE_PATH] | ||
if args.version: | ||
cmdline += ["--version"] | ||
|
||
result = subprocess.run(cmdline, check=False) | ||
|
||
result = subprocess.run([REMAGE_CPP_EXE_PATH] + sys.argv[1:], check=False) | ||
sys.exit(result.returncode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from __future__ import annotations | ||
|
||
REMAGE_CPP_EXE_PATH = "/home/gipert/sw/src/legend/remage/build/install/bin/remage-cpp" | ||
REMAGE_CPP_EXE_PATH = "/home/gipert/sw/src/legend/remage/build/src/remage-cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
get_target_property(REMAGE_PYEXE remage-cli PYEXE_PATH) | ||
|
||
add_test(NAME python/cli COMMAND "${REMAGE_PYEXE}" --help) | ||
add_test( | ||
NAME python/cli | ||
COMMAND "${REMAGE_PYEXE}" -q | ||
COMMAND "${REMAGE_PYEXE}" --help) |