aboutsummaryrefslogtreecommitdiff
path: root/internal_deps.bzl
diff options
context:
space:
mode:
authorFlorian Weikert <fwe@google.com>2019-08-13 14:02:37 +0200
committerGitHub <noreply@github.com>2019-08-13 14:02:37 +0200
commitfe5e0fa208f4fc4e469a960fe8c0d46394a21c21 (patch)
tree2d1898d94a1895fe885108d8dcea15c10dd7a072 /internal_deps.bzl
parent4b84ad270387a7c439ebdccfd530e2339601ef27 (diff)
downloadbazelbuild-rules_python-fe5e0fa208f4fc4e469a960fe8c0d46394a21c21.tar.gz
Comply with the standards of the Bazel federation (#223)
This commit allows rules_python to be a member of the Bazel federation, since it adds the required bzl files related to setup and dependencies. Moreover, it also changes the WORKSPACE to fetch all dependencies through the federation. rules_python_internal_setup() in internal_setup.bzl still needs some work since some of the dependencies don't export their proper setup functions yet, which means that the present commit has to work around that particular problem.
Diffstat (limited to 'internal_deps.bzl')
-rw-r--r--internal_deps.bzl46
1 files changed, 46 insertions, 0 deletions
diff --git a/internal_deps.bzl b/internal_deps.bzl
new file mode 100644
index 0000000..160e68e
--- /dev/null
+++ b/internal_deps.bzl
@@ -0,0 +1,46 @@
+load("@bazel_federation//:repositories.bzl", "bazel_stardoc", "rules_sass")
+load("@bazel_federation//:third_party_repositories.bzl", "futures_2_whl", "futures_3_whl", "google_cloud_language_whl", "grpc_whl", "mock_whl", "subpar")
+load("@rules_python//python:pip.bzl", "pip_import")
+
+
+def rules_python_internal_deps():
+ bazel_stardoc()
+ rules_sass()
+
+ subpar()
+
+ # Test data for WHL tool testing.
+ futures_2_whl()
+ futures_3_whl()
+ google_cloud_language_whl()
+ grpc_whl()
+ mock_whl()
+
+ piptool()
+ examples()
+
+
+def piptool():
+ pip_import(
+ name = "piptool_deps",
+ requirements = "@rules_python//python:requirements.txt",
+ )
+
+
+def examples():
+ pip_import(
+ name = "examples_helloworld",
+ requirements = "@rules_python//examples/helloworld:requirements.txt",
+ )
+ pip_import(
+ name = "examples_version",
+ requirements = "@rules_python//examples/version:requirements.txt",
+ )
+ pip_import(
+ name = "examples_boto",
+ requirements = "@rules_python//examples/boto:requirements.txt",
+ )
+ pip_import(
+ name = "examples_extras",
+ requirements = "@rules_python//examples/extras:requirements.txt",
+ )