mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
*** empty log message ***
This commit is contained in:
parent
d9c72ffafd
commit
b3c733a799
@ -119,7 +119,7 @@ finish-install:
|
|||||||
@INSTALL@ examples/cxx/Makefile @prefix@/cantera/demos/c++
|
@INSTALL@ examples/cxx/Makefile @prefix@/cantera/demos/c++
|
||||||
chown -R @username@ @prefix@/cantera/demos/c++
|
chown -R @username@ @prefix@/cantera/demos/c++
|
||||||
@INSTALL@ -d @prefix@/cantera/demos/f77
|
@INSTALL@ -d @prefix@/cantera/demos/f77
|
||||||
@PYTHON_CMD@ tools/bin/finish_install.py @prefix@ @PYTHON_CMD@
|
(PYTHONPATH=''; @PYTHON_CMD@ tools/bin/finish_install.py @prefix@ @PYTHON_CMD@)
|
||||||
#@INSTALL@ bin/ctmkmf @prefix@/bin/ctnew
|
#@INSTALL@ bin/ctmkmf @prefix@/bin/ctnew
|
||||||
#@INSTALL@ bin/cxx_examples @prefix@/cantera/demos/c++
|
#@INSTALL@ bin/cxx_examples @prefix@/cantera/demos/c++
|
||||||
|
|
||||||
|
@ -1,23 +1,50 @@
|
|||||||
import sys, os
|
import sys, os, string
|
||||||
prefix = sys.argv[1]
|
prefix = sys.argv[1]
|
||||||
pycmd = sys.argv[2]
|
pycmd = sys.argv[2]
|
||||||
if prefix == '-': prefix = '/usr/local'
|
localinst = 1
|
||||||
|
if prefix == '-':
|
||||||
|
prefix = '/usr/local'
|
||||||
|
|
||||||
|
if prefix == '/usr/local':
|
||||||
|
localinst = 0
|
||||||
|
|
||||||
bindir = prefix+'/bin'
|
bindir = prefix+'/bin'
|
||||||
libdir = prefix+'/lib/cantera'
|
libdir = prefix+'/lib/cantera'
|
||||||
hdrdir = prefix+'/include/cantera'
|
hdrdir = prefix+'/include/cantera'
|
||||||
|
|
||||||
f = open(prefix+'/cantera/cantera_init','w')
|
f = open(prefix+'/cantera/setup_cantera','w')
|
||||||
f.write('#!/bin/sh\n')
|
f.write('#!/bin/sh\n')
|
||||||
libpath = os.getenv('LD_LIBRARY_PATH')
|
f.write('LD_LIBRARY_PATH='+libdir+':$LD_LIBRARY_PATH\nexport LD_LIBRARY_PATH\n')
|
||||||
if libpath:
|
f.write('PATH='+bindir+':$PATH\nexport PATH\n')
|
||||||
f.write('LD_LIBRARY_PATH='+libdir+':'+libpath+'\n')
|
f.write('PYTHON_CMD='+pycmd+'\nexport PYTHON_CMD\n')
|
||||||
else:
|
|
||||||
f.write('LD_LIBRARY_PATH='+libdir+'\n')
|
|
||||||
f.write('PATH='+bindir+':$PATH\n')
|
|
||||||
f.write('PYTHON_CMD='+pycmd+'\n')
|
|
||||||
if pycmd <> 'python':
|
if pycmd <> 'python':
|
||||||
f.write('alias ctpython='+pycmd+'\n')
|
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.close()
|
||||||
|
|
||||||
f = open(bindir+'/mixmaster.py','w')
|
f = open(bindir+'/mixmaster.py','w')
|
||||||
@ -50,12 +77,15 @@ File locations:
|
|||||||
if ctpath <> "-":
|
if ctpath <> "-":
|
||||||
print """
|
print """
|
||||||
Python package """+ctpath
|
Python package """+ctpath
|
||||||
|
if warn <> '':
|
||||||
|
print warn
|
||||||
|
|
||||||
print """
|
print """
|
||||||
A shell script 'cantera_init' has been written that configures the
|
|
||||||
environment for Cantera. It may be found in
|
setup script """+prefix+"""/cantera/setup_cantera
|
||||||
"""+prefix+"""/cantera. It is recommended that you run this script
|
|
||||||
before using Cantera, or include its contents in your shell login
|
The setup script configures the environment for Cantera. It is
|
||||||
script.
|
recommended that you run this script before using Cantera, or
|
||||||
"""
|
include its contents in your shell login script. """
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user