File tree Expand file tree Collapse file tree 1 file changed +20
-20
lines changed
Expand file tree Collapse file tree 1 file changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -42,30 +42,30 @@ message ("Python: create 3.x version")
4242
4343file (READ ${CUR_BIN_DIRECTORY} /libsedml.py init_script)
4444file (WRITE ${CUR_BIN_DIRECTORY} /libsedml2.py ${init_script} )
45-
46- string (REPLACE
47- "class SBase(_object):"
48- "class SBase(_object, metaclass=AutoProperty):"
49- init3_script ${init_script}
45+ set (CLASSES_TO_UPDATE
46+ "SBase"
47+ "SedBase"
48+ "SedBaseList"
49+ "SedNamespaces"
50+ "SedNamespacesList"
5051)
5152
52- string (REPLACE
53- "class SedBase(_object):"
54- "class SedBase(_object, metaclass=AutoProperty):"
55- init3_script ${init3_script}
56- )
53+ foreach (CLASS ${CLASSES_TO_UPDATE} )
54+ string (REPLACE
55+ "class ${CLASS} (_object):"
56+ "class ${CLASS} (_object, metaclass=AutoProperty):"
57+ init3_script ${init_script}
58+ )
59+
60+ string (REPLACE
61+ "class ${CLASS} (object):"
62+ "class ${CLASS} (object, metaclass=AutoProperty):"
63+ init3_script ${init3_script}
64+ )
65+ endforeach ()
66+
5767
58- string (REPLACE
59- "class SBase(object):"
60- "class SBase(object, metaclass=AutoProperty):"
61- init3_script ${init3_script}
62- )
6368
64- string (REPLACE
65- "class SedBase(object):"
66- "class SedBase(object, metaclass=AutoProperty):"
67- init3_script ${init3_script}
68- )
6969
7070
7171file (WRITE ${CUR_BIN_DIRECTORY} /libsedml3.py ${init3_script} )
You can’t perform that action at this time.
0 commit comments