You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ma...@apache.org on 2024/07/02 15:32:53 UTC
(flink) 02/02: [FLINK-34582] Updates cibuildwheel to support cpython 3.11 wheel package
This is an automated email from the ASF dual-hosted git repository.
mapohl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit c75248e48f41d227be934c9754f7dd3f3b571e37
Author: morazow <m....@gmail.com>
AuthorDate: Thu May 23 16:51:10 2024 +0200
[FLINK-34582] Updates cibuildwheel to support cpython 3.11 wheel package
---
.github/workflows/nightly.yml | 39 +++++++++++++++++++++------------------
flink-python/pyproject.toml | 3 +++
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 67994be49a5..adbdf660888 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -96,7 +96,7 @@ jobs:
s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }}
build_python_wheels:
- name: "Build Python Wheels on ${{ matrix.os }}"
+ name: "Build Python Wheels on ${{ matrix.os_name }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -104,37 +104,40 @@ jobs:
include:
- os: ubuntu-latest
os_name: linux
- python-version: 3.9
- os: macos-latest
os_name: macos
- python-version: 3.9
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- - name: "Install python"
- uses: actions/setup-python@v5
- with:
- python-version: ${{ matrix.python-version }}
- name: "Stringify workflow name"
uses: "./.github/actions/stringify"
id: stringify_workflow
with:
value: ${{ github.workflow }}
+ # Used to host cibuildwheel
+ - name: "Setup Python"
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.x'
+ - name: "Install cibuildwheel"
+ run: python -m pip install cibuildwheel==2.16.5
- name: "Build python wheels for ${{ matrix.os_name }}"
- if: matrix.os_name == 'linux'
- run: |
- cd flink-python
- bash dev/build-wheels.sh
- - name: "Build python wheels for ${{ matrix.os }}"
- if: matrix.os_name == 'macos'
- run: |
- cd flink-python
- python -m pip install --upgrade pip
- pip install cibuildwheel==2.8.0
- cibuildwheel --platform macos --output-dir dist .
+ run: python -m cibuildwheel --output-dir flink-python/dist flink-python
+ env:
+ # Skip -musllinux on Linux builds
+ CIBW_SKIP: "*-musllinux*"
+ # Use manylinux2014 on Linux
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
+ CIBW_BEFORE_ALL_LINUX: pip install patchelf
+ CIBW_BEFORE_BUILD_LINUX: pip install -r flink-python/dev/dev-requirements.txt
+ CIBW_ENVIRONMENT_LINUX: CFLAGS="-I. -include ./dev/glibc_version_fix.h"
+ # Run auditwheel repair on Linux
+ CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair -w {dest_dir} {wheel}"
+ # Skip repair on MacOS
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
- name: "Tar python artifact"
run: tar -czvf python-wheel-${{ matrix.os_name }}.tar.gz -C flink-python/dist .
- name: "Upload python artifact"
diff --git a/flink-python/pyproject.toml b/flink-python/pyproject.toml
index c21b2fccd5e..0ec9012fbc8 100644
--- a/flink-python/pyproject.toml
+++ b/flink-python/pyproject.toml
@@ -31,3 +31,6 @@ build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*"]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
+
+[tool.cibuildwheel.linux]
+archs = ["x86_64"]