diff --git a/interfaces/python_minimal/SConscript b/interfaces/python_minimal/SConscript index c764bd3645..1ae8a19370 100644 --- a/interfaces/python_minimal/SConscript +++ b/interfaces/python_minimal/SConscript @@ -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