Skip to content

Commit 9c89a8e

Browse files
committed
On Unix-like systems, $python_prefix defaults to $prefix
1 parent 0a460a9 commit 9c89a8e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Diff for: SConstruct

+8-5
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ else:
231231

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

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

11761178
def postInstallMessage(target, source, env):
1179+
env['python_module_loc'] = env.subst(env['python_module_loc'])
11771180
print """
11781181
Cantera has been successfully installed.
11791182

0 commit comments

Comments
 (0)