diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 778f4cba..b85762de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: with: submodules: recursive - name: Set up Python 3.8 - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install tox @@ -37,7 +37,7 @@ jobs: with: submodules: recursive - name: Set up Python 3.8 - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install isal @@ -59,7 +59,7 @@ jobs: - "3.10" - "3.11" - "3.12" - - "3.13-dev" + - "3.13" - "pypy-3.9" - "pypy-3.10" os: ["ubuntu-latest"] @@ -75,7 +75,7 @@ jobs: with: submodules: recursive - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.2.1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install tox and upgrade setuptools @@ -89,10 +89,10 @@ jobs: run: brew install nasm if: runner.os == 'macOS' - name: Set MSVC developer prompt - uses: ilammy/msvc-dev-cmd@v1.6.0 + uses: ilammy/msvc-dev-cmd@v1 if: runner.os == 'Windows' - name: Install nasm (Windows) - uses: ilammy/setup-nasm@v1.2.0 + uses: ilammy/setup-nasm@v1 if: runner.os == 'Windows' - name: Run tests run: tox @@ -110,7 +110,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - uses: uraimo/run-on-arch-action@v2.5.0 + - uses: uraimo/run-on-arch-action@v3 name: Build & run test with: arch: none @@ -151,7 +151,7 @@ jobs: - name: Install requirements (universal) run: conda install isa-l ${{ matrix.python_version}} tox - name: Set MSVC developer prompt - uses: ilammy/msvc-dev-cmd@v1.6.0 + uses: ilammy/msvc-dev-cmd@v1 if: runner.os == 'Windows' - name: Run tests (dynamic link) run: tox @@ -194,7 +194,7 @@ jobs: with: submodules: recursive fetch-depth: 0 # Fetch everything to get accurately versioned tag. - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python - name: Install cibuildwheel twine wheel run: python -m pip install cibuildwheel twine wheel @@ -202,14 +202,14 @@ jobs: run: brew install nasm if: runner.os == 'macOS' - name: Set MSVC developer prompt - uses: ilammy/msvc-dev-cmd@v1.6.0 + uses: ilammy/msvc-dev-cmd@v1 if: runner.os == 'Windows' - name: Install nasm (Windows) - uses: ilammy/setup-nasm@v1.2.0 + uses: ilammy/setup-nasm@v1 if: runner.os == 'Windows' - name: Set up QEMU if: ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'aarch64'}} - uses: docker/setup-qemu-action@v1.0.1 + uses: docker/setup-qemu-action@v3 with: platforms: arm64 - name: Build wheels diff --git a/.gitmodules b/.gitmodules index 11a84d8b..d79a05a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "src/isal/isa-l"] path = src/isal/isa-l - url = https://github.com/rhpvorderman/isa-l.git + url = https://github.com/intel/isa-l.git diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2ffabcb8..805a953a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,15 @@ Changelog .. This document is user facing. Please word the changes in such a way .. that users understand how the changes affect the new version. + +version 1.7.2 +----------------- ++ Use upstream ISA-L version 2.31.1 which includes patches to make + installation on MacOS ARM64 possible. ++ Fix a bug where bytes were copied in the wrong order on big endian + architectures. Fixes test failures on s390x. ++ Enable building on GNU/Hurd platforms. + version 1.7.1 ----------------- + Fix a bug where flushing files when writing in threaded mode did not work diff --git a/docs/conf.py b/docs/conf.py index f92ec8a2..f2ec9dd2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,9 +42,6 @@ # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' -html_theme_options = dict( - display_version=True, -) # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/setup.py b/setup.py index 7491870d..55c89496 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ sys.platform.startswith("netbsd")) SYSTEM_IS_UNIX = (sys.platform.startswith("linux") or sys.platform.startswith("darwin") or + sys.platform.startswith("gnu") or SYSTEM_IS_BSD) SYSTEM_IS_WINDOWS = sys.platform.startswith("win") diff --git a/src/isal/_version.pyi b/src/isal/_version.pyi index bd8c70e0..e59e7032 100644 --- a/src/isal/_version.pyi +++ b/src/isal/_version.pyi @@ -5,4 +5,4 @@ # This file is part of python-isal which is distributed under the # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2. -__version__: int +__version__: str diff --git a/src/isal/isa-l b/src/isal/isa-l index e3569fb7..c387163f 160000 --- a/src/isal/isa-l +++ b/src/isal/isa-l @@ -1 +1 @@ -Subproject commit e3569fb7224f071fe5ae510453f4451497385e44 +Subproject commit c387163fcbca62701d646149564c550c78a4f985 diff --git a/src/isal/isal_shared.h b/src/isal/isal_shared.h index 1a01f081..61610276 100644 --- a/src/isal/isal_shared.h +++ b/src/isal/isal_shared.h @@ -207,8 +207,15 @@ static int bitbuffer_copy(struct inflate_state *state, char *to, size_t n){ int remainder = bits_in_buffer % 8; // Shift the 8-byte bitbuffer read_in so that the bytes are aligned. uint64_t remaining_bytes = state->read_in >> remainder; + #if PY_BIG_ENDIAN + char *remaining_buffer = (char *)&remaining_bytes; + for (int i = 0; i < n; ++i) { + to[i] = remaining_buffer[7-i]; + } + #else // memcpy works because of little-endianness memcpy(to, &remaining_bytes, n); + #endif return 0; } diff --git a/src/isal/isal_zlibmodule.c b/src/isal/isal_zlibmodule.c index 5463e22f..67547be9 100644 --- a/src/isal/isal_zlibmodule.c +++ b/src/isal/isal_zlibmodule.c @@ -266,7 +266,7 @@ PyDoc_STRVAR(isal_zlib_crc32_combine__doc__, " crc2\n" " the second crc32 checksum\n" " crc2_length\n" -" the lenght of the data block crc2 was calculated from\n" +" the length of the data block crc2 was calculated from\n" ); @@ -1643,7 +1643,7 @@ static inline uint32_t load_u32_le(void *address) { static inline uint16_t load_u16_le(void *address) { #if PY_BIG_ENDIAN uint8_t *mem = address; - return mem[0] | (mem[1] << 8) | (mem[2] << 16) | (mem[3] << 24); + return mem[0] | (mem[1] << 8); #else return *(uint16_t *)address; #endif