Commit d3b63101 authored by Roman Yurchak's avatar Roman Yurchak

Better way to pass SKIP_HOST as an environement variable

parent d9b590f5
...@@ -83,7 +83,8 @@ def compile(path, srcpath, pkg, args): ...@@ -83,7 +83,8 @@ def compile(path, srcpath, pkg, args):
orig_dir = Path.cwd() orig_dir = Path.cwd()
os.chdir(srcpath) os.chdir(srcpath)
env = dict(os.environ) 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: try:
subprocess.run([ subprocess.run([
......
...@@ -59,7 +59,7 @@ def collect_args(basename): ...@@ -59,7 +59,7 @@ def collect_args(basename):
path = path.replace(str(ROOTDIR) + ':', '') path = path.replace(str(ROOTDIR) + ':', '')
env['PATH'] = path 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. # Skip compilations of C/Fortran extensions for the target environement.
# We still need to generate the output files for distutils to continue # We still need to generate the output files for distutils to continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment