Skip to content

Commit

Permalink
change gentypesystem arg to --data-model-version
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibbelink committed Mar 21, 2024
1 parent e99347a commit 47a646c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cyclus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ INCLUDE_DIRECTORIES(${CYCLUS_CORE_INCLUDE_DIRS})
message(STATUS "Generating Type System API for Python")
EXECUTE_PROCESS(COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/gentypesystem.py
"--src-dir=${CMAKE_CURRENT_SOURCE_DIR}"
"--cyclus-version=${DATA_MODEL_VERSION}"
"--data-model-version=${DATA_MODEL_VERSION}"
"--verbose"
RESULT_VARIABLE res_var)
IF(NOT "${res_var}" STREQUAL "0")
Expand Down
8 changes: 4 additions & 4 deletions cyclus/gentypesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2779,8 +2779,8 @@ def parse_args(argv):
dest='dbtypes_json',
help="the path to dbtypes.json file, "
"default " + dbtd)
parser.add_argument('--cyclus-version', default=None,
dest='cyclus_version',
parser.add_argument('--data-model-version', default=None,
dest='data_model_version',
help="The Cyclus API version to target."
)
ns = parser.parse_args(argv)
Expand All @@ -2802,7 +2802,7 @@ def setup(ns):
with io.open(ns.dbtypes_json, 'r') as f:
tab = json.load(f)
# get cyclus version
verstr = ns.cyclus_version
verstr = ns.data_model_version
if verstr is None:
try:
verstr = safe_output(['cyclus', '--version']).split()[2]
Expand All @@ -2817,7 +2817,7 @@ def setup(ns):
if verstr is not None:
if isinstance(verstr, bytes):
verstr = verstr.decode()
ns.cyclus_version = verstr
ns.data_model_version = verstr
ver = tuple(map(int, verstr.partition('-')[0].split('.')))
if ns.verbose:
print('Found cyclus version: ' + verstr, file=sys.stderr)
Expand Down

0 comments on commit 47a646c

Please sign in to comment.