diff --git a/conda_build/build.py b/conda_build/build.py index 81fb526011..b64ea641dd 100644 --- a/conda_build/build.py +++ b/conda_build/build.py @@ -2607,6 +2607,7 @@ def build( utils.rm_rf(m.config.info_dir) files1 = utils.prefix_files(prefix=m.config.host_prefix) + os.makedirs(m.config.build_folder, exist_ok=True) with open(join(m.config.build_folder, "prefix_files.txt"), "w") as f: f.write("\n".join(sorted(list(files1)))) f.write("\n") diff --git a/conda_build/environ.py b/conda_build/environ.py index 853da44e02..7ef1b2a33d 100644 --- a/conda_build/environ.py +++ b/conda_build/environ.py @@ -580,7 +580,7 @@ def get_shlib_ext(host_platform): return ".dll" elif host_platform in ["osx", "darwin"]: return ".dylib" - elif host_platform.startswith("linux"): + elif host_platform.startswith("linux") or host_platform.endswith("-wasm32"): return ".so" elif host_platform == "noarch": # noarch packages should not contain shared libraries, use the system diff --git a/conda_build/metadata.py b/conda_build/metadata.py index 33c3230573..47f3166727 100644 --- a/conda_build/metadata.py +++ b/conda_build/metadata.py @@ -124,14 +124,17 @@ def get_selectors(config: Config) -> dict[str, bool]: linux=plat.startswith("linux-"), linux32=bool(plat == "linux-32"), linux64=bool(plat == "linux-64"), + emscripten=plat.startswith("emscripten-"), + wasi=plat.startswith("wasi-"), arm=plat.startswith("linux-arm"), osx=plat.startswith("osx-"), - unix=plat.startswith(("linux-", "osx-")), + unix=plat.startswith(("linux-", "osx-", "emscripten-")), win=plat.startswith("win-"), win32=bool(plat == "win-32"), win64=bool(plat == "win-64"), x86=plat.endswith(("-32", "-64")), x86_64=plat.endswith("-64"), + wasm32=bool(plat.endswith("-wasm32")), os=os, environ=os.environ, nomkl=bool(int(os.environ.get("FEATURE_NOMKL", False))), diff --git a/conda_build/utils.py b/conda_build/utils.py index aa375790f3..989cf0dba4 100644 --- a/conda_build/utils.py +++ b/conda_build/utils.py @@ -113,6 +113,8 @@ def glob(pathname, recursive=True): mmap_PROT_WRITE = 0 if on_win else mmap.PROT_WRITE DEFAULT_SUBDIRS = { + "emscripten-wasm32", + "wasi-wasm32", "linux-64", "linux-32", "linux-s390x", diff --git a/news/4813-wasm-platforms b/news/4813-wasm-platforms new file mode 100644 index 0000000000..1dd82f5479 --- /dev/null +++ b/news/4813-wasm-platforms @@ -0,0 +1,19 @@ +### Enhancements + +* Handle `emscripten-wasm32` and `wasi-wasm32` platforms. (#4813) + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* + +### Other + +* diff --git a/tests/test_api_skeleton.py b/tests/test_api_skeleton.py index 10d9a6973e..514d469c56 100644 --- a/tests/test_api_skeleton.py +++ b/tests/test_api_skeleton.py @@ -28,13 +28,19 @@ from conda_build.utils import on_win from conda_build.version import _parse as parse_version -SYMPY_URL = "https://pypi.python.org/packages/source/s/sympy/sympy-1.10.tar.gz#md5=b3f5189ad782bbcb1bedc1ec2ca12f29" +SYMPY_URL = ( + "https://files.pythonhosted.org/packages/7d/23/70fa970c07f0960f7543af982d2554be805e1034b9dcee9cb3082ce80f80/sympy-1.10.tar.gz" + "#sha256=6cf85a5cfe8fff69553e745b05128de6fc8de8f291965c63871c79701dc6efc9" +) PYLINT_VERSION = "2.3.1" PYLINT_HASH_TYPE = "sha256" PYLINT_HASH_VALUE = "723e3db49555abaf9bf79dc474c6b9e2935ad82230b10c1138a71ea41ac0fff1" +PYLINT_HASH_VALUE_BLAKE2 = ( + "018b538911c0ebc2529f15004f4cb07e3ca562bb9aacea5df89cc25b62e01891" +) PYLINT_FILENAME = f"pylint-{PYLINT_VERSION}.tar.gz" -PYLINT_URL = f"https://pypi.python.org/packages/source/p/pylint/{PYLINT_FILENAME}#{PYLINT_HASH_TYPE}={PYLINT_HASH_VALUE}" +PYLINT_URL = f"https://files.pythonhosted.org/packages/{PYLINT_HASH_VALUE_BLAKE2[:2]}/{PYLINT_HASH_VALUE_BLAKE2[2:4]}/{PYLINT_HASH_VALUE_BLAKE2[4:]}/{PYLINT_FILENAME}" @pytest.fixture