diff --git a/CMakeLists.txt b/CMakeLists.txt index c88bfd4..142447a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ option(WITH_NODE_TESTS "With node tests" OFF) option(LINK_LIBEXPAT "Link libexpat" OFF) option(LINK_LIBMPDEC "Link libmpdec" OFF) +option(LINK_LIBLZMA "Link liblzma" OFF) + # set PY_VERSION to 3.11 if the user has not set it if (NOT DEFINED PY_VERSION) set(PY_VERSION 3.11) @@ -154,6 +156,10 @@ SET(PYTHON_UTIL_LIBS ${CMAKE_INSTALL_PREFIX}/lib/libcrypto.a ) +if(LINK_LIBLZMA) + SET(PYTHON_UTIL_LIBS ${PYTHON_UTIL_LIBS} ${CMAKE_INSTALL_PREFIX}/lib/liblzma.a) +endif() + if (LINK_LIBEXPAT) SET(PYTHON_UTIL_LIBS ${PYTHON_UTIL_LIBS} ${CMAKE_INSTALL_PREFIX}/lib/libexpat.a) diff --git a/build_mkdocs.sh b/build_mkdocs.sh index 98270df..672efc7 100755 --- a/build_mkdocs.sh +++ b/build_mkdocs.sh @@ -23,7 +23,8 @@ if [ ! -d "$WASM_ENV_PREFIX" ]; then --yes \ python=$PYTHON_VERSION "pybind11" nlohmann_json pybind11_json numpy \ bzip2 sqlite zlib zstd libffi exceptiongroup\ - "xeus" "xeus-lite" xeus-python "xeus-javascript" xtl "ipython=8.22.2=py311had7285e_1" "traitlets>=5.14.2" openssl + "xeus" "xeus-lite" xeus-python "xeus-javascript" xtl "ipython=8.22.2=py311had7285e_1" "traitlets>=5.14.2" \ + openssl else echo "Wasm env $WASM_ENV_NAME already exists" diff --git a/tests/tests/test_pyjs.py b/tests/tests/test_pyjs.py index 289338b..11154dc 100644 --- a/tests/tests/test_pyjs.py +++ b/tests/tests/test_pyjs.py @@ -23,6 +23,9 @@ if sys.version_info[0] == 3 and sys.version_info[1] >= 13: def test_ssl_import(): import ssl + + def test_import_lzma(): + import lzma def test_js_submodule(): from pyjs.js import Function