Migrate everything to upstream pip packages
This patch migrates all the Python packages I could find to the
packages provided by rules_python. It's possible that there are some
that I missed. In that case, the finder will have to migrate it on
their own.
A future patch will remove the remaining references to the
Debian-packaged Python packages in future patches. This patch here is
solely focused on migrating the existing users.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ic7a8ba6110516aa2446ad2ad4e2495fab62d824c
diff --git a/tools/build_rules/BUILD b/tools/build_rules/BUILD
index aeb8517..111d9d0 100644
--- a/tools/build_rules/BUILD
+++ b/tools/build_rules/BUILD
@@ -10,7 +10,7 @@
srcs = ["jinja2_generator.py"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
- deps = ["@python_jinja2"],
+ deps = ["@pip//jinja2"],
)
py_binary(
@@ -22,5 +22,5 @@
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
- deps = ["@python_jinja2"],
+ deps = ["@pip//jinja2"],
)
diff --git a/tools/ci/buildkite.yaml b/tools/ci/buildkite.yaml
index 30a7e24..e20c523 100644
--- a/tools/ci/buildkite.yaml
+++ b/tools/ci/buildkite.yaml
@@ -19,13 +19,6 @@
- tools/ci/clean-disk.sh
- tools/bazel ${STARTUP} --output_base=../k8_output_base test ${COMMON} --config=k8 --config=eigen ${TARGETS}
- # Temporary step until I manage to migrate everything over.
- # TODO(phil): Delete this step.
- - label: "x86_64_upstream_python"
- commands:
- - tools/ci/clean-disk.sh
- - tools/bazel ${STARTUP} --output_base=../k8_output_base_upstream_python test ${COMMON} --config=k8_upstream_python --config=eigen --build_tests_only --test_lang_filters=py ${TARGETS}
-
- label: "roborio"
commands:
- tools/ci/clean-disk.sh
diff --git a/tools/lint/BUILD b/tools/lint/BUILD
index fedead2..58ef879 100644
--- a/tools/lint/BUILD
+++ b/tools/lint/BUILD
@@ -1,4 +1,5 @@
load("@ci_configure//:ci.bzl", "RUNNING_IN_CI")
+load("@pip_deps//:requirements.bzl", "entry_point")
sh_binary(
name = "gofmt",
@@ -38,7 +39,7 @@
name = "yapf",
srcs = ["yapf.sh"],
data = [
- "@python_yapf",
+ entry_point("yapf"),
],
deps = [
"@bazel_tools//tools/bash/runfiles",
diff --git a/tools/lint/yapf.sh b/tools/lint/yapf.sh
index 404d5fd..d88aa42 100755
--- a/tools/lint/yapf.sh
+++ b/tools/lint/yapf.sh
@@ -11,7 +11,8 @@
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
# --- end runfiles.bash initialization v2 ---
-readonly YAPF="$(rlocation python_yapf/python_yapf)"
+YAPF="$(rlocation pip_deps_yapf/rules_python_wheel_entry_point_yapf)"
+readonly YAPF
# Run everything from the root of the tree.
cd "${BUILD_WORKSPACE_DIRECTORY}"
diff --git a/tools/platforms/BUILD b/tools/platforms/BUILD
index 6165b00..7851a72 100644
--- a/tools/platforms/BUILD
+++ b/tools/platforms/BUILD
@@ -8,15 +8,16 @@
"//tools/platforms/go:has_support",
"//tools/platforms/rust:has_support",
"//tools/platforms/nodejs:has_support",
+ "//tools/platforms/python:upstream_bundled_python",
],
)
# TODO(phil): Delete this platform after migrating everything to use upstream
# pip rules.
platform(
- name = "linux_x86_upstream_python",
+ name = "linux_x86_legacy_python",
constraint_values = [
- "//tools/platforms/python:upstream_bundled_python",
+ "//tools/platforms/python:debian_bundled_python",
],
parents = [
":linux_x86",