Skip to content

[Python] Migrate to pyproject.toml build system from setup.py builds#40833

Closed
sreenithi wants to merge 117 commits intogrpc:masterfrom
sreenithi:convert_pyproject_build
Closed

[Python] Migrate to pyproject.toml build system from setup.py builds#40833
sreenithi wants to merge 117 commits intogrpc:masterfrom
sreenithi:convert_pyproject_build

Conversation

@sreenithi
Copy link
Contributor

@sreenithi sreenithi commented Oct 3, 2025

@sreenithi
Copy link
Contributor Author

sreenithi commented Oct 31, 2025

  1. diff for grpcio-csm-observability package:
# diff of unzipped wheel file
$ diff -bur master/grpc_csm_observability/ pr/grpc_csm_observability
$

# diff of metadata from the wheel file
$ diff -bur master/grpcio_csm_observability-1.77.0.dev0.dist-info/ pr/grpcio_csm_observability-1.77.0.dev0.dist-info/
diff '--color=auto' -bur master/grpcio_csm_observability-1.77.0.dev0.dist-info/METADATA pr/grpcio_csm_observability-1.77.0.dev0.dist-info/METADATA
--- master/grpcio_csm_observability-1.77.0.dev0.dist-info/METADATA      2025-10-30 20:34:22.000000000 +0000
+++ pr/grpcio_csm_observability-1.77.0.dev0.dist-info/METADATA  2025-10-30 21:32:56.000000000 +0000
@@ -2,33 +2,24 @@
 Name: grpcio-csm-observability
 Version: 1.77.0.dev0
 Summary: gRPC Python CSM observability package
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
 Project-URL: Source Code, https://github.com/grpc/grpc/tree/master/src/python/grpcio_csm_observability
 Project-URL: Bug Tracker, https://github.com/grpc/grpc/issues
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: opentelemetry-sdk>=1.25.0
 Requires-Dist: opentelemetry-resourcedetector-gcp>=1.6.0a0
 Requires-Dist: grpcio==1.77.0.dev0
 Requires-Dist: protobuf<7.0.0,>=6.31.1
-Dynamic: author
-Dynamic: author-email
-Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
-Dynamic: project-url
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python CSM Observability
 =============================
diff '--color=auto' -bur master/grpcio_csm_observability-1.77.0.dev0.dist-info/RECORD pr/grpcio_csm_observability-1.77.0.dev0.dist-info/RECORD
--- master/grpcio_csm_observability-1.77.0.dev0.dist-info/RECORD        2025-10-30 20:34:22.000000000 +0000
+++ pr/grpcio_csm_observability-1.77.0.dev0.dist-info/RECORD    2025-10-30 21:32:56.000000000 +0000
@@ -1,7 +1,7 @@
 grpc_csm_observability/__init__.py,sha256=CRuqnwMQmI9pSQdnTnI32xReU-7PLlB45hbgXWycEXw,709
 grpc_csm_observability/_csm_observability_plugin.py,sha256=gE3lYO8WaWbBUZGcgV37rdD7DS096UOo5ovInxbCd8U,11499
 grpcio_csm_observability-1.77.0.dev0.dist-info/licenses/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
-grpcio_csm_observability-1.77.0.dev0.dist-info/METADATA,sha256=9WsgoXnuH_c-_JyOEth1xjeCySWxyYqwgOyNhNmeyQU,3516
-grpcio_csm_observability-1.77.0.dev0.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
+grpcio_csm_observability-1.77.0.dev0.dist-info/METADATA,sha256=_tGtO5G7NusoRBqE5pmdSQui925Jhj7txQ99SvTBCsc,3346
+grpcio_csm_observability-1.77.0.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
 grpcio_csm_observability-1.77.0.dev0.dist-info/top_level.txt,sha256=FSgLI8hb_KL25S49JgyLTjHgdxM3PpcrkWQrbOQiaB8,23
 grpcio_csm_observability-1.77.0.dev0.dist-info/RECORD,,
diff '--color=auto' -bur master/grpcio_csm_observability-1.77.0.dev0.dist-info/WHEEL pr/grpcio_csm_observability-1.77.0.dev0.dist-info/WHEEL
--- master/grpcio_csm_observability-1.77.0.dev0.dist-info/WHEEL 2025-10-30 20:34:22.000000000 +0000
+++ pr/grpcio_csm_observability-1.77.0.dev0.dist-info/WHEEL     2025-10-30 21:32:56.000000000 +0000
@@ -1,5 +1,5 @@
 Wheel-Version: 1.0
-Generator: setuptools (77.0.1)
+Generator: setuptools (80.9.0)
 Root-Is-Purelib: true
 Tag: py3-none-any

# diff of tar.gz file contents
$ diff -bur master_tar/grpcio_csm_observability-1.77.0.dev0 pr_tar/grpcio_csm_observability-1.77.0.dev0
diff '--color=auto' -bur master_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/PKG-INFO pr_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/PKG-INFO
--- master_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/PKG-INFO  2025-10-30 20:34:23.000000000 +0000
+++ pr_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/PKG-INFO      2025-10-30 21:32:54.000000000 +0000
@@ -2,33 +2,24 @@
 Name: grpcio-csm-observability
 Version: 1.77.0.dev0
 Summary: gRPC Python CSM observability package
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
 Project-URL: Source Code, https://github.com/grpc/grpc/tree/master/src/python/grpcio_csm_observability
 Project-URL: Bug Tracker, https://github.com/grpc/grpc/issues
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: opentelemetry-sdk>=1.25.0
 Requires-Dist: opentelemetry-resourcedetector-gcp>=1.6.0a0
 Requires-Dist: grpcio==1.77.0.dev0
 Requires-Dist: protobuf<7.0.0,>=6.31.1
-Dynamic: author
-Dynamic: author-email
-Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
-Dynamic: project-url
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python CSM Observability
 =============================
diff '--color=auto' -bur master_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/SOURCES.txt pr_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/SOURCES.txt
--- master_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/SOURCES.txt       2025-10-30 20:34:23.000000000 +0000
+++ pr_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/SOURCES.txt   2025-10-30 21:32:54.000000000 +0000
@@ -2,6 +2,7 @@
 MANIFEST.in
 README.rst
 grpc_version.py
+pyproject.toml
 python_version.py
 setup.py
 ./grpc_csm_observability/__init__.py
diff '--color=auto' -bur master_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/top_level.txt pr_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/top_level.txt
--- master_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/top_level.txt     2025-10-30 20:34:23.000000000 +0000
+++ pr_tar/grpcio_csm_observability-1.77.0.dev0/grpcio_csm_observability.egg-info/top_level.txt 2025-10-30 21:32:54.000000000 +0000
@@ -1 +1,2 @@
+dist
 grpc_csm_observability
