mirror of https://github.com/grpc/grpc.git
[Deps] Removed vendored python deps from Bazel builds (#38692)
With the Bazel build transitioning to BzlMod, all vendored Bazel Python targets must be removed. These targets are not available in the BCR and need be managed via a pip `requirements.bazel.txt` file. gRPC already uses this approach, so it is going to be extended to include those target. (e.g. see [test utils](e06ad82c3f/test/cpp/naming/utils/BUILD (L27-L45)
) to understand how those targets are used)
Additionally, the generation of the `requirements.bazel.lock` file has been improved. Because this file is a lock file, including all transitive dependencies, manual maintenance is not managable. Its new source file, `requirements.bazel.txt` is created to list only the direct dependencies used by gRPC, along with instructions for generating the full lock file. This source file omits specific version requirements to use the latest available versions, but version constraints can be added as needed.
Closes #38692
PiperOrigin-RevId: 724427578
pull/38704/head
parent
1f97f75401
commit
68b5dc5125
16 changed files with 167 additions and 196 deletions
@ -0,0 +1,116 @@ |
||||
# |
||||
# This file is autogenerated by pip-compile with Python 3.8 |
||||
# by the following command: |
||||
# |
||||
# pip-compile --allow-unsafe requirements.bazel.in |
||||
# |
||||
absl-py==2.1.0 |
||||
# via -r requirements.bazel.in |
||||
attrs==25.1.0 |
||||
# via twisted |
||||
automat==24.8.1 |
||||
# via twisted |
||||
cachetools==5.5.1 |
||||
# via google-auth |
||||
certifi==2025.1.31 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# requests |
||||
chardet==5.2.0 |
||||
# via -r requirements.bazel.in |
||||
charset-normalizer==3.4.1 |
||||
# via requests |
||||
constantly==23.10.4 |
||||
# via twisted |
||||
deprecated==1.2.18 |
||||
# via |
||||
# opentelemetry-api |
||||
# opentelemetry-semantic-conventions |
||||
gevent==24.2.1 |
||||
# via -r requirements.bazel.in |
||||
google-auth==2.38.0 |
||||
# via -r requirements.bazel.in |
||||
googleapis-common-protos==1.66.0 |
||||
# via -r requirements.bazel.in |
||||
greenlet==3.1.1 |
||||
# via gevent |
||||
hyperlink==21.0.0 |
||||
# via twisted |
||||
idna==3.10 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# hyperlink |
||||
# requests |
||||
importlib-metadata==8.5.0 |
||||
# via opentelemetry-api |
||||
incremental==24.7.2 |
||||
# via twisted |
||||
opentelemetry-api==1.30.0 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# opentelemetry-exporter-prometheus |
||||
# opentelemetry-resourcedetector-gcp |
||||
# opentelemetry-sdk |
||||
# opentelemetry-semantic-conventions |
||||
opentelemetry-exporter-prometheus==0.51b0 |
||||
# via -r requirements.bazel.in |
||||
opentelemetry-resourcedetector-gcp==1.9.0a0 |
||||
# via -r requirements.bazel.in |
||||
opentelemetry-sdk==1.30.0 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# opentelemetry-exporter-prometheus |
||||
# opentelemetry-resourcedetector-gcp |
||||
opentelemetry-semantic-conventions==0.51b0 |
||||
# via opentelemetry-sdk |
||||
prometheus-client==0.21.1 |
||||
# via opentelemetry-exporter-prometheus |
||||
protobuf==5.29.3 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# googleapis-common-protos |
||||
pyasn1==0.6.1 |
||||
# via |
||||
# pyasn1-modules |
||||
# rsa |
||||
pyasn1-modules==0.4.1 |
||||
# via google-auth |
||||
pyyaml==6.0.2 |
||||
# via -r requirements.bazel.in |
||||
requests==2.32.3 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# opentelemetry-resourcedetector-gcp |
||||
rsa==4.9 |
||||
# via google-auth |
||||
tomli==2.2.1 |
||||
# via incremental |
||||
twisted==24.11.0 |
||||
# via -r requirements.bazel.in |
||||
typing-extensions==4.12.2 |
||||
# via |
||||
# automat |
||||
# opentelemetry-resourcedetector-gcp |
||||
# opentelemetry-sdk |
||||
# twisted |
||||
urllib3==2.2.3 |
||||
# via |
||||
# -r requirements.bazel.in |
||||
# requests |
||||
wrapt==1.17.2 |
||||
# via deprecated |
||||
zipp==3.20.2 |
||||
# via importlib-metadata |
||||
zope-event==5.0 |
||||
# via gevent |
||||
zope-interface==7.2 |
||||
# via |
||||
# gevent |
||||
# twisted |
||||
|
||||
# The following packages are considered to be unsafe in a requirements file: |
||||
setuptools==75.3.0 |
||||
# via |
||||
# incremental |
||||
# zope-event |
||||
# zope-interface |
@ -1,41 +1,41 @@ |
||||
# GRPC Python setup requirements |
||||
# The requirements listed below are solely for Bazel tests and should not be used elsewhere. |
||||
absl-py==1.4.0 |
||||
cachetools==5.3.2 |
||||
certifi==2023.7.22 |
||||
chardet==3.0.4 |
||||
charset-normalizer==3.3.2 |
||||
coverage==4.5.4 |
||||
cython==3.0.0 |
||||
Deprecated==1.2.14 |
||||
gevent==22.08.0 |
||||
google-api-core==2.24.0 |
||||
google-auth==2.23.4 |
||||
google-cloud-monitoring==2.26.0 |
||||
google-cloud-trace==1.15.0 |
||||
googleapis-common-protos==1.63.1 |
||||
greenlet==1.1.3.post0 |
||||
idna==2.7 |
||||
importlib-metadata==6.11.0 |
||||
oauth2client==4.1.0 |
||||
opencensus-context==0.1.3 |
||||
opentelemetry-api==1.25.0 |
||||
opentelemetry-exporter-prometheus==0.46b0 |
||||
opentelemetry-resourcedetector-gcp==1.6.0a0 |
||||
opentelemetry-sdk==1.25.0 |
||||
opentelemetry-semantic-conventions==0.46b0 |
||||
prometheus_client==0.20.0 |
||||
proto-plus==1.25.0 |
||||
protobuf>=5.27.1,<6.0dev |
||||
pyasn1-modules==0.3.0 |
||||
pyasn1==0.5.0 |
||||
requests==2.25.1 |
||||
rsa==4.9 |
||||
setuptools==44.1.1 |
||||
typing-extensions==4.9.0 |
||||
urllib3==1.26.18 |
||||
wheel==0.38.1 |
||||
wrapt==1.16.0 |
||||
zipp==3.17.0 |
||||
zope.event==4.5.0 |
||||
zope.interface==6.1 |
||||
# Copyright 2025 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. |
||||
# |
||||
# This file provides the source for generating requirements.bazel.lock. |
||||
# Instructions for generation follow: |
||||
# Use the oldest supported version of Python |
||||
# |
||||
# $ docker run -it --rm -v $(pwd):/grpc python:3.8 /bin/bash |
||||
# # cd grpc |
||||
# # pip install pip-tools |
||||
# # pip-compile --allow-unsafe requirements.bazel.txt > requirements.bazel.lock |
||||
# # exit |
||||
# $ sudo chown $USER requirements.bazel.lock |
||||
|
||||
absl-py |
||||
certifi |
||||
chardet |
||||
gevent |
||||
google-auth |
||||
googleapis-common-protos |
||||
idna |
||||
opentelemetry-api |
||||
opentelemetry-exporter-prometheus |
||||
opentelemetry-resourcedetector-gcp |
||||
opentelemetry-sdk |
||||
protobuf |
||||
pyyaml # for DNS test |
||||
requests |
||||
twisted # for DNS test |
||||
urllib3 |
||||
|
@ -1,7 +0,0 @@ |
||||
py_library( |
||||
name = "constantly", |
||||
srcs = glob(["constantly/*.py"]), |
||||
visibility = [ |
||||
"//visibility:public", |
||||
], |
||||
) |
@ -1,10 +0,0 @@ |
||||
py_library( |
||||
name = "incremental", |
||||
srcs = glob(["src/incremental/*.py"]), |
||||
imports = [ |
||||
"src", |
||||
], |
||||
visibility = [ |
||||
"//visibility:public", |
||||
], |
||||
) |
@ -1,15 +0,0 @@ |
||||
py_library( |
||||
name = "twisted", |
||||
srcs = glob(["src/twisted/**/*.py"]), |
||||
imports = [ |
||||
"src", |
||||
], |
||||
visibility = [ |
||||
"//visibility:public", |
||||
], |
||||
deps = [ |
||||
"@com_github_twisted_incremental//:incremental", |
||||
"@com_github_twisted_constantly//:constantly", |
||||
"@com_github_zopefoundation_zope_interface//:zope_interface", |
||||
], |
||||
) |
@ -1,10 +0,0 @@ |
||||
py_library( |
||||
name = "yaml", |
||||
srcs = glob(["lib/yaml/*.py"]), |
||||
imports = [ |
||||
"lib", |
||||
], |
||||
visibility = [ |
||||
"//visibility:public", |
||||
], |
||||
) |
@ -1,13 +0,0 @@ |
||||
py_library( |
||||
name = "zope_interface", |
||||
srcs = glob([ |
||||
"src/zope/interface/*.py", |
||||
"src/zope/interface/common/*.py", |
||||
]), |
||||
imports = [ |
||||
"src", |
||||
], |
||||
visibility = [ |
||||
"//visibility:public", |
||||
], |
||||
) |
Loading…
Reference in new issue