Fix bug with enum values that are specified

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-12-30 17:14:54 -05:00
parent f4a960abdc
commit 8df53bc632

View File

@@ -25,6 +25,8 @@ def params_constants(enum_key):
for i,line in enumerate(lines):
if line.find('/'):
lines[i] = line.split('/')[0]
if '=' in lines[i]:
lines[i] = lines[i].split('=')[0]
# Chomp all the whitespace, split at commas
keys = ''.join(lines).replace(' ','').split(',')
@@ -68,4 +70,7 @@ def generate_cython(data):
def generate():
data = [(enum,params_constants(enum)) for enum in ['parameters', 'input_pairs', 'fluid_types', 'phases']]
generate_cython(data)
generate_cython(data)
if __name__=='__main__':
generate()