diff '--color=auto' -bur master_tar/grpcio_csm_observability-1.77.0.dev0/PKG-INFO pr_tar/grpcio_csm_observability-1.77.0.dev0/PKG-INFO
--- master_tar/grpcio_csm_observability-1.77.0.dev0/PKG-INFO    2025-10-30 20:34:23.419468400 +0000
+++ pr_tar/grpcio_csm_observability-1.77.0.dev0/PKG-INFO        2025-10-30 21:32:54.817017800 +0000
@@ -2,33 +2,24 @@
 Name: grpcio-csm-observability
 Version: 1.77.0.dev0
 Summary: gRPC Python CSM observability package
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
 Project-URL: Source Code, https://github.com/grpc/grpc/tree/master/src/python/grpcio_csm_observability
 Project-URL: Bug Tracker, https://github.com/grpc/grpc/issues
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: opentelemetry-sdk>=1.25.0
 Requires-Dist: opentelemetry-resourcedetector-gcp>=1.6.0a0
 Requires-Dist: grpcio==1.77.0.dev0
 Requires-Dist: protobuf<7.0.0,>=6.31.1
-Dynamic: author
-Dynamic: author-email
-Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
-Dynamic: project-url
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python CSM Observability
 =============================
Only in pr_tar/grpcio_csm_observability-1.77.0.dev0: pyproject.toml
diff '--color=auto' -bur master_tar/grpcio_csm_observability-1.77.0.dev0/setup.py pr_tar/grpcio_csm_observability-1.77.0.dev0/setup.py
--- master_tar/grpcio_csm_observability-1.77.0.dev0/setup.py    2025-10-30 20:25:58.000000000 +0000
+++ pr_tar/grpcio_csm_observability-1.77.0.dev0/setup.py        2025-10-30 20:00:51.000000000 +0000
@@ -13,29 +13,16 @@
 # limitations under the License.
 
 import os
+import sys
 
 import setuptools
 
-_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__))
-_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
+# Manually insert the source directory into the Python path for local module
+# imports to succeed
+sys.path.insert(0, os.path.abspath("."))
 
 import grpc_version
-
-CLASSIFIERS = [
-    "Development Status :: 5 - Production/Stable",
-    "Programming Language :: Python",
-    "Programming Language :: Python :: 3",
-    "License :: OSI Approved :: Apache Software License",
-]
-
-PACKAGE_DIRECTORIES = {
-    "": ".",
-}
+import python_version
 
 INSTALL_REQUIRES = (
     "opentelemetry-sdk>=1.25.0",
@@ -44,22 +31,8 @@
     "protobuf>=6.31.1,<7.0.0",
 )
 
-setuptools.setup(
-    name="grpcio-csm-observability",
-    version=grpc_version.VERSION,
-    description="gRPC Python CSM observability package",
-    long_description=open(_README_PATH, "r").read(),
-    author="The gRPC Authors",
-    author_email="grpc-io@googlegroups.com",
-    url="https://grpc.io",
-    project_urls={
-        "Source Code": "https://github.com/grpc/grpc/tree/master/src/python/grpcio_csm_observability",
-        "Bug Tracker": "https://github.com/grpc/grpc/issues",
-    },
-    license="Apache License 2.0",
-    classifiers=CLASSIFIERS,
-    package_dir=PACKAGE_DIRECTORIES,
-    packages=setuptools.find_packages("."),
+if __name__ == "__main__":
+    setuptools.setup(
     python_requires=f">={python_version.MIN_PYTHON_VERSION}",
     install_requires=INSTALL_REQUIRES,
-)
+    )

@sreenithi
Copy link
Contributor Author

sreenithi commented Oct 31, 2025

  1. diff for grpcio-health-checking package:
# diff of unzipped wheel file
$ diff -bur master/grpc_health pr/grpc_health
$

# diff of metadata from the wheel file
$ diff -bur master/grpcio_health_checking-1.77.0.dev0.dist-info/ pr/grpcio_health_checking-1.77.0.dev0.dist-info/
diff '--color=auto' -bur master/grpcio_health_checking-1.77.0.dev0.dist-info/METADATA pr/grpcio_health_checking-1.77.0.dev0.dist-info/METADATA
--- master/grpcio_health_checking-1.77.0.dev0.dist-info/METADATA        2025-10-30 20:34:36.000000000 +0000
+++ pr/grpcio_health_checking-1.77.0.dev0.dist-info/METADATA    2025-10-30 21:33:18.000000000 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-health-checking
 Version: 1.77.0.dev0
 Summary: Standard Health Checking Service for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_health_checking.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,21 +15,15 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Health Checking
 ===========================
diff '--color=auto' -bur master/grpcio_health_checking-1.77.0.dev0.dist-info/RECORD pr/grpcio_health_checking-1.77.0.dev0.dist-info/RECORD
--- master/grpcio_health_checking-1.77.0.dev0.dist-info/RECORD  2025-10-30 20:34:36.000000000 +0000
+++ pr/grpcio_health_checking-1.77.0.dev0.dist-info/RECORD      2025-10-30 21:33:18.000000000 +0000
@@ -6,7 +6,7 @@
 grpc_health/v1/health_pb2.pyi,sha256=ETJyL-BuxDwKA49VCfQPZdpKEnHdDR8DOdIAcrxausk,1327
 grpc_health/v1/health_pb2_grpc.py,sha256=or5vkVXwrmkhcCPwZjESU-6BKFMLzZOy46emk9CQhTA,6313
 grpcio_health_checking-1.77.0.dev0.dist-info/licenses/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
-grpcio_health_checking-1.77.0.dev0.dist-info/METADATA,sha256=aVGHhwposwVtf9f-p3jD4Ej7bRCjuQU3ZBlvgxEXlVY,1295
+grpcio_health_checking-1.77.0.dev0.dist-info/METADATA,sha256=BvZ0_yvabG-txxFpY1rB1NwEWtMkjUnsScCxf_TclmI,1255
 grpcio_health_checking-1.77.0.dev0.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
 grpcio_health_checking-1.77.0.dev0.dist-info/top_level.txt,sha256=ccwPL45khtPzN8TVoGT3OED9k19pTNWKAjaYokl0ji0,12
 grpcio_health_checking-1.77.0.dev0.dist-info/RECORD,,


# diff of tar.gz file contents
$ diff -bur master_tar/grpcio_health_checking-1.77.0.dev0 pr_tar/grpcio_health_checking-1.77.0.dev0
diff '--color=auto' -bur master_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/PKG-INFO pr_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/PKG-INFO
--- master_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/PKG-INFO      2025-10-30 20:34:36.000000000 +0000
+++ pr_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/PKG-INFO  2025-10-30 21:33:18.000000000 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-health-checking
 Version: 1.77.0.dev0
 Summary: Standard Health Checking Service for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_health_checking.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,21 +15,15 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Health Checking
 ===========================
