Skip to content

Commit

Permalink
[SCons] Check instRoot instead of just prefix
Browse files Browse the repository at this point in the history
Since the staging directory can be set when the prefix is the current
directory, the install should be able to continue in that case.
  • Loading branch information
bryanwweber committed May 20, 2020
1 parent a87f94f commit 55daf25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,6 @@ print()
# *** Configure system-specific properties ***
# ********************************************

# Prevent setting prefix for Cantera installation to source directory
if os.path.abspath(env['prefix']) == Dir('.').abspath:
print('ERROR: cannot install Cantera into source directory.')
exit(1)

# Copy in external environment variables
if env['env_vars'] == 'all':
env['ENV'].update(os.environ)
Expand Down Expand Up @@ -1440,6 +1435,11 @@ if env['stage_dir']:
else:
instRoot = env['prefix']

# Prevent setting Cantera installation path to source directory
if os.path.abspath(instRoot) == Dir('.').abspath:
print('ERROR: cannot install Cantera into source directory.')
exit(1)

if env['layout'] == 'debian':
base = pjoin(os.getcwd(), 'debian')

Expand Down

0 comments on commit 55daf25

Please sign in to comment.