Skip to content

Commit 222efa9

Browse files
committed
feat: skip header installation when building a wasm wheel with emscripten
1 parent 1a6b714 commit 222efa9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@
3939
LIBIGRAPH_FALLBACK_LIBRARIES = ["igraph"]
4040
LIBIGRAPH_FALLBACK_LIBRARY_DIRS = []
4141

42-
# Check whether we are compiling for PyPy. Headers will not be installed
43-
# for PyPy.
44-
SKIP_HEADER_INSTALL = (platform.python_implementation() == "PyPy") or (
42+
# Check whether we are compiling for PyPy or wasm with emscripten. Headers will
43+
# not be installed in these cases, or when the SKIP_HEADER_INSTALL envvar is
44+
# set explicitly.
45+
SKIP_HEADER_INSTALL = (
46+
platform.python_implementation() == "PyPy" or
47+
(sysconfig.get_config_var("HOST_GNU_TYPE") or "").endswith("emscripten") or
4548
"SKIP_HEADER_INSTALL" in os.environ
4649
)
4750

0 commit comments

Comments
 (0)