diff '--color=auto' -bur master_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/SOURCES.txt pr_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/SOURCES.txt
--- master_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/SOURCES.txt   2025-10-30 20:34:36.000000000 +0000
+++ pr_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/SOURCES.txt       2025-10-30 21:33:18.000000000 +0000
@@ -2,6 +2,7 @@
 MANIFEST.in
 README.rst
 grpc_version.py
+pyproject.toml
 python_version.py
 setup.py
 ./grpc_health/__init__.py
diff '--color=auto' -bur master_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/top_level.txt pr_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/top_level.txt
--- master_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/top_level.txt 2025-10-30 20:34:36.000000000 +0000
+++ pr_tar/grpcio_health_checking-1.77.0.dev0/grpcio_health_checking.egg-info/top_level.txt     2025-10-30 21:33:18.000000000 +0000
@@ -1 +1,2 @@
+dist
 grpc_health
diff '--color=auto' -bur master_tar/grpcio_health_checking-1.77.0.dev0/PKG-INFO pr_tar/grpcio_health_checking-1.77.0.dev0/PKG-INFO
--- master_tar/grpcio_health_checking-1.77.0.dev0/PKG-INFO      2025-10-30 20:34:36.812717700 +0000
+++ pr_tar/grpcio_health_checking-1.77.0.dev0/PKG-INFO  2025-10-30 21:33:18.535338400 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-health-checking
 Version: 1.77.0.dev0
 Summary: Standard Health Checking Service for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_health_checking.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,21 +15,15 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Health Checking
 ===========================
Only in pr_tar/grpcio_health_checking-1.77.0.dev0: pyproject.toml
diff '--color=auto' -bur master_tar/grpcio_health_checking-1.77.0.dev0/setup.py pr_tar/grpcio_health_checking-1.77.0.dev0/setup.py
--- master_tar/grpcio_health_checking-1.77.0.dev0/setup.py      2025-10-30 20:25:58.000000000 +0000
+++ pr_tar/grpcio_health_checking-1.77.0.dev0/setup.py  2025-10-30 20:00:51.000000000 +0000
@@ -14,19 +14,16 @@
 """Setup module for the GRPC Python package's optional health checking."""
 
 import os
+import sys
 
 import setuptools
 
-_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__))
-_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__)))
-
-# Break import-style to ensure we can actually find our local modules.
-import python_version
+# Manually insert the source directory into the Python path for local module
+# imports to succeed
+sys.path.insert(0, os.path.abspath("."))
 
 import grpc_version
+import python_version
 
 
 class _NoOpCommand(setuptools.Command):
@@ -45,22 +42,14 @@
         pass
 
 
-CLASSIFIERS = (
-    [
+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 = {
-    "": ".",
-}
+]
 
 INSTALL_REQUIRES = (
     "protobuf>=6.31.1,<7.0.0",
@@ -87,20 +76,11 @@
         "build_package_protos": _NoOpCommand,
     }
 
-setuptools.setup(
-    name="grpcio-health-checking",
-    version=grpc_version.VERSION,
-    description="Standard Health Checking Service for gRPC",
-    long_description=open(_README_PATH, "r").read(),
-    author="The gRPC Authors",
-    author_email="grpc-io@googlegroups.com",
-    url="https://grpc.io",
-    license="Apache License 2.0",
+if __name__ == "__main__":
+    setuptools.setup(
     classifiers=CLASSIFIERS,
-    package_dir=PACKAGE_DIRECTORIES,
-    packages=setuptools.find_packages("."),
     python_requires=f">={python_version.MIN_PYTHON_VERSION}",
     install_requires=INSTALL_REQUIRES,
     setup_requires=SETUP_REQUIRES,
     cmdclass=COMMAND_CLASS,
-)
+    ) 

@sreenithi
Copy link
Contributor Author

sreenithi commented Oct 31, 2025

  1. diff for grpcio-reflection package:
# diff of unzipped wheel file
$ diff -bur master/grpc_reflection/ pr/grpc_reflection
$

# diff of metadata from the wheel file
$ diff -bur master/grpcio_reflection-1.77.0.dev0.dist-info/ pr/grpcio_reflection-1.77.0.dev0.dist-info/
diff '--color=auto' -bur master/grpcio_reflection-1.77.0.dev0.dist-info/METADATA pr/grpcio_reflection-1.77.0.dev0.dist-info/METADATA
--- master/grpcio_reflection-1.77.0.dev0.dist-info/METADATA     2025-10-30 20:34:36.000000000 +0000
+++ pr/grpcio_reflection-1.77.0.dev0.dist-info/METADATA 2025-10-30 21:31:32.000000000 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-reflection
 Version: 1.77.0.dev0
 Summary: Standard Protobuf Reflection Service for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_reflection.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,21 +15,15 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Reflection package
 ==============================
diff '--color=auto' -bur master/grpcio_reflection-1.77.0.dev0.dist-info/RECORD pr/grpcio_reflection-1.77.0.dev0.dist-info/RECORD
--- master/grpcio_reflection-1.77.0.dev0.dist-info/RECORD       2025-10-30 20:34:36.000000000 +0000
+++ pr/grpcio_reflection-1.77.0.dev0.dist-info/RECORD   2025-10-30 21:31:32.000000000 +0000
@@ -8,7 +8,7 @@
 grpc_reflection/v1alpha/reflection_pb2.pyi,sha256=AOtl1nPyJCscBmrF2Qm8nQEV-Hwm1yzh62os3EWyylA,4543
 grpc_reflection/v1alpha/reflection_pb2_grpc.py,sha256=qIf5jTtxAyD2tn21R_dhHXSosjaaqy-VDlDE9Y5RLuM,4065
 grpcio_reflection-1.77.0.dev0.dist-info/licenses/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
-grpcio_reflection-1.77.0.dev0.dist-info/METADATA,sha256=q0wUMhsEkN6h9dnNgN5ZrXcZhUVCMF76coNrvRGa8EU,1299
+grpcio_reflection-1.77.0.dev0.dist-info/METADATA,sha256=7JOBVV3gjuc9AhZRRaIDi4UuCcskvTbJxfu2ytxGigI,1254
 grpcio_reflection-1.77.0.dev0.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
 grpcio_reflection-1.77.0.dev0.dist-info/top_level.txt,sha256=P3ckDqGghM-r3W9__SAJGrz5k7UJ3VDGHUQs4sD0aoc,16
 grpcio_reflection-1.77.0.dev0.dist-info/RECORD,,

# diff of tar.gz file contents
$ diff -bur master_tar/grpcio_reflection-1.77.0.dev0 pr_tar/grpcio_reflection-1.77.0.dev0
diff '--color=auto' -bur master_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/PKG-INFO pr_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/PKG-INFO
--- master_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/PKG-INFO        2025-10-30 20:34:37.000000000 +0000
+++ pr_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/PKG-INFO    2025-10-30 21:33:20.000000000 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-reflection
 Version: 1.77.0.dev0
 Summary: Standard Protobuf Reflection Service for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_reflection.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,21 +15,15 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Reflection package
 ==============================
diff '--color=auto' -bur master_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/SOURCES.txt pr_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/SOURCES.txt
--- master_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/SOURCES.txt     2025-10-30 20:34:37.000000000 +0000
+++ pr_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/SOURCES.txt 2025-10-30 21:33:20.000000000 +0000
@@ -2,6 +2,7 @@
 MANIFEST.in
 README.rst
 grpc_version.py
+pyproject.toml
 python_version.py
 setup.py
 ./grpc_reflection/__init__.py
diff '--color=auto' -bur master_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/top_level.txt pr_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/top_level.txt
--- master_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/top_level.txt   2025-10-30 20:34:37.000000000 +0000
+++ pr_tar/grpcio_reflection-1.77.0.dev0/grpcio_reflection.egg-info/top_level.txt       2025-10-30 21:33:20.000000000 +0000
@@ -1 +1,2 @@
+dist
 grpc_reflection
diff '--color=auto' -bur master_tar/grpcio_reflection-1.77.0.dev0/PKG-INFO pr_tar/grpcio_reflection-1.77.0.dev0/PKG-INFO
--- master_tar/grpcio_reflection-1.77.0.dev0/PKG-INFO   2025-10-30 20:34:37.392771700 +0000
+++ pr_tar/grpcio_reflection-1.77.0.dev0/PKG-INFO       2025-10-30 21:33:20.899569700 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-reflection
 Version: 1.77.0.dev0
 Summary: Standard Protobuf Reflection Service for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_reflection.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,21 +15,15 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Reflection package
 ==============================
Only in pr_tar/grpcio_reflection-1.77.0.dev0: pyproject.toml
diff '--color=auto' -bur master_tar/grpcio_reflection-1.77.0.dev0/setup.py pr_tar/grpcio_reflection-1.77.0.dev0/setup.py
--- master_tar/grpcio_reflection-1.77.0.dev0/setup.py   2025-10-30 20:25:58.000000000 +0000
+++ pr_tar/grpcio_reflection-1.77.0.dev0/setup.py       2025-10-30 20:00:51.000000000 +0000
@@ -18,16 +18,12 @@
 
 import setuptools
 
-_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__))
-_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__)))
-
-# Break import-style to ensure we can actually find our local modules.
-import python_version
+# Manually insert the source directory into the Python path for local module
+# imports to succeed
+sys.path.insert(0, os.path.abspath("."))
 
 import grpc_version
