Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bazel io_bazel_rules_python to 0.1.0 #25143

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,9 @@ rbe_autoconfig(
),
)

load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")
load("@io_bazel_rules_python//python:pip.bzl", "pip_install")

pip_import(
pip_install(
name = "grpc_python_dependencies",
requirements = "@com_github_grpc_grpc//:requirements.bazel.txt",
)

load("@grpc_python_dependencies//:requirements.bzl", "pip_install")

pip_repositories()

pip_install()
4 changes: 2 additions & 2 deletions bazel/grpc_python_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def grpc_python_deps():
if "io_bazel_rules_python" not in native.existing_rules():
http_archive(
name = "io_bazel_rules_python",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gnossen what's really puzzling me is why are importing github.com/bazelbuild/rules_python twice - once as io_bazel_rules_python and another time as rules_python (a few lines below), but each time at a different commit.
This is something that really should be explained in a comment - I can add an explanatory comment once I understand why this hack is needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is just an oversight. The second one doesn't even seem to be referenced anywhere:

rbellevi@rbell:~/Dev/grpc$ find . -type f -a -not -path './third_party*' -a -not -path '*venv*' -a -not -path '*virtual*' -a -not -path './git*' -exec grep -Hn rules_python {} \;
grep: ./tools/run_tests/python_utils/start_port_server.pyc: Permission denied
./summerofcode/2018/naresh.md:29:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/).
./summerofcode/2018/naresh.md:37:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/)).
./src/python/grpcio_tests/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./src/python/grpcio_tests/build/lib/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./bazel/grpc_python_deps.bzl:36:    if "io_bazel_rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:38:            name = "io_bazel_rules_python",
./bazel/grpc_python_deps.bzl:39:            url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
./bazel/grpc_python_deps.bzl:43:    if "rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:45:            name = "rules_python",
./bazel/grpc_python_deps.bzl:46:            url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
./bazel/grpc_python_deps.bzl:48:            strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
./WORKSPACE:101:load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")

Feel free to remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
)

if "rules_python" not in native.existing_rules():
Expand Down