Skip to content

Commit ca04193

Browse files
authored
Disallowed python 3.12 wheel generation (#1606)
1 parent 814525b commit ca04193

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

tools/build-manylinux.sh

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +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=("cp37" "cp38" "cp39" "cp310" "cp311" )
1819

1920
if [[ -z "$LIBRDKAFKA_VERSION" ]]; then
2021
echo "Usage: $0 <librdkafka_tag>"
@@ -58,9 +59,14 @@ $(dirname $0)/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} /usr
5859
# Compile wheels
5960
echo "# Compile"
6061
for PYBIN in /opt/python/cp*/bin; do
61-
echo "## Compiling $PYBIN"
62-
CFLAGS="-Werror -Wno-strict-aliasing -Wno-parentheses" \
63-
"${PYBIN}/pip" wheel /io/ -w unrepaired-wheelhouse/
62+
for PYTHON_VERSION in "${PYTHON_VERSIONS[@]}"; do
63+
if [[ $PYBIN == *"$PYTHON_VERSION"* ]]; then
64+
echo "## Compiling $PYBIN"
65+
CFLAGS="-Werror -Wno-strict-aliasing -Wno-parentheses" \
66+
"${PYBIN}/pip" wheel /io/ -w unrepaired-wheelhouse/
67+
break
68+
fi
69+
done
6470
done
6571

6672
# Bundle external shared libraries into the wheels
@@ -80,12 +86,16 @@ done
8086
# Install packages and test
8187
echo "# Installing wheels"
8288
for PYBIN in /opt/python/cp*/bin/; do
83-
echo "## Installing $PYBIN"
84-
"${PYBIN}/pip" install confluent_kafka -f /io/wheelhouse
85-
"${PYBIN}/python" -c 'import confluent_kafka; print(confluent_kafka.libversion())'
86-
"${PYBIN}/pip" install -r /io/tests/requirements.txt
87-
"${PYBIN}/pytest" /io/tests/test_Producer.py
88-
echo "## Uninstalling $PYBIN"
89-
"${PYBIN}/pip" uninstall -y confluent_kafka
89+
for PYTHON_VERSION in "${PYTHON_VERSIONS[@]}"; do
90+
if [[ $PYBIN == *"$PYTHON_VERSION"* ]]; then
91+
echo "## Installing $PYBIN"
92+
"${PYBIN}/pip" install confluent_kafka -f /io/wheelhouse
93+
"${PYBIN}/python" -c 'import confluent_kafka; print(confluent_kafka.libversion())'
94+
"${PYBIN}/pip" install -r /io/tests/requirements.txt
95+
"${PYBIN}/pytest" /io/tests/test_Producer.py
96+
echo "## Uninstalling $PYBIN"
97+
"${PYBIN}/pip" uninstall -y confluent_kafka
98+
break
99+
fi
100+
done
90101
done
91-

0 commit comments

Comments
 (0)