+import python_version
 
 
 class _NoOpCommand(setuptools.Command):
@@ -46,22 +42,15 @@
         pass
 
 
-CLASSIFIERS = (
-    [
+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 = {
-    "": ".",
-}
 
 INSTALL_REQUIRES = (
     "protobuf>=6.31.1,<7.0.0",
@@ -88,20 +77,11 @@
         "build_package_protos": _NoOpCommand,
     }
 
-setuptools.setup(
-    name="grpcio-reflection",
-    version=grpc_version.VERSION,
-    license="Apache License 2.0",
-    description="Standard Protobuf Reflection Service for gRPC",
-    long_description=open(_README_PATH, "r").read(),
-    author="The gRPC Authors",
-    author_email="grpc-io@googlegroups.com",
+if __name__ == "__main__":
+    setuptools.setup(
     classifiers=CLASSIFIERS,
-    url="https://grpc.io",
-    package_dir=PACKAGE_DIRECTORIES,
-    packages=setuptools.find_packages("."),
     python_requires=f">={python_version.MIN_PYTHON_VERSION}",
     install_requires=INSTALL_REQUIRES,
     setup_requires=SETUP_REQUIRES,
     cmdclass=COMMAND_CLASS,
-)
+    )

@sreenithi
Copy link
Contributor Author

sreenithi commented Oct 31, 2025

  1. diff for grpcio-status package:
# diff of unzipped wheel file
$ diff -bur master/grpc_status/ pr/grpc_status
$

# diff of metadata from the wheel file
$ diff -bur master/grpcio_status-1.77.0.dev0.dist-info/ pr/grpcio_status-1.77.0.dev0.dist-info/
diff '--color=auto' -bur master/grpcio_status-1.77.0.dev0.dist-info/METADATA pr/grpcio_status-1.77.0.dev0.dist-info/METADATA
--- master/grpcio_status-1.77.0.dev0.dist-info/METADATA 2025-10-30 20:34:38.000000000 +0000
+++ pr/grpcio_status-1.77.0.dev0.dist-info/METADATA     2025-10-30 21:33:26.000000000 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-status
 Version: 1.77.0.dev0
 Summary: Status proto mapping for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_status.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,22 +15,16 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
 Requires-Dist: googleapis-common-protos>=1.5.5
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Status Proto
 ===========================
diff '--color=auto' -bur master/grpcio_status-1.77.0.dev0.dist-info/RECORD pr/grpcio_status-1.77.0.dev0.dist-info/RECORD
--- master/grpcio_status-1.77.0.dev0.dist-info/RECORD   2025-10-30 20:34:38.000000000 +0000
+++ pr/grpcio_status-1.77.0.dev0.dist-info/RECORD       2025-10-30 21:33:26.000000000 +0000
@@ -3,7 +3,7 @@
 grpc_status/_common.py,sha256=fntl-3SZf7M0JhjjicHObNAjcKv4qS8QjSJZqs8kGNY,959
 grpc_status/rpc_status.py,sha256=ni0WwqyOT_Gj76ZUQCy685KySgLVGhBvrNaRwf8g_W4,2989
 grpcio_status-1.77.0.dev0.dist-info/licenses/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
-grpcio_status-1.77.0.dev0.dist-info/METADATA,sha256=1O8nlFX-7oiDYrnnBVgWRBW3CL3DRmZqUJGTrvQZJg4,1323
-grpcio_status-1.77.0.dev0.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
+grpcio_status-1.77.0.dev0.dist-info/METADATA,sha256=wGNPNfvvPQYAunE0tbiRwSVwObTeos5PmfILoCLe9VU,1274
+grpcio_status-1.77.0.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
 grpcio_status-1.77.0.dev0.dist-info/top_level.txt,sha256=yQk7zXr3YXmKtg7OddIv6jlXTTFFMTnDpXSla2xtV58,12
 grpcio_status-1.77.0.dev0.dist-info/RECORD,,
diff '--color=auto' -bur master/grpcio_status-1.77.0.dev0.dist-info/WHEEL pr/grpcio_status-1.77.0.dev0.dist-info/WHEEL
--- master/grpcio_status-1.77.0.dev0.dist-info/WHEEL    2025-10-30 20:34:38.000000000 +0000
+++ pr/grpcio_status-1.77.0.dev0.dist-info/WHEEL        2025-10-30 21:33:26.000000000 +0000
@@ -1,5 +1,5 @@
 Wheel-Version: 1.0
-Generator: setuptools (77.0.1)
+Generator: setuptools (80.9.0)
 Root-Is-Purelib: true
 Tag: py3-none-any

# diff of tar.gz file contents
$ diff -bur master_tar/grpcio_status-1.77.0.dev0 pr_tar/grpcio_status-1.77.0.dev0
diff '--color=auto' -bur master_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/PKG-INFO pr_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/PKG-INFO
--- master_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/PKG-INFO        2025-10-30 20:34:37.000000000 +0000
+++ pr_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/PKG-INFO    2025-10-30 21:33:24.000000000 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-status
 Version: 1.77.0.dev0
 Summary: Status proto mapping for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_status.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,22 +15,16 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
 Requires-Dist: googleapis-common-protos>=1.5.5
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Status Proto
 ===========================
diff '--color=auto' -bur master_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/SOURCES.txt pr_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/SOURCES.txt
--- master_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/SOURCES.txt     2025-10-30 20:34:37.000000000 +0000
+++ pr_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/SOURCES.txt 2025-10-30 21:33:24.000000000 +0000
@@ -2,6 +2,7 @@
 MANIFEST.in
 README.rst
 grpc_version.py
+pyproject.toml
 python_version.py
 setup.py
 ./grpc_status/__init__.py
diff '--color=auto' -bur master_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/top_level.txt pr_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/top_level.txt
--- master_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/top_level.txt   2025-10-30 20:34:37.000000000 +0000
+++ pr_tar/grpcio_status-1.77.0.dev0/grpcio_status.egg-info/top_level.txt       2025-10-30 21:33:24.000000000 +0000
@@ -1 +1,2 @@
+dist
 grpc_status
diff '--color=auto' -bur master_tar/grpcio_status-1.77.0.dev0/PKG-INFO pr_tar/grpcio_status-1.77.0.dev0/PKG-INFO
--- master_tar/grpcio_status-1.77.0.dev0/PKG-INFO       2025-10-30 20:34:37.928821600 +0000
+++ pr_tar/grpcio_status-1.77.0.dev0/PKG-INFO   2025-10-30 21:33:24.855956800 +0000
@@ -2,10 +2,10 @@
 Name: grpcio-status
 Version: 1.77.0.dev0
 Summary: Status proto mapping for gRPC
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_status.html
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
@@ -15,22 +15,16 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
 Requires-Dist: googleapis-common-protos>=1.5.5
-Dynamic: author
-Dynamic: author-email
 Dynamic: classifier
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
 Dynamic: license-file
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 gRPC Python Status Proto
 ===========================
Only in pr_tar/grpcio_status-1.77.0.dev0: pyproject.toml
diff '--color=auto' -bur master_tar/grpcio_status-1.77.0.dev0/setup.py pr_tar/grpcio_status-1.77.0.dev0/setup.py
--- master_tar/grpcio_status-1.77.0.dev0/setup.py       2025-10-30 20:25:58.000000000 +0000
+++ pr_tar/grpcio_status-1.77.0.dev0/setup.py   2025-10-30 20:00:51.000000000 +0000
@@ -14,19 +14,17 @@
 """Setup module for the GRPC Python package's status mapping."""
 
 import os
+import sys
 
 import setuptools
 
-_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__))
-_README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
+# Manually insert the source directory into the Python path for local module
+# imports to succeed
+sys.path.insert(0, os.path.abspath("."))
 
