simplified

This commit is contained in:
Martin Diehl 2022-06-09 00:22:04 +02:00
parent 1ed7bbabef
commit ea6199b908
1 changed files with 6 additions and 6 deletions

View File

@ -1,16 +1,16 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import sys import sys
import glob import glob
import argparse import argparse
import shutil import shutil
from pathlib import Path from pathlib import Path
import importlib.machinery
import subprocess import subprocess
import shlex import shlex
solver = importlib.machinery.SourceFileLoader( sys.path.append(str(Path(__file__).parents[2]/'python/damask'))
'damask',f'{str(Path(__file__).parent.absolute().parents[1])}/python/damask/solver/_marc.py').load_module() import solver
def copy_and_patch(patch,orig,editor): def copy_and_patch(patch,orig,editor):
try: try:
@ -31,13 +31,13 @@ parser = argparse.ArgumentParser(
parser.add_argument('--editor', dest='editor', metavar='string', default='vi', parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
help='Name of the editor (executable) used by Marc Mentat') help='Name of the editor (executable) used by Marc Mentat')
parser.add_argument('--marc-root', dest='marc_root', metavar='string', parser.add_argument('--marc-root', dest='marc_root', metavar='string',
default=solver._marc_root, default=solver._marc._marc_root,
help='Marc root directory') help='Marc root directory')
parser.add_argument('--marc-version', dest='marc_version', metavar='string', parser.add_argument('--marc-version', dest='marc_version', metavar='string',
default=solver._marc_version, default=solver._marc._marc_version,
help='Marc version') help='Marc version')
parser.add_argument('--damask-root', dest='damask_root', metavar = 'string', parser.add_argument('--damask-root', dest='damask_root', metavar = 'string',
default=solver._damask_root, default=solver._marc._damask_root,
help='DAMASK root directory') help='DAMASK root directory')