Bazel: Export rules_python in plugin API

This is a preparation to flip this option:
--incompatible_load_python_rules_from_bzl in Bazel core. Given, that
almost all plugins that support standalone build mode use eclipse
project generation, we prefer to export this external dependency in
Bazlets and avoid including these bits (and the upgrading procedure)
in every plugin.

Change-Id: I11096db9594a2b67bdd462e354755fcdd8b69ac7
diff --git a/gerrit_api.bzl b/gerrit_api.bzl
index 545cefc..bae8f8e 100644
--- a/gerrit_api.bzl
+++ b/gerrit_api.bzl
@@ -1,4 +1,5 @@
 load("//:bouncycastle.bzl", "bouncycastle_repos")
+load("//:rules_python.bzl", "rules_python_repos")
 load("//tools:maven_jar.bzl", "maven_jar")
 
 """Bazel rule for building [Gerrit Code Review](https://www.gerritcodereview.com/)
@@ -9,6 +10,7 @@
 
 def gerrit_api():
     bouncycastle_repos()
+    rules_python_repos()
 
     maven_jar(
         name = "gerrit_plugin_api",
diff --git a/gerrit_api_maven_local.bzl b/gerrit_api_maven_local.bzl
index 8f6a8a2..5e21fb7 100644
--- a/gerrit_api_maven_local.bzl
+++ b/gerrit_api_maven_local.bzl
@@ -1,4 +1,5 @@
 load("//:bouncycastle.bzl", "bouncycastle_repos")
+load("//:rules_python.bzl", "rules_python_repos")
 load("//tools:maven_jar.bzl", "MAVEN_LOCAL", "maven_jar")
 
 """Bazel rule for building [Gerrit Code Review](https://www.gerritcodereview.com/)
@@ -9,6 +10,7 @@
 
 def gerrit_api_maven_local():
     bouncycastle_repos()
+    rules_python_repos()
 
     maven_jar(
         name = "gerrit_plugin_api",
diff --git a/rules_python.bzl b/rules_python.bzl
new file mode 100644
index 0000000..ad07c37
--- /dev/null
+++ b/rules_python.bzl
@@ -0,0 +1,12 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+"""Bazel rule for fetching rules python dependency.
+"""
+
+def rules_python_repos():
+    http_archive(
+        name = "rules_python",
+        sha256 = "b5bab4c47e863e0fbb77df4a40c45ca85f98f5a2826939181585644c9f31b97b",
+        strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
+        urls = ["https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.tar.gz"],
+    )