Skip to content

Commit

Permalink
[SCons] Only resolve prefix if stage_dir isn't set
Browse files Browse the repository at this point in the history
Eager resolution of the prefix path to an absolute directory caused the
entire path to the prefix to be used under the stage_dir. As this breaks
the utility of stage_dir, the resolution is conditional on stage_dir
not being among the selected options.

Resolves build failures of the Conda package for Matlab.
  • Loading branch information
bryanwweber committed Mar 30, 2022
1 parent a564868 commit cfbbf0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,8 @@ if env["layout"] == "conda" and os.name == "nt":
env["ct_incdir"] = pjoin(env["prefix"], "Library", "include", "cantera")
env["ct_incroot"] = pjoin(env["prefix"], "Library", "include")
else:
env["prefix"] = str(Path(env["prefix"]).resolve())
if "stage_dir" not in selected_options:
env["prefix"] = str(Path(env["prefix"]).resolve())
env["ct_libdir"] = pjoin(env["prefix"], env["libdirname"])
env["ct_bindir"] = pjoin(env["prefix"], "bin")
env["ct_python_bindir"] = pjoin(env["prefix"], "bin")
Expand Down

0 comments on commit cfbbf0c

Please sign in to comment.