Skip to content

Commit b5c82b9

Browse files
authored
Added changes for Python 3.13 wheel generation (confluentinc#1828)
1 parent 645b0d5 commit b5c82b9

File tree

5 files changed

+63
-14
lines changed

5 files changed

+63
-14
lines changed

.semaphore/semaphore.yml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ global_job_config:
1414
- checkout
1515
- mkdir artifacts
1616
blocks:
17-
- name: "Wheels: OSX x64"
17+
- name: "Wheels: OSX x64 - Python 3.6-3.12"
1818
run:
1919
when: "tag =~ '.*'"
2020
dependencies: []
@@ -30,10 +30,33 @@ blocks:
3030
jobs:
3131
- name: Build
3232
commands:
33-
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
33+
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse 2.16.2
3434
- tar -czf wheelhouse-macOS-${ARCH}.tgz wheelhouse
3535
- artifact push workflow wheelhouse-macOS-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/
36-
- name: "Wheels: OSX arm64"
36+
- name: "Wheels: OSX x64 - Python 3.13"
37+
run:
38+
when: "tag =~ '.*'"
39+
dependencies: []
40+
task:
41+
agent:
42+
machine:
43+
type: s1-prod-macos-13-5-amd64
44+
env_vars:
45+
- name: OS_NAME
46+
value: osx
47+
- name: ARCH
48+
value: x64
49+
- name: CIBW_SKIP
50+
value: cp36-* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*
51+
- name: CIBW_ENVIRONMENT_MACOS
52+
value: MACOSX_DEPLOYMENT_TARGET=13
53+
jobs:
54+
- name: Build
55+
commands:
56+
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
57+
- tar -czf wheelhouse-macOS-${ARCH}-py313.tgz wheelhouse
58+
- artifact push workflow wheelhouse-macOS-${ARCH}-py313.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}-py313.tgz/
59+
- name: "Wheels: OSX arm64 - Python 3.8-3.12"
3760
run:
3861
when: "tag =~ '.*'"
3962
dependencies: []
@@ -51,9 +74,34 @@ blocks:
5174
jobs:
5275
- name: Build
5376
commands:
54-
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
77+
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse 2.16.2
5578
- tar -czf wheelhouse-macOS-${ARCH}.tgz wheelhouse
5679
- artifact push workflow wheelhouse-macOS-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/
80+
- name: "Wheels: OSX arm64 - Python 3.13"
81+
run:
82+
when: "tag =~ '.*'"
83+
dependencies: []
84+
task:
85+
agent:
86+
machine:
87+
type: s1-prod-macos-13-5-arm64
88+
env_vars:
89+
- name: OS_NAME
90+
value: osx
91+
- name: CIBW_ARCHS
92+
value: arm64
93+
- name: ARCH
94+
value: arm64
95+
- name: CIBW_SKIP
96+
value: cp38-* cp39-* cp310-* cp311-* cp312-*
97+
- name: CIBW_ENVIRONMENT_MACOS
98+
value: MACOSX_DEPLOYMENT_TARGET=13
99+
jobs:
100+
- name: Build
101+
commands:
102+
- PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse
103+
- tar -czf wheelhouse-macOS-${ARCH}-py313.tgz wheelhouse
104+
- artifact push workflow wheelhouse-macOS-${ARCH}-py313.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}-py313.tgz/
57105
- name: "Wheels: Linux arm64"
58106
run:
59107
when: "tag =~ '.*'"
@@ -206,8 +254,10 @@ blocks:
206254
run:
207255
when: "tag =~ '.*'"
208256
dependencies:
209-
- "Wheels: OSX x64"
210-
- "Wheels: OSX arm64"
257+
- "Wheels: OSX x64 - Python 3.6-3.12"
258+
- "Wheels: OSX x64 - Python 3.13"
259+
- "Wheels: OSX arm64 - Python 3.8-3.12"
260+
- "Wheels: OSX arm64 - Python 3.13"
211261
- "Wheels: Linux arm64"
212262
- "Wheels: Linux x64"
213263
- "Wheels: Windows"

tools/build-manylinux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# docker run -t -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64:latest /io/tools/build-manylinux.sh <librdkafka_tag>
1616

1717
LIBRDKAFKA_VERSION=$1
18-
PYTHON_VERSIONS=("cp36" "cp37" "cp38" "cp39" "cp310" "cp311" "cp312")
18+
PYTHON_VERSIONS=("cp36" "cp37" "cp38" "cp39" "cp310" "cp311" "cp312" "cp313")
1919

2020
if [[ -z "$LIBRDKAFKA_VERSION" ]]; then
2121
echo "Usage: $0 <librdkafka_tag>"
@@ -92,7 +92,7 @@ for PYBIN in /opt/python/cp*/bin; do
9292
"${PYBIN}/pip" -V
9393
"${PYBIN}/pip" install --no-index -f /io/wheelhouse confluent_kafka
9494
"${PYBIN}/python" -c 'import confluent_kafka; print(confluent_kafka.libversion())'
95-
"${PYBIN}/pip" install -r /io/tests/requirements.txt
95+
"${PYBIN}/pip" install pytest
9696
"${PYBIN}/pytest" /io/tests/test_Producer.py
9797
echo "## Uninstalling $PYBIN"
9898
"${PYBIN}/pip" uninstall -y confluent_kafka

tools/mingw-w64/semaphore_commands.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export MAKE=mingw32-make # so that Autotools can find it
88

99
cmd /c mklink /D C:\Python38\python3.exe C:\Python38\python.exe
1010

11-
python -m pip install cibuildwheel==2.16.2
11+
python -m pip install cibuildwheel==2.21.3

tools/wheels/build-wheels.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ set WHEELHOUSE=%4
1313
if [%WHEELHOUSE%]==[] goto usage
1414
echo on
1515

16-
set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH%
16+
set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH% cp313-%BW_ARCH%
1717
set CIBW_BEFORE_BUILD=python -m pip install delvewheel==1.1.4
18-
set CIBW_TEST_REQUIRES=-r tests/requirements.txt
18+
set CIBW_TEST_REQUIRES=pytest
1919
set CIBW_TEST_COMMAND=pytest {project}\tests\test_Producer.py
2020
rem set CIBW_BUILD_VERBOSITY=3
2121
set include=%cd%\%DEST%\build\native\include

tools/wheels/build-wheels.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ this_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010
# Skip PyPy, Python2, old Python3 versions, musl, and x86 builds.
1111
export CIBW_SKIP="pp* cp27-* cp35-* *i686 *musllinux* $CIBW_SKIP"
1212
# Run a simple test suite
13-
export CIBW_TEST_REQUIRES="-r tests/requirements.txt"
13+
export CIBW_TEST_REQUIRES="pytest"
1414
export CIBW_TEST_COMMAND="pytest {project}/tests/test_Producer.py"
1515
export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_28"
1616
export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux_2_28"
1717

18-
1918
librdkafka_version=$1
2019
wheeldir=$2
21-
cibuildwheel_version="2.16.2"
20+
cibuildwheel_version=${3:-"2.21.3"}
2221

2322
if [[ -z $wheeldir ]]; then
2423
echo "Usage: $0 <librdkafka-nuget-version> <wheeldir>"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy