|
15 | 15 | # docker run -t -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64:latest /io/tools/build-manylinux.sh <librdkafka_tag>
|
16 | 16 |
|
17 | 17 | LIBRDKAFKA_VERSION=$1
|
| 18 | +PYTHON_VERSIONS=("cp37" "cp38" "cp39" "cp310" "cp311" ) |
18 | 19 |
|
19 | 20 | if [[ -z "$LIBRDKAFKA_VERSION" ]]; then
|
20 | 21 | echo "Usage: $0 <librdkafka_tag>"
|
@@ -58,9 +59,14 @@ $(dirname $0)/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} /usr
|
58 | 59 | # Compile wheels
|
59 | 60 | echo "# Compile"
|
60 | 61 | 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 |
64 | 70 | done
|
65 | 71 |
|
66 | 72 | # Bundle external shared libraries into the wheels
|
|
80 | 86 | # Install packages and test
|
81 | 87 | echo "# Installing wheels"
|
82 | 88 | 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 |
90 | 101 | done
|
91 |
| - |
|
0 commit comments