<commit_before>import sys, os, string
prefix = sys.argv[1]
pycmd = sys.argv[2]
localinst = 1
if prefix == '-':
    prefix = '/usr/local'
    
if prefix == '/usr/local':
    localinst = 0

bindir = prefix+'/bin'
libdir = prefix+'/lib/cantera'
hdrdir = prefix+'/include/cantera'

f = open(prefix+'/cantera/setup_cantera','w')
f.write('#!/bin/sh\n')
f.write('LD_LIBRARY_PATH='+libdir+':$LD_LIBRARY_PATH\nexport LD_LIBRARY_PATH\n')
f.write('PATH='+bindir+':$PATH\nexport PATH\n')
f.write('PYTHON_CMD='+pycmd+'\nexport PYTHON_CMD\n')
if pycmd <> 'python':
    f.write('alias ctpython='+pycmd+'\n')

ctloc = '-'
warn = ''
if localinst:
    #try:
        v = sys.version_info
        ctloc = prefix+'/lib/python'+`v[0]`+'.'+`v[1]`+'/site-packages'
        try:
            import Cantera
            ctpath = Cantera.__path__[0]
            if ctpath <> ctloc:
                warn = """
 ######################################################################
    Warning: the Cantera Python package is already installed at
    """+ctpath+""". The newly-installed package at
    """+ctloc+"""/Cantera
    cannot be accessed until the existing one is removed.
 ######################################################################

"""
        except:
            pass
        sys.path.append(ctloc)
        f.write('PYTHONPATH='+ctloc+':$PYTHONPATH\nexport PYTHONPATH\n')
    #except:
    #    pass
f.close()

f = open(bindir+'/mixmaster.py','w')
f.write("""from MixMaster import MixMaster
MixMaster()
""")
f.close()

try:
    import Cantera
    ctpath = Cantera.__path__[0]
except:
    ctpath = "-"
    
print """

Cantera has been successfully installed.

File locations:

    applications      """+bindir+"""<commit_msg>*** empty log message ***<commit_after>import sys, os, string
prefix = sys.argv[1]
pycmd = sys.argv[2]
localinst = 1
if prefix == '-':
    prefix = '/usr/local'
    
if prefix == '/usr/local':
    localinst = 0

bindir = prefix+'/bin'
libdir = prefix+'/lib/cantera'
hdrdir = prefix+'/include/cantera'

f = open(prefix+'/cantera/setup_cantera','w')
f.write('#!/bin/sh\n')
f.write('LD_LIBRARY_PATH='+libdir+':$LD_LIBRARY_PATH\nexport LD_LIBRARY_PATH\n')
f.write('PATH='+bindir+':$PATH\nexport PATH\n')
f.write('PYTHON_CMD='+pycmd+'\nexport PYTHON_CMD\n')
if pycmd <> 'python':
    f.write('alias ctpython='+pycmd+'\n')

ctloc = '-'
warn = ''
if localinst:
    try:
        v = sys.version_info
        ctloc = prefix+'/lib/python'+`v[0]`+'.'+`v[1]`+'/site-packages'
        try:
            import Cantera
            ctpath = Cantera.__path__[0]
            if ctpath <> ctloc:
                warn = """
 ######################################################################
    Warning: the Cantera Python package is already installed at
    """+ctpath+""". The newly-installed package at
    """+ctloc+"""/Cantera
    cannot be accessed until the existing one is removed.
 ######################################################################

"""
        except:
            pass
        sys.path.append(ctloc)
        f.write('PYTHONPATH='+ctloc+':$PYTHONPATH\nexport PYTHONPATH\n')
    except:
        pass
f.close()

f = open(bindir+'/mixmaster.py','w')
f.write("""from MixMaster import MixMaster
MixMaster()
""")
f.close()

try:
    import Cantera
    ctpath = Cantera.__path__[0]
except:
    ctpath = "-"
    
print """

Cantera has been successfully installed.

File locations:

    applications      """+bindir+"""
{'fraction_non_alphanumeric': 0.24077839093813536, 'fraction_numerical': 0.004647110078419983, 'mean_word_length': 3.3103879849812263, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5601472', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1152, 'n_words': 233}