From 80b860ce6452f1934585019f9d4470f51c989dd2 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Fri, 12 Jan 2024 21:37:04 -0500 Subject: [PATCH 1/6] Try removing old wheels. --- .github/workflows/wheels.yml | 85 +----------------------------------- 1 file changed, 1 insertion(+), 84 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8bb3160..450973e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + os: [ubuntu-20.04, windows-2019, macos-12] arch: ["x86_64", "arm64"] include: - os: windows-2019 @@ -50,89 +50,6 @@ jobs: path: wheelhouse/*.whl if-no-files-found: error - wheels-old: - name: Build old wheels on ${{ matrix.os }} for ${{ matrix.arch }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, windows-2019, macos-11] - arch: ["x86_64"] - include: - - os: windows-2019 - arch: win_amd64 - - os: windows-2019 - arch: win32 - - os: ubuntu-20.04 - arch: i686 - - os: ubuntu-20.04 - arch: aarch64 - - os: ubuntu-20.04 - arch: ppc64le - - os: ubuntu-20.04 - arch: s390x - exclude: - - os: windows-2019 - arch: "x86_64" - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 - with: - platforms: all - - name: Build and test wheels - uses: pypa/cibuildwheel@v1.12.0 - env: - CIBW_ARCHS: all - CIBW_BUILD_VERBOSITY: 3 - CIBW_BUILD: "*${{ matrix.arch }}" - CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* pp37-* pp*-macosx* cp35-macosx_x86_64 - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest {package}/tests - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: ${{ runner.os }}-${{ matrix.arch }} - path: wheelhouse/*.whl - if-no-files-found: error - - wheels-win27: - name: Build Python 2.7 wheels on Windows ${{ matrix.arch }} - runs-on: windows-2019 - strategy: - fail-fast: false - matrix: - arch: ["amd64", "win32"] - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Prepare compiler environment for Windows - if: runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.arch }} - - name: Set Windows environment variables - if: runner.os == 'Windows' - shell: bash - run: | - echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV - echo "MSSdk=1" >> $GITHUB_ENV - - name: Build and test wheels - uses: pypa/cibuildwheel@v1.12.0 - env: - CIBW_BUILD_VERBOSITY: 3 - CIBW_BUILD: "*27*${{ matrix.arch }}" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest {package}/tests - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: ${{ runner.os }}-${{ matrix.arch }} - path: wheelhouse/*.whl - if-no-files-found: error - sdist: name: Build sdist runs-on: ubuntu-latest From 3edeff4727cf71ef271da0f14a55716992b00a28 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Sat, 13 Jan 2024 14:51:06 -0500 Subject: [PATCH 2/6] CHange build-macos action to stop calling setup.py. --- .github/workflows/build-macos.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 3a5ae1a..479b2ae 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -28,14 +28,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - architecture: x64 +# architecture: x64 - name: Build wheel env: LZO_DIR: ./lzo-2.10 run: | - python -m pip install -U pip - python -m pip install -U wheel - python setup.py bdist_wheel + python -m pip install -U pip wheel build + python -m build - name: Upload artifact uses: actions/upload-artifact@v3 with: From 692b6d60cca25211d63e559e4b1cc697b66ad2e0 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Sat, 13 Jan 2024 14:52:44 -0500 Subject: [PATCH 3/6] Correct job name in build-macos action. --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 479b2ae..0d98968 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: - build-w64: + build-macos: runs-on: macos-12 strategy: matrix: From dcfe26728d36ff5f1b7757ac579bddfe3952b2af Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Sat, 13 Jan 2024 15:01:40 -0500 Subject: [PATCH 4/6] Change build-windows action to stop calling setup.py. --- .github/workflows/build-windows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index ec9d919..ec77c41 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -45,9 +45,8 @@ jobs: env: LZO_DIR: C:\src\lzo-2.10 run: | - python -m pip install -U pip - python -m pip install -U wheel - python setup.py bdist_wheel + python -m pip install -U pip wheel build + python -m build - name: Upload artifact uses: actions/upload-artifact@v3 with: From 46c671a514539960e2104fcfa8638a2cfbb11019 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Sat, 13 Jan 2024 15:09:22 -0500 Subject: [PATCH 5/6] Change windows action to use included lzo. --- .github/workflows/build-windows.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index ec77c41..2142d42 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -18,13 +18,8 @@ jobs: uses: actions/checkout@v3 with: persist-credentials: false - - name: Download lzo and extract it - run: | - if not exist C:\src\ (md C:\src) - if not exist C:\src\lzo-2.10.tar.gz (curl -fsS http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz -o C:\src\lzo-2.10.tar.gz) - python tarxfz.py - name: Run cmake - working-directory: C:\src\lzo-2.10 + working-directory: .\lzo-2.10 run: | md build cd build @@ -34,8 +29,8 @@ jobs: with: msbuild-architecture: x64 - name: Build lzo static lib - working-directory: C:\src\lzo-2.10\build - run: msbuild lzo_static_lib.vcxproj -p:Configuration=Release;Platform=x64;OutDir=C:\src\lzo-2.10 + working-directory: .\lzo-2.10\build + run: msbuild lzo_static_lib.vcxproj -p:Configuration=Release;Platform=x64;OutDir=..\ - name: Set up Python uses: actions/setup-python@v4 with: @@ -43,7 +38,7 @@ jobs: architecture: x64 - name: Build wheel env: - LZO_DIR: C:\src\lzo-2.10 + LZO_DIR: .\lzo-2.10 run: | python -m pip install -U pip wheel build python -m build From ce719fa71ae51d7dde0a925179f0ec79130a3d3e Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Sat, 13 Jan 2024 15:18:07 -0500 Subject: [PATCH 6/6] Remove missed references to old wheels and py27. --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 450973e..d800657 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -80,8 +80,8 @@ jobs: publish: name: Publish builds on PyPI runs-on: ubuntu-latest - needs: [sdist, wheels, wheels-old, wheels-win27] - if: ${{ always() && (needs.sdist.result == 'success' || needs.wheels.result == 'success' || needs.wheels-old.result == 'success' || needs.wheels-win27.result == 'success') }} + needs: [sdist, wheels] + if: ${{ always() && (needs.sdist.result == 'success' || needs.wheels.result == 'success') }} environment: name: release url: https://test.pypi.org/p/python-lzo