Add functions to main scripts to be entry_points
Add functions to ck2cti, ctml_writer, and a new file __main__.py to mixmaster to be the entry_points locations that setuptools scripts will call.
This commit is contained in:
parent
c6ccffe44f
commit
5f8bd40c0d
3 changed files with 16 additions and 2 deletions
|
|
@ -2028,5 +2028,8 @@ def main(argv):
|
|||
print(e)
|
||||
sys.exit(1)
|
||||
|
||||
def script_entry_point():
|
||||
main(sys.argv[1:])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
||||
|
|
|
|||
|
|
@ -2681,8 +2681,11 @@ def convert(filename=None, outName=None, text=None):
|
|||
|
||||
write(outName)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
def main():
|
||||
if len(sys.argv) not in (2,3):
|
||||
raise ValueError('Incorrect number of command line arguments.')
|
||||
convert(*sys.argv[1:])
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
8
interfaces/cython/cantera/mixmaster/__main__.py
Normal file
8
interfaces/cython/cantera/mixmaster/__main__.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from cantera.mixmaster.main import MixMaster
|
||||
|
||||
|
||||
def main():
|
||||
MixMaster()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
Add table
Reference in a new issue