From d3b6310140d32ba5be6bda31e85f670c6cd79ee1 Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Mon, 29 Oct 2018 13:27:14 +0100 Subject: [PATCH] Better way to pass SKIP_HOST as an environement variable --- pyodide_build/buildpkg.py | 3 ++- pyodide_build/pywasmcross.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyodide_build/buildpkg.py b/pyodide_build/buildpkg.py index 9745f7a2c..d92e0ff97 100755 --- a/pyodide_build/buildpkg.py +++ b/pyodide_build/buildpkg.py @@ -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([ diff --git a/pyodide_build/pywasmcross.py b/pyodide_build/pywasmcross.py index f49922baa..63eb16c92 100755 --- a/pyodide_build/pywasmcross.py +++ b/pyodide_build/pywasmcross.py @@ -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