Fixed sometimes requiring root permissions to build

When building with an install target in a system directory,
root permissions are now only required to run "scons install".
This commit is contained in:
Ray Speth 2011-12-15 00:04:12 +00:00
parent 8e1cdc4ce4
commit 5d135738cc

View file

@ -84,12 +84,19 @@ else:
# *** Read user-configurable options ***
# **************************************
# This check prevents requiring root permissions to build when the
# installation directory is not writable by the current user.
if 'install' in COMMAND_LINE_TARGETS:
installPathTest = PathVariable.PathIsDirCreate
else:
installPathTest = PathVariable.PathAccept
opts = Variables('cantera.conf')
opts.AddVariables(
PathVariable(
'prefix',
'Set this to the directory where Cantera should be installed.',
defaults.prefix, PathVariable.PathIsDirCreate),
defaults.prefix, installPathTest),
EnumVariable(
'python_package',
"""If you plan to work in Python, or you want to use the