-# 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__)))
-
-# Break import-style to ensure we can actually find our local modules.
-import python_version
 
 import grpc_version
+import python_version
 
 
 class _NoOpCommand(setuptools.Command):
@@ -45,22 +43,15 @@
         pass
 
 
-CLASSIFIERS = (
-    [
+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 = {
-    "": ".",
-}
 
 INSTALL_REQUIRES = (
     "protobuf>=6.31.1,<7.0.0",
@@ -84,19 +75,10 @@
         "build_package_protos": _NoOpCommand,
     }
 
-setuptools.setup(
-    name="grpcio-status",
-    version=grpc_version.VERSION,
-    description="Status proto mapping for gRPC",
-    long_description=open(_README_PATH, "r").read(),
-    author="The gRPC Authors",
-    author_email="grpc-io@googlegroups.com",
-    url="https://grpc.io",
-    license="Apache License 2.0",
+if __name__ == "__main__":
+    setuptools.setup(
     classifiers=CLASSIFIERS,
-    package_dir=PACKAGE_DIRECTORIES,
-    packages=setuptools.find_packages("."),
     python_requires=f">={python_version.MIN_PYTHON_VERSION}",
     install_requires=INSTALL_REQUIRES,
     cmdclass=COMMAND_CLASS,
-)
+    )

@sreenithi
Copy link
Contributor Author

sreenithi commented Oct 31, 2025

  1. diff for grpcio-testing package:
# diff of unzipped wheel file
$ diff -bur master/grpc_testing/ pr/grpc_testing
$ 

# diff of metadata from the wheel file
$ diff -bur master/grpcio_testing-1.77.0.dev0.dist-info/ pr/grpcio_testing-1.77.0.dev0.dist-info/
diff '--color=auto' -bur master/grpcio_testing-1.77.0.dev0.dist-info/METADATA pr/grpcio_testing-1.77.0.dev0.dist-info/METADATA
--- master/grpcio_testing-1.77.0.dev0.dist-info/METADATA        2025-10-30 20:34:34.000000000 +0000
+++ pr/grpcio_testing-1.77.0.dev0.dist-info/METADATA    2025-10-30 21:33:14.000000000 +0000
@@ -2,21 +2,21 @@
 Name: grpcio-testing
 Version: 1.77.0.dev0
 Summary: Testing utilities for gRPC Python
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_testing.html
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
+Dynamic: classifier
 Dynamic: license-file
 Dynamic: requires-dist
-Dynamic: summary
+Dynamic: requires-python
 
 gRPC Python Testing Package
 ===========================
diff '--color=auto' -bur master/grpcio_testing-1.77.0.dev0.dist-info/RECORD pr/grpcio_testing-1.77.0.dev0.dist-info/RECORD
--- master/grpcio_testing-1.77.0.dev0.dist-info/RECORD  2025-10-30 20:34:34.000000000 +0000
+++ pr/grpcio_testing-1.77.0.dev0.dist-info/RECORD      2025-10-30 21:33:14.000000000 +0000
@@ -16,7 +16,7 @@
 grpc_testing/_server/_service.py,sha256=14y_KZqu3oGAmri-J5xt6Fn4UsDEzT7ryTbYMJJNxv8,2826
 grpc_testing/_server/_servicer_context.py,sha256=gwhAQJsWowUB_ZAu0QwQivhNqN3kwKfQWiR57seYRbk,2611
 grpcio_testing-1.77.0.dev0.dist-info/licenses/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
-grpcio_testing-1.77.0.dev0.dist-info/METADATA,sha256=arWp7Ri8hdsXVCemIFMlD0smF2zflBXOM033wkHjqNo,680
-grpcio_testing-1.77.0.dev0.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
+grpcio_testing-1.77.0.dev0.dist-info/METADATA,sha256=Pu1O86s0uK8gCqbdpKQI_4H6HVSsf8vQE1TxytU3JSw,854
+grpcio_testing-1.77.0.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
 grpcio_testing-1.77.0.dev0.dist-info/top_level.txt,sha256=NFEiAJjiy7sZlzXbXwTT2y9gKnpYBLXeS2TlDwYC2Fc,13
 grpcio_testing-1.77.0.dev0.dist-info/RECORD,,
diff '--color=auto' -bur master/grpcio_testing-1.77.0.dev0.dist-info/WHEEL pr/grpcio_testing-1.77.0.dev0.dist-info/WHEEL
--- master/grpcio_testing-1.77.0.dev0.dist-info/WHEEL   2025-10-30 20:34:34.000000000 +0000
+++ pr/grpcio_testing-1.77.0.dev0.dist-info/WHEEL       2025-10-30 21:33:14.000000000 +0000
@@ -1,5 +1,5 @@
 Wheel-Version: 1.0
-Generator: setuptools (77.0.1)
+Generator: setuptools (80.9.0)
 Root-Is-Purelib: true
 Tag: py3-none-any

# diff of tar.gz file contents
$ diff -bur master_tar/grpcio_testing-1.77.0.dev0 pr_tar/grpcio_testing-1.77.0.dev0
diff '--color=auto' -bur master_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/PKG-INFO pr_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/PKG-INFO
--- master_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/PKG-INFO      2025-10-30 20:34:35.000000000 +0000
+++ pr_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/PKG-INFO  2025-10-30 21:33:12.000000000 +0000
@@ -2,21 +2,21 @@
 Name: grpcio-testing
 Version: 1.77.0.dev0
 Summary: Testing utilities for gRPC Python
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_testing.html
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
+Dynamic: classifier
 Dynamic: license-file
 Dynamic: requires-dist
-Dynamic: summary
+Dynamic: requires-python
 
 gRPC Python Testing Package
 ===========================
diff '--color=auto' -bur master_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/SOURCES.txt pr_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/SOURCES.txt
--- master_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/SOURCES.txt   2025-10-30 20:34:35.000000000 +0000
+++ pr_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/SOURCES.txt       2025-10-30 21:33:12.000000000 +0000
@@ -2,6 +2,8 @@
 MANIFEST.in
 README.rst
 grpc_version.py
+pyproject.toml
+python_version.py
 setup.py
 ./grpc_testing/__init__.py
 ./grpc_testing/_common.py
diff '--color=auto' -bur master_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/top_level.txt pr_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/top_level.txt
--- master_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/top_level.txt 2025-10-30 20:34:35.000000000 +0000
+++ pr_tar/grpcio_testing-1.77.0.dev0/grpcio_testing.egg-info/top_level.txt     2025-10-30 21:33:12.000000000 +0000
@@ -1 +1,2 @@
+dist
 grpc_testing
diff '--color=auto' -bur master_tar/grpcio_testing-1.77.0.dev0/MANIFEST.in pr_tar/grpcio_testing-1.77.0.dev0/MANIFEST.in
--- master_tar/grpcio_testing-1.77.0.dev0/MANIFEST.in   2025-10-30 20:25:58.000000000 +0000
+++ pr_tar/grpcio_testing-1.77.0.dev0/MANIFEST.in       2025-10-30 20:00:51.000000000 +0000
@@ -1,4 +1,5 @@
 include grpc_version.py
+include python_version.py
 recursive-include grpc_testing *.py
 global-exclude *.pyc
 include LICENSE
diff '--color=auto' -bur master_tar/grpcio_testing-1.77.0.dev0/PKG-INFO pr_tar/grpcio_testing-1.77.0.dev0/PKG-INFO
--- master_tar/grpcio_testing-1.77.0.dev0/PKG-INFO      2025-10-30 20:34:35.548599700 +0000
+++ pr_tar/grpcio_testing-1.77.0.dev0/PKG-INFO  2025-10-30 21:33:12.330731400 +0000
@@ -2,21 +2,21 @@
 Name: grpcio-testing
 Version: 1.77.0.dev0
 Summary: Testing utilities for gRPC Python
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
+Project-URL: Documentation, https://grpc.github.io/grpc/python/grpc_testing.html
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: protobuf<7.0.0,>=6.31.1
 Requires-Dist: grpcio>=1.77.0.dev0
-Dynamic: author
-Dynamic: author-email
-Dynamic: description
-Dynamic: home-page
-Dynamic: license
+Dynamic: classifier
 Dynamic: license-file
 Dynamic: requires-dist
-Dynamic: summary
+Dynamic: requires-python
 
 gRPC Python Testing Package
 ===========================
Only in pr_tar/grpcio_testing-1.77.0.dev0: pyproject.toml
Only in pr_tar/grpcio_testing-1.77.0.dev0: python_version.py
diff '--color=auto' -bur master_tar/grpcio_testing-1.77.0.dev0/setup.py pr_tar/grpcio_testing-1.77.0.dev0/setup.py
--- master_tar/grpcio_testing-1.77.0.dev0/setup.py      2025-10-30 20:25:58.000000000 +0000
+++ pr_tar/grpcio_testing-1.77.0.dev0/setup.py  2025-10-30 20:00:51.000000000 +0000
@@ -18,14 +18,13 @@
 
 import setuptools
 
-_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__))
-_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__)))
+# Manually insert the source directory into the Python path for local module
+# imports to succeed
+sys.path.insert(0, os.path.abspath("."))
 
 # Break import style to ensure that we can find same-directory modules.
 import grpc_version
