Skip to content

Commit

Permalink
update cython bounds to 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sreenithi committed Sep 13, 2024
1 parent 5053588 commit 42f1cb8
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 59 deletions.
16 changes: 8 additions & 8 deletions templates/tools/dockerfile/python_pip_builds.include
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#===================================
# Install Python build requirements
# TODO: Update cython bounds as we are using cython 3.0.0 now
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'
2 changes: 1 addition & 1 deletion tools/distrib/install_all_python_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BASEDIR=$(realpath "$BASEDIR")/../..
PACKAGES="grpcio_channelz grpcio_csds grpcio_admin grpcio_health_checking grpcio_reflection grpcio_status grpcio_testing grpcio_csm_observability grpcio_tests"

(cd "$BASEDIR";
pip install --upgrade "cython<3.0.0rc1";
pip install --upgrade "cython<4.0.0rc1";
python setup.py install;
pushd tools/distrib/python/grpcio_tools;
../make_grpcio_tools.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ popd
rm -rf "Python-${PYTHON_VERSION}"

# install cython and wheel
"${PYTHON_PREFIX}/bin/python3" -m pip install --upgrade 'cython<3.0.0rc1' wheel
"${PYTHON_PREFIX}/bin/python3" -m pip install --upgrade 'cython<4.0.0rc1' wheel
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
#===================================
# Install Python build requirements
# TODO: Update cython bounds as we are using cython 3.0.0 now
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'

RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY
#=================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl
#===================================
# Install Python build requirements
# TODO: Update cython bounds as we are using cython 3.0.0 now
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache (use slighly older release of ccache that works older compilers and cmake)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl
#===================================
# Install Python build requirements
# TODO: Update cython bounds as we are using cython 3.0.0 now
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache (use slighly older release of ccache that works older compilers and cmake)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ FROM quay.io/pypa/musllinux_1_1_x86_64:2023-09-17-ae90a16
#===================================
# Install Python build requirements
# TODO: Update cython bounds as we are using cython 3.0.0 now
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache (use slighly older release of ccache that works older compilers and cmake)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ FROM quay.io/pypa/musllinux_1_1_i686:2023-09-17-ae90a16
#===================================
# Install Python build requirements
# TODO: Update cython bounds as we are using cython 3.0.0 now
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache (use slighly older release of ccache that works older compilers and cmake)
Expand Down
2 changes: 1 addition & 1 deletion tools/internal_ci/helper_scripts/requirements.macos.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython<3.0.0rc1
cython<4.0.0rc1
cryptography==3.4.6
PyJWT==2.0.1
pyOpenSSL==20.0.1
Expand Down
14 changes: 7 additions & 7 deletions tools/internal_ci/macos/grpc_distribtests_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc

# TODO(jtattermusch): cleanup this prepare build step (needed for python artifact build)
# install cython for all python versions
python3.7 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.8 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.9 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.10 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.11 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.12 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.13 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.7 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.8 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.9 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.10 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.11 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.12 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.13 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user

# Build all python macos artifacts (this step actually builds all the binary wheels and source archives)
tools/run_tests/task_runner.py -f artifact macos python ${TASK_RUNNER_EXTRA_FILTERS} -j 2 -x build_artifacts/sponge_log.xml || FAILED="true"
Expand Down
2 changes: 1 addition & 1 deletion tools/run_tests/artifacts/build_artifact_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ then
# Any installation step is a potential source of breakages,
# so we are trying to perform as few download-and-install operations
# as possible.
"${PYTHON}" -m pip install --upgrade 'cython<3.0.0rc1'
"${PYTHON}" -m pip install --upgrade 'cython<4.0.0rc1'
fi

# Allow build_ext to build C/C++ files in parallel
Expand Down

0 comments on commit 42f1cb8

Please sign in to comment.