mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[SCons] Fix python_prefix/prefix handling for minimal Python module
Make the case where prefix is specified but python_prefix is not consistent with how the full Python module is handled. Fix a case where the minimal Python module could be installed to a directory named literally 'python_prefix'.
This commit is contained in:
@@ -32,7 +32,6 @@ localenv.Depends(mod, [make_setup, readme, license, "setup.py", "pyproject.toml"
|
||||
install_cmd = ["$python_cmd_esc", "-m", "pip", "install"]
|
||||
user_install = False
|
||||
python_prefix = None
|
||||
python_root = None
|
||||
if localenv["PYTHON_INSTALLER"] == "direct":
|
||||
if localenv["python_prefix"] == "USER":
|
||||
# Install to the OS-dependent user site-packages directory
|
||||
@@ -40,9 +39,12 @@ if localenv["PYTHON_INSTALLER"] == "direct":
|
||||
user_install = True
|
||||
elif localenv["python_prefix"]:
|
||||
# A specific location for the Cantera python module has been given
|
||||
install_cmd.extend((f"--prefix={localenv.subst('python_prefix')}",
|
||||
install_cmd.extend((f"--prefix={localenv.subst('$python_prefix')}",
|
||||
"--no-warn-script-location"))
|
||||
python_prefix = localenv.subst("python_prefix")
|
||||
python_prefix = localenv.subst("$python_prefix")
|
||||
elif not env["default_prefix"]:
|
||||
install_cmd.append(f"--prefix={env['prefix']}")
|
||||
python_prefix = env["prefix"]
|
||||
|
||||
if env["stage_dir"]:
|
||||
# Get the absolute path to the stage directory. If the stage directory is a relative
|
||||
|
||||
Reference in New Issue
Block a user