Skip to content

Commit

Permalink
On Unix-like systems, $python_prefix defaults to $prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jul 14, 2012
1 parent 0a460a9 commit 9c89a8e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ else:

defaults.fsLayout = 'compact' if env['OS'] == 'Windows' else 'standard'
defaults.env_vars = 'LD_LIBRARY_PATH' if 'LD_LIBRARY_PATH' in os.environ else ''
defaults.python_prefix = '$prefix' if env['OS'] != 'Windows' else ''

# **************************************
# *** Read user-configurable options ***
Expand Down Expand Up @@ -280,11 +281,12 @@ opts.AddVariables(
'', PathVariable.PathAccept),
PathVariable(
'python_prefix',
"""If you want to install the Cantera Python package somewhere other
than the default 'site-packages' directory within the Python library
directory, then set this to the desired directory. This is useful
when you do not have write access to the Python library directory.""",
'', PathVariable.PathAccept),
"""Use this option if you want to install the Cantera Python package to
an alternate location. On Unix-like systems, the default is the same
as the $prefix option. If this option is set to the empty string (the
default on Windows), then the Package will be installed to the system
default 'site-packages' directory.""",
defaults.python_prefix, PathVariable.PathAccept),
EnumVariable(
'matlab_toolbox',
"""This variable controls whether the Matlab toolbox will be built. If
Expand Down Expand Up @@ -1174,6 +1176,7 @@ build_cantera = Alias('build', finish_build)
Default('build')

def postInstallMessage(target, source, env):
env['python_module_loc'] = env.subst(env['python_module_loc'])
print """
Cantera has been successfully installed.
Expand Down

0 comments on commit 9c89a8e

Please sign in to comment.