Add templating and support for Python 3.13 (#37643)

This PR adds templating for Python versions and updates the maximum supported Python version to 3.13. The following major changes related to templating are added:
 - Minimum supported Python version and list of supported versions in `setup.py` are fetched using new template generated files called `python_version.py`
 - Dockerfiles for the different Python Linux builds are now template generated.
 - The "Supported Python Versions" section from READMEs of ancillary and main packages have been removed

Note: All the `python_version.py` files and Linux build `Dockerfiles` except `tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile` in the PR are generated from the respective templates.

Further non-templated additions to add support for Python 3.13:
 - install scripts and artifacts for windows, macos and linux are added manually. Later, these can be templated as well.
 - updated cython bounds to 3.x
 - updated twine version to solve [cgi module import error](https://github.com/pypa/twine/issues/1046)
 - the twine update introduces a dependency on cryptography>=2.0. But the cryptography package doesn't support 32-bit Linux images and hence `twine check` has been disabled for x86 manylinux and x86 musllinux artifacts.

Closes #37643

PiperOrigin-RevId: 678954495
pull/37788/head^2
Sreenithi Sridharan 2 months ago committed by Copybara-Service
parent ac31fb0f61
commit f2ffbb89a2
  1. 1
      PYTHON-MANIFEST.in
  2. 2
      WORKSPACE
  3. 6
      bazel/grpc_python_deps.bzl
  4. 1
      black.toml
  5. 7
      build_handwritten.yaml
  6. 27
      setup.py
  7. 3
      src/python/grpcio/README.rst
  8. 20
      src/python/grpcio/python_version.py
  9. 1
      src/python/grpcio_admin/MANIFEST.in
  10. 20
      src/python/grpcio_admin/python_version.py
  11. 5
      src/python/grpcio_admin/setup.py
  12. 1
      src/python/grpcio_channelz/MANIFEST.in
  13. 3
      src/python/grpcio_channelz/README.rst
  14. 2
      src/python/grpcio_channelz/grpc_version.py
  15. 20
      src/python/grpcio_channelz/python_version.py
  16. 29
      src/python/grpcio_channelz/setup.py
  17. 1
      src/python/grpcio_csds/MANIFEST.in
  18. 20
      src/python/grpcio_csds/python_version.py
  19. 4
      src/python/grpcio_csds/setup.py
  20. 1
      src/python/grpcio_csm_observability/MANIFEST.in
  21. 3
      src/python/grpcio_csm_observability/README.rst
  22. 20
      src/python/grpcio_csm_observability/python_version.py
  23. 4
      src/python/grpcio_csm_observability/setup.py
  24. 1
      src/python/grpcio_health_checking/MANIFEST.in
  25. 3
      src/python/grpcio_health_checking/README.rst
  26. 20
      src/python/grpcio_health_checking/python_version.py
  27. 27
      src/python/grpcio_health_checking/setup.py
  28. 1
      src/python/grpcio_observability/MANIFEST.in
  29. 3
      src/python/grpcio_observability/README.rst
  30. 20
      src/python/grpcio_observability/python_version.py
  31. 3
      src/python/grpcio_observability/setup.py
  32. 1
      src/python/grpcio_reflection/MANIFEST.in
  33. 3
      src/python/grpcio_reflection/README.rst
  34. 20
      src/python/grpcio_reflection/python_version.py
  35. 27
      src/python/grpcio_reflection/setup.py
  36. 1
      src/python/grpcio_status/MANIFEST.in
  37. 3
      src/python/grpcio_status/README.rst
  38. 20
      src/python/grpcio_status/python_version.py
  39. 27
      src/python/grpcio_status/setup.py
  40. 3
      src/python/grpcio_testing/README.rst
  41. 22
      templates/src/python/grpcio/python_version.py.template
  42. 22
      templates/src/python/grpcio_admin/python_version.py.template
  43. 2
      templates/src/python/grpcio_channelz/grpc_version.py.template
  44. 22
      templates/src/python/grpcio_channelz/python_version.py.template
  45. 22
      templates/src/python/grpcio_csds/python_version.py.template
  46. 22
      templates/src/python/grpcio_csm_observability/python_version.py.template
  47. 22
      templates/src/python/grpcio_health_checking/python_version.py.template
  48. 22
      templates/src/python/grpcio_observability/python_version.py.template
  49. 22
      templates/src/python/grpcio_reflection/python_version.py.template
  50. 22
      templates/src/python/grpcio_status/python_version.py.template
  51. 2
      templates/tools/distrib/python/grpc_version.py.template
  52. 22
      templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template
  53. 22
      templates/tools/distrib/python/grpcio_tools/python_version.py.template
  54. 2
      templates/tools/distrib/python/xds_protos/grpc_version.py.template
  55. 22
      templates/tools/distrib/python/xds_protos/python_version.py.template
  56. 14
      templates/tools/dockerfile/ccache_crosscompile.include
  57. 21
      templates/tools/dockerfile/compile_python_313.include
  58. 22
      templates/tools/dockerfile/git_config.include
  59. 57
      templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template
  60. 28
      templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template
  61. 33
      templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template
  62. 34
      templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template
  63. 27
      templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template
  64. 25
      templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template
  65. 8
      templates/tools/dockerfile/python_pip_builds.include
  66. 1
      templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template
  67. 2
      test/distrib/bazel/python/WORKSPACE
  68. 14
      tools/bazelify_tests/dockerimage_current_versions.bzl
  69. 8
      tools/bazelify_tests/test/BUILD
  70. 4
      tools/bazelify_tests/test/build_artifact_python_linux_x64_cp313.sh
  71. 33
      tools/buildgen/plugins/expand_supported_python_versions.py
  72. 1
      tools/distrib/install_all_python_modules.sh
  73. 2
      tools/distrib/python/grpc_version.py
  74. 2
      tools/distrib/python/grpcio_tools/MANIFEST.in
  75. 20
      tools/distrib/python/grpcio_tools/grpc_tools/python_version.py
  76. 20
      tools/distrib/python/grpcio_tools/python_version.py
  77. 3
      tools/distrib/python/grpcio_tools/setup.py
  78. 1
      tools/distrib/python/xds_protos/MANIFEST.in
  79. 2
      tools/distrib/python/xds_protos/grpc_version.py
  80. 20
      tools/distrib/python/xds_protos/python_version.py
  81. 4
      tools/distrib/python/xds_protos/setup.py
  82. 4
      tools/dockerfile/README.md
  83. 2
      tools/dockerfile/grpc_artifact_python_linux_armv7.current_version
  84. 40
      tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile
  85. 2
      tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh
  86. 2
      tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version
  87. 50
      tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile
  88. 2
      tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version
  89. 48
      tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile
  90. 2
      tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version
  91. 48
      tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile
  92. 2
      tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version
  93. 52
      tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile
  94. 2
      tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version
  95. 50
      tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile
  96. 2
      tools/dockerfile/test/python_debian11_default_x64.current_version
  97. 22
      tools/dockerfile/test/python_debian11_default_x64/Dockerfile
  98. 17
      tools/internal_ci/helper_scripts/install_python_interpreters.ps1
  99. 8
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  100. 2
      tools/internal_ci/helper_scripts/requirements.macos.txt
  101. Some files were not shown because too many files have changed in this diff Show More

@ -17,6 +17,7 @@ include src/python/grpcio/_parallel_compile_patch.py
include src/python/grpcio/_spawn_patch.py
include src/python/grpcio/commands.py
include src/python/grpcio/grpc_version.py
include src/python/grpcio/python_version.py
include src/python/grpcio/grpc_core_dependencies.py
include src/python/grpcio/precompiled.py
include src/python/grpcio/support.py

@ -89,7 +89,7 @@ load("@com_google_protobuf//bazel:system_python.bzl", "system_python")
system_python(
name = "system_python",
minimum_python_version = "3.7",
minimum_python_version = "3.8",
)
load("@system_python//:pip.bzl", system_pip_parse = "pip_parse")

@ -38,9 +38,9 @@ def grpc_python_deps():
http_archive(
name = "cython",
build_file = "@com_github_grpc_grpc//third_party:cython.BUILD",
sha256 = "a2da56cc22be823acf49741b9aa3aa116d4f07fa8e8b35a3cb08b8447b37c607",
strip_prefix = "cython-0.29.35",
sha256 = "2ec7d66d23d6da2328fb24f5c1bec6c63a59ec2e91027766ab904f417e1078aa",
strip_prefix = "cython-3.0.11",
urls = [
"https://github.com/cython/cython/archive/0.29.35.tar.gz",
"https://github.com/cython/cython/archive/3.0.11.tar.gz",
],
)

@ -15,6 +15,7 @@ extend-exclude = '''
| test/cpp/naming/resolver_component_tests_runner.py # AUTO-GENERATED
# AUTO-GENERATED from a template:
| grpc_version.py
| python_version.py
| src/python/grpcio/grpc_core_dependencies.py
| src/python/grpcio/grpc/_grpcio_metadata.py
# AUTO-GENERATED BY make_grpcio_tools.py

@ -16,6 +16,13 @@ settings:
csharp_major_version: 2
g_stands_for: groovy
protobuf_version: 3.28.1
supported_python_versions:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
version: 1.68.0-dev
configs:
asan:

@ -88,6 +88,7 @@ sys.path.insert(0, os.path.abspath(PYTHON_STEM))
import _parallel_compile_patch
import _spawn_patch
import grpc_core_dependencies
import python_version
import commands
import grpc_version
@ -95,19 +96,21 @@ import grpc_version
_parallel_compile_patch.monkeypatch_compile_maybe()
_spawn_patch.monkeypatch_spawn()
LICENSE = "Apache License 2.0"
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]
CLASSIFIERS = (
[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
+ [
f"Programming Language :: Python :: {x}"
for x in python_version.SUPPORTED_PYTHON_VERSIONS
]
+ ["License :: OSI Approved :: Apache Software License"]
)
def _env_bool_value(env_name, default):
@ -596,7 +599,7 @@ setuptools.setup(
packages=list(PACKAGES),
package_dir=PACKAGE_DIRECTORIES,
package_data=PACKAGE_DATA,
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRES,
setup_requires=SETUP_REQUIRES,

@ -8,9 +8,6 @@ Package for gRPC Python.
.. |compat_check_pypi| image:: https://python-compatibility-tools.appspot.com/one_badge_image?package=grpcio
:target: https://python-compatibility-tools.appspot.com/one_badge_target?package=grpcio
Supported Python Versions
-------------------------
Python >= 3.8
Installation
------------

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -1,4 +1,5 @@
include grpc_version.py
include python_version.py
recursive-include grpc_admin *.py
global-exclude *.pyc
include LICENSE

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Break import-style to ensure we can actually find our local modules.
import python_version
import grpc_version
CLASSIFIERS = [
@ -44,6 +46,7 @@ INSTALL_REQUIRES = (
)
SETUP_REQUIRES = INSTALL_REQUIRES
setuptools.setup(
name="grpcio-admin",
version=grpc_version.VERSION,
@ -56,7 +59,7 @@ setuptools.setup(
url="https://grpc.io",
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
)

@ -1,4 +1,5 @@
include grpc_version.py
include python_version.py
recursive-include grpc_channelz *.py *.pyi
global-exclude *.pyc
include LICENSE

@ -3,9 +3,6 @@ gRPC Python Channelz package
Channelz is a live debug tool in gRPC Python.
Supported Python Versions
-------------------------
Python >= 3.8
Dependencies
------------

@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!!
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!!
VERSION = '1.68.0.dev0'

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Break import-style to ensure we can actually find our local modules.
import python_version
import grpc_version
@ -44,17 +46,19 @@ class _NoOpCommand(setuptools.Command):
pass
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]
CLASSIFIERS = (
[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
+ [
f"Programming Language :: Python :: {x}"
for x in python_version.SUPPORTED_PYTHON_VERSIONS
]
+ ["License :: OSI Approved :: Apache Software License"]
)
PACKAGE_DIRECTORIES = {
"": ".",
@ -85,6 +89,7 @@ except ImportError:
"build_package_protos": _NoOpCommand,
}
setuptools.setup(
name="grpcio-channelz",
version=grpc_version.VERSION,
@ -97,7 +102,7 @@ setuptools.setup(
url="https://grpc.io",
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
cmdclass=COMMAND_CLASS,

@ -1,4 +1,5 @@
include grpc_version.py
include python_version.py
recursive-include grpc_csds *.py
global-exclude *.pyc
include LICENSE

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Break import-style to ensure we can actually find our local modules.
import python_version
import grpc_version
CLASSIFIERS = [
@ -57,7 +59,7 @@ setuptools.setup(
url="https://grpc.io",
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
)

@ -1,4 +1,5 @@
graft src/python/grpcio_csm_observability/grpc_csm_observability.egg-info
graft grpc_csm_observability
include grpc_version.py
include python_version.py
include README.rst

@ -3,9 +3,6 @@ gRPC Python CSM Observability
Package for gRPC Python CSM Observability.
Supported Python Versions
-------------------------
Python >= 3.8
Installation
------------

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csm_observability/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -22,6 +22,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
# Ensure we're in the proper directory whether or not we're being used by pip.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
import python_version
import grpc_version
CLASSIFIERS = [
@ -58,6 +60,6 @@ setuptools.setup(
classifiers=CLASSIFIERS,
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
)

@ -1,4 +1,5 @@
include grpc_version.py
include python_version.py
recursive-include grpc_health *.py *.pyi
global-exclude *.pyc
include LICENSE

@ -3,9 +3,6 @@ gRPC Python Health Checking
Reference package for GRPC Python health checking.
Supported Python Versions
-------------------------
Python >= 3.8
Dependencies
------------

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -24,6 +24,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Break import-style to ensure we can actually find our local modules.
import python_version
import grpc_version
@ -43,17 +45,18 @@ class _NoOpCommand(setuptools.Command):
pass
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]
CLASSIFIERS = (
[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
+ [
f"Programming Language :: Python :: {x}"
for x in python_version.SUPPORTED_PYTHON_VERSIONS
]
+ ["License :: OSI Approved :: Apache Software License"]
)
PACKAGE_DIRECTORIES = {
"": ".",
@ -96,7 +99,7 @@ setuptools.setup(
classifiers=CLASSIFIERS,
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
cmdclass=COMMAND_CLASS,

@ -4,5 +4,6 @@ graft grpc_root
graft third_party
include _parallel_compile_patch.py
include grpc_version.py
include python_version.py
include observability_lib_deps.py
include README.rst

@ -17,9 +17,6 @@ Note that while this approach enhances efficiency, it will introduce a slight de
time the data is collected and the time it becomes available through Python exporters.
Supported Python Versions
-------------------------
Python >= 3.8
Installation
------------

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -34,6 +34,7 @@ sys.path.insert(0, os.path.abspath("."))
import _parallel_compile_patch
import observability_lib_deps
import python_version
import grpc_version
@ -287,7 +288,7 @@ setuptools.setup(
classifiers=CLASSIFIERS,
ext_modules=extension_modules(),
packages=list(PACKAGES),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=[
"grpcio=={version}".format(version=grpc_version.VERSION),
"setuptools>=59.6.0",

@ -1,4 +1,5 @@
include grpc_version.py
include python_version.py
recursive-include grpc_reflection *.py *.pyi
global-exclude *.pyc
include LICENSE

@ -3,9 +3,6 @@ gRPC Python Reflection package
Reference package for reflection in GRPC Python.
Supported Python Versions
-------------------------
Python >= 3.8
Dependencies
------------

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Break import-style to ensure we can actually find our local modules.
import python_version
import grpc_version
@ -44,17 +46,18 @@ class _NoOpCommand(setuptools.Command):
pass
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]
CLASSIFIERS = (
[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
+ [
f"Programming Language :: Python :: {x}"
for x in python_version.SUPPORTED_PYTHON_VERSIONS
]
+ ["License :: OSI Approved :: Apache Software License"]
)
PACKAGE_DIRECTORIES = {
"": ".",
@ -97,7 +100,7 @@ setuptools.setup(
url="https://grpc.io",
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
cmdclass=COMMAND_CLASS,

@ -1,4 +1,5 @@
include grpc_version.py
include python_version.py
include grpc_status/google/rpc/status.proto
recursive-include grpc_status *.py
global-exclude *.pyc

@ -3,9 +3,6 @@ gRPC Python Status Proto
Reference package for GRPC Python status proto mapping.
Supported Python Versions
-------------------------
Python >= 3.8
Dependencies
------------

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -24,6 +24,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Break import-style to ensure we can actually find our local modules.
import python_version
import grpc_version
@ -43,17 +45,18 @@ class _NoOpCommand(setuptools.Command):
pass
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]
CLASSIFIERS = (
[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
+ [
f"Programming Language :: Python :: {x}"
for x in python_version.SUPPORTED_PYTHON_VERSIONS
]
+ ["License :: OSI Approved :: Apache Software License"]
)
PACKAGE_DIRECTORIES = {
"": ".",
@ -93,7 +96,7 @@ setuptools.setup(
classifiers=CLASSIFIERS,
package_dir=PACKAGE_DIRECTORIES,
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
cmdclass=COMMAND_CLASS,
)

@ -3,9 +3,6 @@ gRPC Python Testing Package
Testing utilities for gRPC Python
Supported Python Versions
-------------------------
Python >= 3.8
Dependencies
------------

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -14,6 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!!
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!!
VERSION = '${settings.python_version.pep440()}'

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csm_observability/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpc_version.py.template`!!!
VERSION = '${settings.python_version.pep440()}'
PROTOBUF_VERSION = '${settings.protobuf_version}'

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/grpc_version.py.template`!!!
VERSION = '${settings.python_version.pep440()}'
PROTOBUF_VERSION = '${settings.protobuf_version}'

@ -0,0 +1,22 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions}
MIN_PYTHON_VERSION = ${settings.min_python_version}
MAX_PYTHON_VERSION = ${settings.max_python_version}

@ -0,0 +1,14 @@
#=================
# Install ccache
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY ${'\\'}
&& curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz ${'\\'}
&& tar -zxf ccache.tar.gz ${'\\'}
&& cd ccache-4.7.5 ${'\\'}
&& mkdir build && cd build ${'\\'}
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. ${'\\'}
&& make -j4 && make install ${'\\'}
&& cd ../.. ${'\\'}
&& rm -rf ccache-4.7.5 ccache.tar.gz

@ -0,0 +1,21 @@
#=================
# Compile CPython 3.13.0rc2 from source
RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean
RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean
RUN cd /tmp && ${'\\'}
wget -q https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc2.tgz && ${'\\'}
tar xzvf Python-3.13.0rc2.tgz && ${'\\'}
cd Python-3.13.0rc2 && ${'\\'}
./configure && ${'\\'}
make -j4 && ${'\\'}
make install
RUN cd /tmp && ${'\\'}
echo "ad7f44153649e27ec385e7633e853e03 Python-3.13.0rc2.tgz" > checksum.md5 && ${'\\'}
md5sum -c checksum.md5
RUN python3.13 -m ensurepip && ${'\\'}
python3.13 -m pip install coverage

@ -0,0 +1,22 @@
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always

@ -0,0 +1,57 @@
%YAML 1.2
--- |
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The aarch64 wheels are being crosscompiled to allow running the build
# on x64 machine. The dockcross/linux-armv7 image is a x86_64
# image with crosscompilation toolchain installed
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template`!!!
FROM dockcross/linux-armv7
<%text>RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \
libnss3-dev libssl-dev libreadline-dev libffi-dev && apt-get clean</%text>
ADD install_python_for_wheel_crosscompilation.sh /scripts/install_python_for_wheel_crosscompilation.sh
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.8.8" "3.8.8" /opt/python/cp38-cp38
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.9.2" "3.9.2" /opt/python/cp39-cp39
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.10.0" "3.10.0rc1" /opt/python/cp310-cp310
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.11.0" "3.11.0rc1" /opt/python/cp311-cp311
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.12.0" "3.12.0rc2" /opt/python/cp312-cp312
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.13.0" "3.13.0rc2" /opt/python/cp313-cp313
ENV AUDITWHEEL_ARCH armv7l
ENV AUDITWHEEL_PLAT linux_armv7l
<%include file="../ccache_crosscompile.include"/>
# The dockcross base of this image sets CC and CXX to absolute paths, which makes it impossible to redirect their invocations
# to ccache via a symlink. Use relative paths instead.
<%text>
ENV CC ${CROSS_TRIPLE}-gcc
ENV CXX ${CROSS_TRIPLE}-g++
</%text>
# For historical reasons, task_runner.py the script under docker container using "bash -l"
# which loads /etc/profile on startup. dockcross/linux-armv7 is based on an image where
# /etc/profile overwrites contents of PATH (for security reasons) when run as root.
# That causes the crosscompiler binaries located under /usr/xcc/armv7-unknown-linux-gnueabi/bin
# to be removed from PATH. Since in our builds we don't need the /etc/profile for anything, we can just
# truncate it.
# TODO(jtattermusch): Remove this hack when possible.
RUN echo "# file contents removed to avoid resetting PATH set by the docker image" >/etc/profile
<%include file="../git_config.include"/>

@ -0,0 +1,28 @@
%YAML 1.2
--- |
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template`!!!
FROM dockcross/manylinux2014-aarch64:20240812-60fa1b0
# manylinux_2_17 is the preferred alias of manylinux2014
ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
<%include file="../python_pip_builds.include"/>
<%include file="../ccache_crosscompile.include"/>
<%include file="../git_config.include"/>

@ -0,0 +1,33 @@
%YAML 1.2
--- |
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Docker file for building gRPC manylinux Python artifacts.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template`!!!
FROM quay.io/pypa/manylinux2014_x86_64:2024-09-09-f386546
# manylinux_2_17 is the preferred alias of manylinux2014
ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
# TODO(jtattermusch): revisit which of the deps are really required
RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
<%include file="../python_pip_builds.include"/>
<%include file="../ccache.include"/>
<%include file="../git_config.include"/>

@ -0,0 +1,34 @@
%YAML 1.2
--- |
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Docker file for building gRPC manylinux Python artifacts.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template`!!!
FROM quay.io/pypa/manylinux2014_i686:2024-09-09-f386546
# manylinux_2_17 is the preferred alias of manylinux2014
ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
# TODO(jtattermusch): revisit which of the deps are really required
RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
<%include file="../python_pip_builds.include"/>
<%include file="../ccache.include"/>
<%include file="../git_config.include"/>

@ -0,0 +1,27 @@
%YAML 1.2
--- |
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template`!!!
FROM quay.io/pypa/musllinux_1_1_x86_64:2024-09-09-f386546
<%include file="../python_pip_builds.include"/>
<%include file="../ccache.include"/>
<%include file="../git_config.include"/>
RUN apk add openssl openssl-dev

@ -0,0 +1,25 @@
%YAML 1.2
--- |
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template`!!!
FROM quay.io/pypa/musllinux_1_1_i686:2024-09-09-f386546
<%include file="../python_pip_builds.include"/>
<%include file="../ccache.include"/>
<%include file="../git_config.include"/>

@ -0,0 +1,8 @@
#===================================
# Install Python build requirements
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'

@ -24,6 +24,7 @@
<%include file="../../compile_python_310.include"/>
<%include file="../../compile_python_311.include"/>
<%include file="../../compile_python_312.include"/>
<%include file="../../compile_python_313.include"/>
# Python test coverage requires libsqlite3, and it have
# to be installed before Python.

@ -29,7 +29,7 @@ load("@com_google_protobuf//bazel:system_python.bzl", "system_python")
system_python(
name = "system_python",
minimum_python_version = "3.7",
minimum_python_version = "3.8",
)
load("@system_python//:pip.bzl", "pip_parse")

@ -63,12 +63,12 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/grpc_artifact_centos6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x64@sha256:3285047265ea2b7c5d4df4c769b2d05f56288d947c75e16d27ae2dee693f791b",
"tools/dockerfile/grpc_artifact_centos6_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x86@sha256:19783239da92208f0f39cf563529cd02e889920497ef81c60d20391fa998af62",
"tools/dockerfile/grpc_artifact_protoc_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_protoc_aarch64@sha256:a0f6b544c1b2fa75f73b26cb28281917153304e9df2789e93de0732494e6b651",
"tools/dockerfile/grpc_artifact_python_linux_armv7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7@sha256:f109d6c22cadb053f6843a66ee827d74f34d6cbf75a32f455a9da099ed1bdc9c",
"tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64@sha256:3f0407d4db904b35a7665c2222db039994cd0c9bdb1a073a653ff8e6940081c9",
"tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64@sha256:89329900ec7fedc57cd89690acd34d07d726f6b896f60df987867737d0a0f5a8",
"tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86@sha256:8fce8e094b00935dc1f2640b4c2b10216c5a8711c0f4444efbafcd8c355a75a8",
"tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64@sha256:c8e8eb24942a2910197cf5481d61e7cbce68b57bd6f35fae878b043b1f2c38bb",
"tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86@sha256:c288f83435186ee675d004ee52c93195a51201bf2b5fe92581584d977a2499a3",
"tools/dockerfile/grpc_artifact_python_linux_armv7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7@sha256:137616275fe59bf89849f7503779f9a5d9668dbf395fcc79a8221a8c38fa5bac",
"tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64@sha256:ad3233be3c3ad9e0c4b60f0176a853713a35e5c84ec9d9703996c67fa3e811b6",
"tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64@sha256:0e102df67f31aeb6afe68250603288c2f1c98ccf360d1c42d751b8451da94b48",
"tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86@sha256:527e2e9ec4db0c52a53b50abfd59907a1b7e221168dc401686f6a48d33bddc5c",
"tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64@sha256:94b57e5ea31ebc29af734474bcaff3074770778e5d27557cdc06d755ee8bc7ed",
"tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86@sha256:edf4a0c8333c9309e52f323aa7315bbc0e5643216613cab4ecd2bce3d1ec26c0",
"tools/dockerfile/interoptest/grpc_interop_aspnetcore.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_aspnetcore@sha256:8e2e732e78724a8382c340dca72e7653c5f82c251a3110fa2874cc00ba538878",
"tools/dockerfile/interoptest/grpc_interop_cxx.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_cxx@sha256:e5a474d33773d52ec6a8abbe2d61ee0c2a9c2b5f48793a5ea3b82c4445becf3f",
"tools/dockerfile/interoptest/grpc_interop_dart.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_dart@sha256:4915a280788126dad029858eb384dbbef2dc18cadccb434df6450dfd7a4929f2",
@ -109,7 +109,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/test/php7_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/php7_debian11_x64@sha256:34b02fd66832ebf49601bef95632753e6710a75755401c21332d50056ccd52d2",
"tools/dockerfile/test/python_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_alpine_x64@sha256:0a4e3c166fb676d85ea26d9fffec3858d59a2f243a3acc1c2f9bd293a590a98c",
"tools/dockerfile/test/python_debian11_default_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_arm64@sha256:fccca33a655c7aa89dd7ebd9492cbcc1f636bd2a004cd939d1982cfce3d68326",
"tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:4c539fc93d343324309939c2964204c90f4054cd9eeed093af315cb0f0ef7c26",
"tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:8beca964d6bbb80a8cb4c4628c25e9702b007c97113e74e589fa50c15000738d",
"tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:b3eb1a17b7b091e3c5648a803076b2c40601242ff91c04d55997af6641305f68",
"tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:d2e79919b2e2d4cc36a29682ecb5170641df4fb506cfb453978ffdeb8a841bd9",
"tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:6e8b4696ba0661f11a31ed0992a94d2efcd889a018f57160f0e2fb62963f3593",

@ -269,8 +269,8 @@ grpc_build_artifact_task(
# Python artifact build tasks
grpc_build_artifact_task(
name = "artifact_python_linux_x64_manylinux2014_cp312",
build_script = "build_artifact_python_linux_x64_cp312.sh",
name = "artifact_python_linux_x64_manylinux2014_cp313",
build_script = "build_artifact_python_linux_x64_cp313.sh",
docker_image_version = "tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version",
)
@ -287,7 +287,7 @@ grpc_build_artifact_task(
name = "package_python_linux",
# TODO(jtattermusch): add more python artifacts once they are migrated from artifact_targets.py
artifact_deps = [
"artifact_python_linux_x64_manylinux2014_cp312",
"artifact_python_linux_x64_manylinux2014_cp313",
"artifact_python_linux_x64_manylinux2014_cp39",
],
build_script = "build_package_python_linux.sh",
@ -421,7 +421,7 @@ test_suite(
":artifact_protoc_linux_aarch64_build_test",
":artifact_protoc_linux_x64_build_test",
":artifact_protoc_linux_x86_build_test",
":artifact_python_linux_x64_manylinux2014_cp312_build_test",
":artifact_python_linux_x64_manylinux2014_cp313_build_test",
":artifact_python_linux_x64_manylinux2014_cp39_build_test",
":package_csharp_linux_build_test",
":package_python_linux_build_test",

@ -17,8 +17,8 @@ set -ex
# env variable values extracted from PythonArtifact in tools/run_tests/artifacts/artifact_targets.py
# TODO(jtattermusch): find a better way of configuring the python artifact build (the current approach mostly serves as a demonstration)
export PYTHON=/opt/python/cp312-cp312/bin/python
export PIP=/opt/python/cp312-cp312/bin/pip
export PYTHON=/opt/python/cp313-cp313/bin/python
export PIP=/opt/python/cp313-cp313/bin/pip
export GRPC_SKIP_PIP_CYTHON_UPGRADE=TRUE
export GRPC_RUN_AUDITWHEEL_REPAIR=TRUE
export GRPC_BUILD_GRPCIO_TOOLS_DEPENDENTS=TRUE

@ -0,0 +1,33 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Buildgen python version plugin
This parses the list of supported python versions from the yaml build file, and
creates custom strings for the minimum and maximum supported python versions.
"""
def mako_plugin(dictionary):
"""Expand version numbers:
- for each language, ensure there's a language_version tag in
settings (defaulting to the master version tag)
- expand version strings to major, minor, patch, and tag
"""
settings = dictionary["settings"]
supported_python_versions = settings["supported_python_versions"]
settings["min_python_version"] = supported_python_versions[0]
settings["max_python_version"] = supported_python_versions[-1]

@ -59,4 +59,3 @@ pushd src/python;
popd;
done
popd;

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpc_version.py.template`!!!
VERSION = '1.68.0.dev0'
PROTOBUF_VERSION = '3.28.1'

@ -1,10 +1,12 @@
include _parallel_compile_patch.py
include _spawn_patch.py
include grpc_version.py
include python_version.py
include protoc_deps.py
include protoc_lib_deps.py
include README.rst
include grpc_tools/grpc_version.py
include grpc_tools/python_version.py
graft grpc_tools
graft grpc_root
graft third_party

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -39,6 +39,7 @@ sys.path.insert(0, os.path.abspath("."))
import _parallel_compile_patch
import _spawn_patch
import protoc_lib_deps
import python_version
import grpc_version
@ -329,7 +330,7 @@ setuptools.setup(
classifiers=CLASSIFIERS,
ext_modules=extension_modules(),
packages=setuptools.find_packages("."),
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=[
"protobuf>=5.26.1,<6.0dev",
"grpcio>={version}".format(version=grpc_version.VERSION),

@ -1 +1,2 @@
include grpc_version.py
include python_version.py

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/grpc_version.py.template`!!!
VERSION = '1.68.0.dev0'
PROTOBUF_VERSION = '3.28.1'

@ -0,0 +1,20 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/python_version.py.template`!!!
SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
MIN_PYTHON_VERSION = 3.8
MAX_PYTHON_VERSION = 3.13

@ -19,6 +19,7 @@ import os
import setuptools
import grpc_version
import python_version
WORK_DIR = os.path.dirname(os.path.abspath(__file__))
@ -44,6 +45,7 @@ INSTALL_REQUIRES = [
SETUP_REQUIRES = INSTALL_REQUIRES + ["grpcio-tools>=1.49.0"]
setuptools.setup(
name="xds-protos",
version=grpc_version.VERSION,
@ -55,7 +57,7 @@ setuptools.setup(
author_email="grpc-io@googlegroups.com",
url="https://grpc.io",
license="Apache License 2.0",
python_requires=">=3.8",
python_requires=f">={python_version.MIN_PYTHON_VERSION}",
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
classifiers=CLASSIFIERS,

@ -37,6 +37,7 @@ If you've made modifications to a dockerfile, you can upload the new version of
registry as follows:
If you haven't configured authentication in Docker for us-docker.pkg.dev previously, run:
```
gcloud auth configure-docker us-docker.pkg.dev
gcloud auth login
@ -45,6 +46,7 @@ gcloud auth login
Rebuild the docker images that have been modified locally and upload the docker images to
artifact registry (note that this won't overwrite the "old" versions of the docker image
that are already in artifact registry)
```
# Install qemu, binformat, and configure binfmt interpreters
sudo apt-get install binfmt-support qemu-user-static
@ -58,6 +60,7 @@ tools/dockerfile/push_testing_images.sh
Build modified docker images locally and don't push to artifact registry. This option is
very useful for quick local experiments. The script is much faster if it doesn't have to
interact with artifact registry:
```
# very useful for local experiments
LOCAL_ONLY_MODE=true tools/dockerfile/push_testing_images.sh
@ -69,6 +72,7 @@ In the past, our testing docker images were [hosted on dockerhub](https://hub.do
but we are in the process of migrating them artifact registry now.
This temporary feature might simplify the migration:
```
# try pull existing images from dockerhub instead of building the from scratch locally.
TRANSFER_FROM_DOCKERHUB=true tools/dockerfile/push_testing_images.sh

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7:0b87638ab97b433c6818be5124dcd89d479b3a8b@sha256:f109d6c22cadb053f6843a66ee827d74f34d6cbf75a32f455a9da099ed1bdc9c
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7:3523bf4a67fa9100deb8f48ee4833cb5a5e97697@sha256:137616275fe59bf89849f7503779f9a5d9668dbf395fcc79a8221a8c38fa5bac

@ -1,4 +1,4 @@
# Copyright 2020 The gRPC Authors
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,6 +15,8 @@
# The aarch64 wheels are being crosscompiled to allow running the build
# on x64 machine. The dockcross/linux-armv7 image is a x86_64
# image with crosscompilation toolchain installed
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template`!!!
FROM dockcross/linux-armv7
RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \
@ -22,37 +24,39 @@ RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libg
ADD install_python_for_wheel_crosscompilation.sh /scripts/install_python_for_wheel_crosscompilation.sh
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.6.13" "3.6.13" /opt/python/cp36-cp36m
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.7.10" "3.7.10" /opt/python/cp37-cp37m
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.8.8" "3.8.8" /opt/python/cp38-cp38
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.9.2" "3.9.2" /opt/python/cp39-cp39
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.10.0" "3.10.0rc1" /opt/python/cp310-cp310
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.11.0" "3.11.0rc1" /opt/python/cp311-cp311
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.12.0" "3.12.0rc2" /opt/python/cp312-cp312
RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.13.0" "3.13.0rc2" /opt/python/cp313-cp313
ENV AUDITWHEEL_ARCH armv7l
ENV AUDITWHEEL_PLAT linux_armv7l
#=================
# Install ccache
# Install ccache
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD \
&& curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY \
&& curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
&& tar -zxf ccache.tar.gz \
&& cd ccache-4.5.1 \
&& cd ccache-4.7.5 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
&& make -j4 && make install \
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
&& rm -rf ccache-4.7.5 ccache.tar.gz
# The dockcross base of this image sets CC and CXX to absolute paths, which makes it impossible to redirect their invocations
# to ccache via a symlink. Use relative paths instead.
ENV CC ${CROSS_TRIPLE}-gcc
ENV CXX ${CROSS_TRIPLE}-g++
# For historical reasons, task_runner.py the script under docker container using "bash -l"
# which loads /etc/profile on startup. dockcross/linux-armv7 is based on an image where
# /etc/profile overwrites contents of PATH (for security reasons) when run as root.
@ -62,5 +66,25 @@ ENV CXX ${CROSS_TRIPLE}-g++
# TODO(jtattermusch): Remove this hack when possible.
RUN echo "# file contents removed to avoid resetting PATH set by the docker image" >/etc/profile
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always

@ -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

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64:cfc9fe0cb36bb4ec8425982fd7f07e4e14bf3941@sha256:3f0407d4db904b35a7665c2222db039994cd0c9bdb1a073a653ff8e6940081c9
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64:377f694f92dd1b56dff0b0a0f47d6e731200953c@sha256:ad3233be3c3ad9e0c4b60f0176a853713a35e5c84ec9d9703996c67fa3e811b6

@ -1,4 +1,4 @@
# Copyright 2020 The gRPC Authors
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,35 +12,57 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM dockcross/manylinux2014-aarch64:20230905-7b2d74f
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template`!!!
FROM dockcross/manylinux2014-aarch64:20240812-60fa1b0
# manylinux_2_17 is the preferred alias of manylinux2014
ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
###################################
#===================================
# Install Python build requirements
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/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
# Install ccache
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY \
&& curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
&& curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
&& tar -zxf ccache.tar.gz \
&& cd ccache-4.5.1 \
&& cd ccache-4.7.5 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
&& make -j4 && make install \
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
&& rm -rf ccache-4.7.5 ccache.tar.gz
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64:e81af0c6d454929785e8126fc993cbd93da5c014@sha256:89329900ec7fedc57cd89690acd34d07d726f6b896f60df987867737d0a0f5a8
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64:379c3240e9fd68b7c13a3b6cb24307a272558494@sha256:0e102df67f31aeb6afe68250603288c2f1c98ccf360d1c42d751b8451da94b48

@ -1,4 +1,4 @@
# Copyright 2020 The gRPC Authors
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -14,7 +14,9 @@
# Docker file for building gRPC manylinux Python artifacts.
FROM quay.io/pypa/manylinux2014_x86_64:2023-09-17-ae90a16
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template`!!!
FROM quay.io/pypa/manylinux2014_x86_64:2024-09-09-f386546
# manylinux_2_17 is the preferred alias of manylinux2014
ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
@ -22,29 +24,49 @@ ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
# TODO(jtattermusch): revisit which of the deps are really required
RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
###################################
#===================================
# Install Python build requirements
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/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
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
&& tar -zxf ccache.tar.gz \
&& cd ccache-4.5.1 \
&& cd ccache-4.7.5 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
&& make -j4 && make install \
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
&& rm -rf ccache-4.7.5 ccache.tar.gz
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86:fda00560d600eed356f8d6bef2cc8416d0a6b790@sha256:8fce8e094b00935dc1f2640b4c2b10216c5a8711c0f4444efbafcd8c355a75a8
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86:28eec3c9e027fd42f5852f696ed3e47aec91229b@sha256:527e2e9ec4db0c52a53b50abfd59907a1b7e221168dc401686f6a48d33bddc5c

@ -1,4 +1,4 @@
# Copyright 2020 The gRPC Authors
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -14,7 +14,9 @@
# Docker file for building gRPC manylinux Python artifacts.
FROM quay.io/pypa/manylinux2014_i686:2023-09-17-ae90a16
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template`!!!
FROM quay.io/pypa/manylinux2014_i686:2024-09-09-f386546
# manylinux_2_17 is the preferred alias of manylinux2014
ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
@ -22,30 +24,50 @@ ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
# TODO(jtattermusch): revisit which of the deps are really required
RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
###################################
#===================================
# Install Python build requirements
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/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
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
&& tar -zxf ccache.tar.gz \
&& cd ccache-4.5.1 \
&& cd ccache-4.7.5 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
&& make -j4 && make install \
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
&& rm -rf ccache-4.7.5 ccache.tar.gz
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64:2f56fcee2e4964359dddcd57bb9b066ceb8331ec@sha256:c8e8eb24942a2910197cf5481d61e7cbce68b57bd6f35fae878b043b1f2c38bb
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64:1bc8405880fdad2b22f8a6422cd6198b0b54838a@sha256:94b57e5ea31ebc29af734474bcaff3074770778e5d27557cdc06d755ee8bc7ed

@ -1,4 +1,4 @@
# Copyright 2021 The gRPC Authors
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,31 +12,55 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM quay.io/pypa/musllinux_1_1_x86_64:2023-09-17-ae90a16
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template`!!!
###################################
FROM quay.io/pypa/musllinux_1_1_x86_64:2024-09-09-f386546
#===================================
# Install Python build requirements
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/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
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
&& tar -zxf ccache.tar.gz \
&& cd ccache-4.5.1 \
&& cd ccache-4.7.5 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
&& make -j4 && make install \
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
&& rm -rf ccache-4.7.5 ccache.tar.gz
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global protocol.file.allow always
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always
RUN apk add openssl openssl-dev

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86:9308dccacd76fb1782a43d97e6f5062b5b58576d@sha256:c288f83435186ee675d004ee52c93195a51201bf2b5fe92581584d977a2499a3
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86:358044420e0991fe284f49848145d5145cff42ac@sha256:edf4a0c8333c9309e52f323aa7315bbc0e5643216613cab4ecd2bce3d1ec26c0

@ -1,4 +1,4 @@
# Copyright 2021 The gRPC Authors
# Copyright 2024 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,31 +12,53 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM quay.io/pypa/musllinux_1_1_i686:2023-09-17-ae90a16
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template`!!!
###################################
FROM quay.io/pypa/musllinux_1_1_i686:2024-09-09-f386546
#===================================
# Install Python build requirements
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/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
# Install ccache from source since ccache 3.x packaged with most linux distributions
# does not support Redis backend for caching.
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
&& tar -zxf ccache.tar.gz \
&& cd ccache-4.5.1 \
&& cd ccache-4.7.5 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
&& make -j4 && make install \
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
&& rm -rf ccache-4.7.5 ccache.tar.gz
# TODO: simplify the list of third_party modules list
# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global protocol.file.allow always
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
RUN git config --global protocol.file.allow always

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:05951fbd0e77e8ba072d270ad08f0d4b6ac00841@sha256:4c539fc93d343324309939c2964204c90f4054cd9eeed093af315cb0f0ef7c26
us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:224d8dc6c8287ee247378888ac93b9fe9e36ec8c@sha256:8beca964d6bbb80a8cb4c4628c25e9702b007c97113e74e589fa50c15000738d

@ -173,6 +173,28 @@ RUN cd /tmp && \
RUN python3.12 -m ensurepip && \
python3.12 -m pip install coverage
#=================
# Compile CPython 3.13.0rc2 from source
RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean
RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean
RUN cd /tmp && \
wget -q https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc2.tgz && \
tar xzvf Python-3.13.0rc2.tgz && \
cd Python-3.13.0rc2 && \
./configure && \
make -j4 && \
make install
RUN cd /tmp && \
echo "ad7f44153649e27ec385e7633e853e03 Python-3.13.0rc2.tgz" > checksum.md5 && \
md5sum -c checksum.md5
RUN python3.13 -m ensurepip && \
python3.13 -m pip install coverage
# Python test coverage requires libsqlite3, and it have
# to be installed before Python.

@ -149,3 +149,20 @@ $Python312x64Config = @{
PythonInstallerHash = "ea1993b5227fa4c8f45a06f5fbdd23b3"
}
Install-Python @Python312x64Config
# Python 3.13
$Python313x86Config = @{
PythonVersion = "3.13.0"
PythonInstaller = "python-3.13.0rc2"
PythonInstallPath = "C:\Python313_32bit"
PythonInstallerHash = "647f429b5584d9ee2dd02fdc9c61a38e"
}
Install-Python @Python313x86Config
$Python313x64Config = @{
PythonVersion = "3.13.0"
PythonInstaller = "python-3.13.0rc2-amd64"
PythonInstallPath = "C:\Python313"
PythonInstallerHash = "0af5ad8734962267323ef45f384de3aa"
}
Install-Python @Python313x64Config

@ -176,6 +176,14 @@ then
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.12.0rc2-macos11.pkg -target /
fi
# Install Python 3.13 if it doesn't exist
if [ ! -f "/usr/local/bin/python3.13" ]; then
time curl -O https://www.python.org/ftp/python/3.13.0/python-3.13.0rc2-macos11.pkg
echo "75579065f9ee5c25207353fbe0f79275123ff556 python-3.13.0rc2-macos11.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.13.0rc2-macos11.pkg -target /
fi
fi
if [ "${PREPARE_BUILD_INSTALL_DEPS_CSHARP}" == "true" ]

@ -1,4 +1,4 @@
cython<3.0.0rc1
cython<4.0.0rc1
cryptography==3.4.6
PyJWT==2.0.1
pyOpenSSL==20.0.1

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save