Skip to content

Commit 23bb27b

Browse files
committed
correct emscripten vars
1 parent 39f8f67 commit 23bb27b

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

emscripten/_sysconfigdata__emscripten_wasm32-emscripten.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"CCSHARED": "",
99
"CFLAGS": "-Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g "
1010
"-fwrapv -O3 -Wall -O2 -g0 -fPIC",
11-
"EXT_SUFFIX": ".cpython-310-wasm32-emscripten.so",
11+
"EXT_SUFFIX": ".cpython-313-wasm32-emscripten.so",
1212
"HOST_GNU_TYPE": "wasm32-unknown-emscripten",
1313
"LDSHARED": "emcc -sSIDE_MODULE=1",
1414
"Py_DEBUG": "0",
15-
"py_version_nodot": "310",
15+
"py_version_nodot": "313",
1616
}

noxfile.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def test_examples_emscripten(session: nox.Session):
274274
examples_dir / "namespace_package",
275275
]
276276

277+
python_version = os.environ["PYTHON_VERSION"]
278+
emscripten_version = os.environ["EMSCRIPTEN_VERSION"]
279+
277280
with tempfile.NamedTemporaryFile() as pyo3_config:
278281
pyo3_config.write(f"""\
279282
implementation=CPython
@@ -283,13 +286,15 @@ def test_examples_emscripten(session: nox.Session):
283286
pointer_width=32
284287
""")
285288

289+
emscripten_version_joined = emscripten_version.replace('.', '_')
290+
286291
for example in test_crates:
287292
env = os.environ.copy()
288293
env.update(
289294
RUSTUP_TOOLCHAIN="nightly",
290295
PYTHONPATH=str(EMSCRIPTEN_DIR),
291296
_PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata__emscripten_wasm32-emscripten",
292-
_PYTHON_HOST_PLATFORM="emscripten_3_1_14_wasm32",
297+
_PYTHON_HOST_PLATFORM=f"emscripten_{emscripten_version_joined}_wasm32",
293298
CARGO_BUILD_TARGET="wasm32-unknown-emscripten",
294299
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_LINKER=str(
295300
EMSCRIPTEN_DIR / "emcc_wrapper.py"

0 commit comments

Comments
 (0)