From a71746a0f210dd54e9b6ef94f558e896e218616a Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Sun, 7 Jan 2024 13:09:48 +1000 Subject: [PATCH 1/4] fix(doc): Install command missing a parameter The `--no-binary` option needs a parameter, as indicated in the pip documentation here https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-no-binary --- docs/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.rst b/docs/install.rst index 664ffd3..f6eeafe 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -40,7 +40,7 @@ this command will result in the extension modules being compiled from source:: On systems for which pre-built wheels are available, the following command will force a local compilation of the extension modules from source:: - $ pip install --no-binary --no-cache-dir lz4 + $ pip install --no-binary :all: --no-cache-dir lz4 The package can also be installed manually from a checkout of the source code git repository:: From 4929607b62e9275368677b73f4372d0101f400b7 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 7 Mar 2024 09:34:04 +0100 Subject: [PATCH 2/4] docs/lz4.block.rst: fix typo --- docs/lz4.block.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lz4.block.rst b/docs/lz4.block.rst index 0b2ef10..5c7f0c7 100644 --- a/docs/lz4.block.rst +++ b/docs/lz4.block.rst @@ -84,7 +84,7 @@ can be used in this case. True In this example we are catching the `lz4.block.LZ4BlockError` -exception. This exception is raisedd if the LZ4 library call fails, +exception. This exception is raised if the LZ4 library call fails, which can be caused by either the buffer used to store the uncompressed data (as set by `usize`) being too small, or the input compressed data being invalid - it is not possible to distinguish the From d2248984f30156726423ab1b31790fc16e031c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Duarte?= Date: Wed, 18 Sep 2024 17:10:31 +0000 Subject: [PATCH 3/4] Update CI - Updates all GH Actions to their latest versions - Removes Python 3.8 (EOL) - Adds Python 3.13 - Stops fail-fast to avoid wasting builds for a single failure --- .github/workflows/build_dist.yml | 70 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index fe70b79..b38968d 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -9,55 +9,68 @@ on: types: [created] pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: sdist: name: Build source distribution runs-on: ubuntu-latest steps: - - name: Check out repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work - - name: Install Python 3.x - uses: actions/setup-python@v4 - with: - python-version: 3.x - - name: Install setuptools - run: pip install setuptools - - name: Build sdist - run: python setup.py sdist - - name: Save sdist - uses: actions/upload-artifact@v3 - with: - path: dist/*.tar.gz + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work + - name: Install Python 3.x + uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Install setuptools + run: pip install setuptools + - name: Build sdist + run: python setup.py sdist + - name: Save sdist + uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/*.tar.gz wheels: name: Build wheels on ${{ matrix.os }} CIBW_BUILD=${{ matrix.cibw_build }} runs-on: ${{ matrix.os }} strategy: + # since multiple builds run at the same time, cancelling them all when one + # fails is wasteful and forces handling build problems one by one instead + # of showing a "full picture" + fail-fast: false matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - cibw_build: [cp38-*, cp39-*, cp310-*, cp311-*, cp312-*] + os: + - ubuntu-latest + - macos-13 # x86 + - macos-latest # arm + - windows-latest + cibw_build: [cp39-*, cp310-*, cp311-*, cp312-*, cp313-*] steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work + fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work - name: Install Python 3.x - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.x - - name: Set up QEMU # Needed to build aarch64 wheels + - name: Set up QEMU # Needed to build aarch64 wheels if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.21 env: CIBW_ENVIRONMENT: PYLZ4_USE_SYSTEM_LZ4="False" CIBW_ARCHS_LINUX: "x86_64 i686 aarch64" - CIBW_ARCHS_MACOS: "x86_64 arm64" # universal2" + CIBW_ARCHS_MACOS: "auto64" # since we have both runner arches CIBW_ARCHS_WINDOWS: "AMD64 x86" CIBW_BUILD: ${{ matrix.cibw_build }} CIBW_SKIP: "cp*-musllinux*" @@ -65,8 +78,9 @@ jobs: CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64 *-*linux_{aarch64,ppc64le,s390x}" CIBW_BEFORE_BUILD: "python -m pip install -U pip && python -m pip install tox" - name: Save wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ strategy.job-index }} path: wheelhouse/*.whl upload_pypi: @@ -75,9 +89,9 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: artifact + pattern: cibw-* path: dist - uses: pypa/gh-action-pypi-publish@release/v1 with: From feb19af092628ed0804814dd161084700a33bcab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Duarte?= Date: Thu, 17 Oct 2024 08:58:50 +0000 Subject: [PATCH 4/4] Update setup.py Python versions --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f3a226d..9bc91f0 100644 --- a/setup.py +++ b/setup.py @@ -171,7 +171,7 @@ def pkgconfig_installed_check(lib, required_version, default): use_scm_version={ 'write_to': "lz4/version.py", }, - python_requires=">=3.8", + python_requires=">=3.9", setup_requires=[ 'setuptools_scm', 'pkgconfig', @@ -200,10 +200,10 @@ def pkgconfig_installed_check(lib, required_version, default): 'Intended Audience :: Developers', 'Programming Language :: C', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], )