Better way to pass SKIP_HOST as an environement variable

This commit is contained in:
Roman Yurchak 2018-10-29 13:27:14 +01:00
parent d9b590f518
commit d3b6310140
2 changed files with 3 additions and 2 deletions

View File

@ -83,7 +83,8 @@ def compile(path, srcpath, pkg, args):
orig_dir = Path.cwd()
os.chdir(srcpath)
env = dict(os.environ)
env['SKIP_HOST'] = str(pkg.get('build', {}).get('skip_host', True))
if pkg.get('build', {}).get('skip_host', True):
env['SKIP_HOST'] = ''
try:
subprocess.run([

View File

@ -59,7 +59,7 @@ def collect_args(basename):
path = path.replace(str(ROOTDIR) + ':', '')
env['PATH'] = path
skip_host = os.environ.get('SKIP_HOST', 'True').lower() == 'true'
skip_host = 'SKIP_HOST' in os.environ
# Skip compilations of C/Fortran extensions for the target environement.
# We still need to generate the output files for distutils to continue