Skip to content

Commit c6e6381

Browse files
Alex Eaglealexeagle
authored andcommitted
move rules_python_external out of experimental
- mv experimental/rules_python_external -> python/pip_install - mv examples/rules_python_external -> examples/pip_install This promotes rules_python_external as a public API in rules_python. In a follow-up PR we'll update the documentation to indicate this and instruct users how to switch.
1 parent 60d0477 commit c6e6381

File tree

32 files changed

+109
-84
lines changed

32 files changed

+109
-84
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This lets us glob() up all the files inside the examples to make them inputs to tests
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
55
# To update these lines, run tools/bazel_integration_test/update_deleted_packages.sh
6-
build --deleted_packages=examples/pip/boto,examples/pip/extras,examples/pip/helloworld,examples/rules_python_external
7-
query --deleted_packages=examples/pip/boto,examples/pip/extras,examples/pip/helloworld,examples/rules_python_external
6+
build --deleted_packages=examples/pip/boto,examples/pip/extras,examples/pip/helloworld,examples/pip_install
7+
query --deleted_packages=examples/pip/boto,examples/pip/extras,examples/pip/helloworld,examples/pip_install
88

99
test --test_output=errors

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ filegroup(
2727
"LICENSE",
2828
"internal_deps.bzl",
2929
"internal_setup.bzl",
30-
"//experimental/rules_python_external:distribution",
30+
"//python/pip_install:distribution",
3131
"//python:distribution",
3232
"//tools:distribution",
3333
],

docs/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ bzl_library(
3838
],
3939
)
4040

41+
bzl_library(
42+
name = "bazel_repo_tools",
43+
srcs = [
44+
"@bazel_tools//tools:bzl_srcs",
45+
]
46+
)
47+
4148
bzl_library(
4249
name = "defs",
4350
srcs = [
@@ -62,6 +69,10 @@ stardoc(
6269
name = "pip-docs",
6370
out = "pip.md",
6471
input = "//python:pip.bzl",
72+
deps = [
73+
":bazel_repo_tools",
74+
"//python/pip_install:bzl",
75+
],
6576
)
6677

6778
stardoc(

examples/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ bazel_integration_test(
2323
)
2424

2525
bazel_integration_test(
26-
name = "rules_python_external_example",
26+
name = "pip_install_example",
2727
timeout = "long",
2828
)
File renamed without changes.

examples/pip_install/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# pip_install example
2+
3+
This example shows how to use pip to fetch external dependencies from a requirements.txt file,
4+
then use them in BUILD files as dependencies of Bazel targets.

examples/rules_python_external/WORKSPACE renamed to examples/pip_install/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ load("@rules_python//python:repositories.bzl", "py_repositories")
1212

1313
py_repositories()
1414

15-
load("@rules_python//experimental/rules_python_external:defs.bzl", "pip_install")
15+
load("@rules_python//python:pip.bzl", "pip_install")
1616

1717
pip_install(
1818
# (Optional) You can provide extra parameters to pip.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)