+import python_version
 
 
 class _NoOpCommand(setuptools.Command):
@@ -44,10 +43,6 @@
         pass
 
 
-PACKAGE_DIRECTORIES = {
-    "": ".",
-}
-
 INSTALL_REQUIRES = (
     "protobuf>=6.31.1,<7.0.0",
     "grpcio>={version}".format(version=grpc_version.VERSION),
@@ -67,17 +62,15 @@
         "preprocess": _NoOpCommand,
     }
 
-setuptools.setup(
-    name="grpcio-testing",
-    version=grpc_version.VERSION,
-    license="Apache License 2.0",
-    description="Testing utilities for gRPC Python",
-    long_description=open(_README_PATH, "r").read(),
-    author="The gRPC Authors",
-    author_email="grpc-io@googlegroups.com",
-    url="https://grpc.io",
-    package_dir=PACKAGE_DIRECTORIES,
-    packages=setuptools.find_packages("."),
+CLASSIFIERS = [
+    "Programming Language :: Python",
+    "Programming Language :: Python :: 3",
+]
+
+if __name__ == "__main__":
+    setuptools.setup(
+        python_requires=f">={python_version.MIN_PYTHON_VERSION}",
     install_requires=INSTALL_REQUIRES,
     cmdclass=COMMAND_CLASS,
-)
+        classifiers=CLASSIFIERS,
+    )

@sreenithi
Copy link
Contributor Author

sreenithi commented Oct 31, 2025

  1. diff for xds-protos package:
# diff of unzipped wheel file
$ diff -bur master/xds_protos/ pr/xds_protos
$

# diff of metadata from the wheel file
$ diff -bur master/xds_protos-1.77.0.dev0.dist-info/ pr/xds_protos-1.77.0.dev0.dist-info/
diff '--color=auto' -bur master/xds_protos-1.77.0.dev0.dist-info/METADATA pr/xds_protos-1.77.0.dev0.dist-info/METADATA
--- master/xds_protos-1.77.0.dev0.dist-info/METADATA    2025-10-30 20:34:34.000000000 +0000
+++ pr/xds_protos-1.77.0.dev0.dist-info/METADATA        2025-10-30 21:33:38.000000000 +0000
@@ -2,28 +2,18 @@
 Name: xds-protos
 Version: 1.77.0.dev0
 Summary: Generated Python code from envoyproxy/data-plane-api
-Home-page: https://grpc.io
-Author: The gRPC Authors
-Author-email: grpc-io@googlegroups.com
-License: Apache License 2.0
+Author-email: The gRPC Authors <grpc-io@googlegroups.com>
+License-Expression: Apache-2.0
+Project-URL: Homepage, https://grpc.io
 Classifier: Development Status :: 3 - Alpha
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: License :: OSI Approved :: Apache Software License
 Requires-Python: >=3.9
 Description-Content-Type: text/x-rst
 Requires-Dist: grpcio>=1.74.0
 Requires-Dist: protobuf<7.0.0,>=6.31.1
-Dynamic: author
-Dynamic: author-email
-Dynamic: classifier
-Dynamic: description
-Dynamic: description-content-type
-Dynamic: home-page
-Dynamic: license
 Dynamic: requires-dist
 Dynamic: requires-python
-Dynamic: summary
 
 Package "xds-protos" is a collection of ProtoBuf generated Python files for xDS protos (or the `data-plane-api <https://github.com/envoyproxy/data-plane-api>`_). You can find the source code of this project in `grpc/grpc <https://github.com/grpc/grpc>`_. For any question or suggestion, please post to https://github.com/grpc/grpc/issues.
 
diff '--color=auto' -bur master/xds_protos-1.77.0.dev0.dist-info/RECORD pr/xds_protos-1.77.0.dev0.dist-info/RECORD
--- master/xds_protos-1.77.0.dev0.dist-info/RECORD      2025-10-30 20:34:34.000000000 +0000
+++ pr/xds_protos-1.77.0.dev0.dist-info/RECORD  2025-10-30 21:33:38.000000000 +0000
@@ -1661,7 +1661,7 @@
 xds/type/v3/cel_pb2.py,sha256=im_zFtU_JHp7DE9XxVkSi48G1Wkru72fDDLl4SL2bn0,3174
 xds/type/v3/range_pb2.py,sha256=NpuZBs3pqk8mHzL-soaPm05-gLnB3ejG94i77ZTvpZw,1953
 xds/type/v3/typed_struct_pb2.py,sha256=QZdnLBB2ZH6vsmYNsU5i_YWNr3YPE2cO6wa9JTyrezc,1769
-xds_protos-1.77.0.dev0.dist-info/METADATA,sha256=KE9FI0fzqzPRVxbBKJyrgiFzmqAnXDmDiB-to4IDKrM,1557
+xds_protos-1.77.0.dev0.dist-info/METADATA,sha256=aAuo6SKR5GHeBLQ__knCKlUK2Yz8LiQS-zow-6WrnaE,1337
 xds_protos-1.77.0.dev0.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
 xds_protos-1.77.0.dev0.dist-info/top_level.txt,sha256=nJccJN6Akp6IOVAgVibjHm2hU7Ookr4PBcVDmAN7EsA,56
 xds_protos-1.77.0.dev0.dist-info/RECORD,,

# diff of tar.gz file contents
$ diff -bur master_tar/xds_protos-1.77.0.dev0.tar.gz pr_tar/xds_protos-1.77.0.dev0.tar.gz 
Binary files master_tar/xds_protos-1.77.0.dev0.tar.gz and pr_tar/xds_protos-1.77.0.dev0.tar.gz differ
$

sys.stderr.write("warning: {} failed".format(command))


class BuildPackageProtos(setuptools.Command):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homepage = "https://grpc.io"
"Source Code" = "https://github.com/grpc/grpc"
"Bug Tracker" = "https://github.com/grpc/grpc/issues"
Documentation = "https://grpc.github.io/grpc/python"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - we should not need this file anymore. We should be able to merge it into main pyproject.toml. We couldn't configure this our linters in pyproject.toml at the time because it switched us to the new build system.

But we can merge the in a follow-up PR.

copybara-service bot pushed a commit that referenced this pull request Nov 3, 2025
…e and master branch (#41000)

The newly migrated pyproject.toml build system (in #40833) seems to have much slower build times compared to the previous setup.py builds. This difference has also been noted by few users ([Ref1](pypa/pip#7294), [Ref2](https://zameermanji.com/blog/2021/6/14/building-wheels-with-pip-is-getting-slower/)) most likely due to the overhead of creating isolated build environments for each build.

Some new runtimes for each variant target noted from different recent runs below:
```
2025-11-01 10:19:02,937 PASSED: build_artifact.python_musllinux_1_2_x86_cp312-cp312 [time=4267.1sec, retries=0:0]
2025-11-01 10:19:05,501 PASSED: build_artifact.python_musllinux_1_2_x86_cp311-cp311 [time=4269.7sec, retries=0:0]
2025-11-01 10:19:07,152 PASSED: build_artifact.python_musllinux_1_2_x86_cp310-cp310 [time=4287.0sec, retries=0:0]

2025-11-01 11:43:22,269 PASSED: build_artifact.python_manylinux2014_x86_cp312-cp312 [time=4644.4sec, retries=0:0]
2025-11-01 11:43:37,257 PASSED: build_artifact.python_manylinux2014_x86_cp314-cp314 [time=4659.4sec, retries=0:0]
2025-11-01 11:43:37,525 PASSED: build_artifact.python_manylinux2014_x86_cp311-cp311 [time=4659.7sec, retries=0:0]
2025-11-01 11:43:40,671 PASSED: build_artifact.python_manylinux2014_x86_cp310-cp310 [time=4662.8sec, retries=0:0]
2025-11-01 11:43:51,663 PASSED: build_artifact.python_manylinux2014_x86_cp39-cp39 [time=4673.8sec, retries=0:0]
2025-11-01 11:43:51,708 PASSED: build_artifact.python_manylinux2014_x86_cp313-cp313 [time=4673.8sec, retries=0:0]

2025-11-01 04:59:11,117 PASSED: build_artifact.python_linux_extra_armv7_cp311-cp311 [time=5172.2sec, retries=0:0]
2025-11-01 04:59:31,002 PASSED: build_artifact.python_linux_extra_armv7_cp314-cp314 [time=5157.0sec, retries=0:0]
2025-11-01 04:59:53,485 PASSED: build_artifact.python_linux_extra_armv7_cp39-cp39 [time=5221.7sec, retries=0:0]
```

The builds take anywhere between 70-90 minutes for each target. We have a total of 30 targets currently and 12 targets  are built parallelly in a batch. So for about 3 batches of 12 targets each and a worst case time of 90 minutes per batch, the `build_artifact` phase itself should take about 4.5 hours to complete, followed by the remaining `package` and `distribtest` phases which should be comparatively shorter.

So, I believe about 7 hours should be enough, but just keeping an extra buffer and increasing the timeout to 8 hours.

Closes #41000

COPYBARA_INTEGRATE_REVIEW=#41000 from sreenithi:increase_distribtests_timeout 44c94b0
PiperOrigin-RevId: 827672050
copybara-service bot pushed a commit that referenced this pull request Nov 4, 2025
This PR removes some additional files that were included in the grpcio_tools package wheels after migrating to pyproject.toml build system in #40833

Closes #40999

COPYBARA_INTEGRATE_REVIEW=#40999 from sreenithi:fix_grpc_tools_wheels_2 a261b21
PiperOrigin-RevId: 827755815
sreenithi added a commit to sreenithi/grpc that referenced this pull request Nov 26, 2025
This PR updates the minimum version of `setuptools` package required across different Python setup files to v77.0.1. This version contains Python 3.14 support as well as deprecates a format for defining project license in `pyproject.toml` files ([Reference](https://setuptools.pypa.io/en/stable/history.html#id71)) which is a prerequisite for grpc#40833

Closes grpc#40931

PiperOrigin-RevId: 823008815
sreenithi added a commit to sreenithi/grpc that referenced this pull request Nov 26, 2025
Pip released [v25.3](https://pip.pypa.io/en/stable/news/#v25-3) a few days back which doesn't support `setup.py` builds anymore, while we are yet to migrate to use the `pyproject.toml` build system in grpc#40833.

Hence some of our Python tests using the most recent versions of pip for the build have started to fail with errors like:
```
  ERROR: Failed building wheel for grpcio
Failed to build grpcio
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
```

This PR hence pins the pip version to 25.2 which still supports setup.py build until grpc#40833 is submitted.

Closes grpc#40959

COPYBARA_INTEGRATE_REVIEW=grpc#40959 from sreenithi:pin_pip_version d72e056
PiperOrigin-RevId: 824584176
sreenithi added a commit to sreenithi/grpc that referenced this pull request Nov 26, 2025
sreenithi added a commit to sreenithi/grpc that referenced this pull request Nov 26, 2025
…e and master branch (grpc#41000)

The newly migrated pyproject.toml build system (in grpc#40833) seems to have much slower build times compared to the previous setup.py builds. This difference has also been noted by few users ([Ref1](pypa/pip#7294), [Ref2](https://zameermanji.com/blog/2021/6/14/building-wheels-with-pip-is-getting-slower/)) most likely due to the overhead of creating isolated build environments for each build.

Some new runtimes for each variant target noted from different recent runs below:
```
2025-11-01 10:19:02,937 PASSED: build_artifact.python_musllinux_1_2_x86_cp312-cp312 [time=4267.1sec, retries=0:0]
2025-11-01 10:19:05,501 PASSED: build_artifact.python_musllinux_1_2_x86_cp311-cp311 [time=4269.7sec, retries=0:0]
2025-11-01 10:19:07,152 PASSED: build_artifact.python_musllinux_1_2_x86_cp310-cp310 [time=4287.0sec, retries=0:0]

2025-11-01 11:43:22,269 PASSED: build_artifact.python_manylinux2014_x86_cp312-cp312 [time=4644.4sec, retries=0:0]
2025-11-01 11:43:37,257 PASSED: build_artifact.python_manylinux2014_x86_cp314-cp314 [time=4659.4sec, retries=0:0]
2025-11-01 11:43:37,525 PASSED: build_artifact.python_manylinux2014_x86_cp311-cp311 [time=4659.7sec, retries=0:0]
2025-11-01 11:43:40,671 PASSED: build_artifact.python_manylinux2014_x86_cp310-cp310 [time=4662.8sec, retries=0:0]
2025-11-01 11:43:51,663 PASSED: build_artifact.python_manylinux2014_x86_cp39-cp39 [time=4673.8sec, retries=0:0]
2025-11-01 11:43:51,708 PASSED: build_artifact.python_manylinux2014_x86_cp313-cp313 [time=4673.8sec, retries=0:0]

2025-11-01 04:59:11,117 PASSED: build_artifact.python_linux_extra_armv7_cp311-cp311 [time=5172.2sec, retries=0:0]
2025-11-01 04:59:31,002 PASSED: build_artifact.python_linux_extra_armv7_cp314-cp314 [time=5157.0sec, retries=0:0]
2025-11-01 04:59:53,485 PASSED: build_artifact.python_linux_extra_armv7_cp39-cp39 [time=5221.7sec, retries=0:0]
```

The builds take anywhere between 70-90 minutes for each target. We have a total of 30 targets currently and 12 targets  are built parallelly in a batch. So for about 3 batches of 12 targets each and a worst case time of 90 minutes per batch, the `build_artifact` phase itself should take about 4.5 hours to complete, followed by the remaining `package` and `distribtest` phases which should be comparatively shorter.

So, I believe about 7 hours should be enough, but just keeping an extra buffer and increasing the timeout to 8 hours.

Closes grpc#41000

COPYBARA_INTEGRATE_REVIEW=grpc#41000 from sreenithi:increase_distribtests_timeout 44c94b0
PiperOrigin-RevId: 827672050
sreenithi added a commit to sreenithi/grpc that referenced this pull request Nov 26, 2025
This PR removes some additional files that were included in the grpcio_tools package wheels after migrating to pyproject.toml build system in grpc#40833

Closes grpc#40999

COPYBARA_INTEGRATE_REVIEW=grpc#40999 from sreenithi:fix_grpc_tools_wheels_2 a261b21
PiperOrigin-RevId: 827755815
sreenithi added a commit to sreenithi/grpc that referenced this pull request Dec 1, 2025
@sreenithi sreenithi changed the title [Python] Migrate to pyproject.toml build system [Python] Migrate to pyproject.toml build system from setup.py builds Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python] Migrate of off setup.py build system

3 participants