1*60517a1eSAndroid Build Coastguard Worker# Copyright 2023 The Bazel Authors. All rights reserved. 2*60517a1eSAndroid Build Coastguard Worker# 3*60517a1eSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 4*60517a1eSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 5*60517a1eSAndroid Build Coastguard Worker# You may obtain a copy of the License at 6*60517a1eSAndroid Build Coastguard Worker# 7*60517a1eSAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 8*60517a1eSAndroid Build Coastguard Worker# 9*60517a1eSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 10*60517a1eSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 11*60517a1eSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*60517a1eSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 13*60517a1eSAndroid Build Coastguard Worker# limitations under the License. 14*60517a1eSAndroid Build Coastguard Worker 15*60517a1eSAndroid Build Coastguard Worker"""Dependencies that are needed for rules_python tests and tools.""" 16*60517a1eSAndroid Build Coastguard Worker 17*60517a1eSAndroid Build Coastguard Workerload("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive", _http_file = "http_file") 18*60517a1eSAndroid Build Coastguard Workerload("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 19*60517a1eSAndroid Build Coastguard Worker 20*60517a1eSAndroid Build Coastguard Workerdef http_archive(name, **kwargs): 21*60517a1eSAndroid Build Coastguard Worker maybe( 22*60517a1eSAndroid Build Coastguard Worker _http_archive, 23*60517a1eSAndroid Build Coastguard Worker name = name, 24*60517a1eSAndroid Build Coastguard Worker **kwargs 25*60517a1eSAndroid Build Coastguard Worker ) 26*60517a1eSAndroid Build Coastguard Worker 27*60517a1eSAndroid Build Coastguard Workerdef http_file(name, **kwargs): 28*60517a1eSAndroid Build Coastguard Worker maybe( 29*60517a1eSAndroid Build Coastguard Worker _http_file, 30*60517a1eSAndroid Build Coastguard Worker name = name, 31*60517a1eSAndroid Build Coastguard Worker **kwargs 32*60517a1eSAndroid Build Coastguard Worker ) 33*60517a1eSAndroid Build Coastguard Worker 34*60517a1eSAndroid Build Coastguard Workerdef rules_python_internal_deps(): 35*60517a1eSAndroid Build Coastguard Worker """Fetches all required dependencies for rules_python tests and tools.""" 36*60517a1eSAndroid Build Coastguard Worker 37*60517a1eSAndroid Build Coastguard Worker # This version is also used in python/tests/toolchains/workspace_template/WORKSPACE.tmpl 38*60517a1eSAndroid Build Coastguard Worker # and tests/ignore_root_user_error/WORKSPACE. 39*60517a1eSAndroid Build Coastguard Worker # If you update this dependency, please update the tests as well. 40*60517a1eSAndroid Build Coastguard Worker http_archive( 41*60517a1eSAndroid Build Coastguard Worker name = "bazel_skylib", 42*60517a1eSAndroid Build Coastguard Worker sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d", 43*60517a1eSAndroid Build Coastguard Worker urls = [ 44*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", 45*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", 46*60517a1eSAndroid Build Coastguard Worker ], 47*60517a1eSAndroid Build Coastguard Worker ) 48*60517a1eSAndroid Build Coastguard Worker 49*60517a1eSAndroid Build Coastguard Worker http_archive( 50*60517a1eSAndroid Build Coastguard Worker name = "rules_pkg", 51*60517a1eSAndroid Build Coastguard Worker urls = [ 52*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", 53*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", 54*60517a1eSAndroid Build Coastguard Worker ], 55*60517a1eSAndroid Build Coastguard Worker sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", 56*60517a1eSAndroid Build Coastguard Worker ) 57*60517a1eSAndroid Build Coastguard Worker 58*60517a1eSAndroid Build Coastguard Worker http_archive( 59*60517a1eSAndroid Build Coastguard Worker name = "rules_testing", 60*60517a1eSAndroid Build Coastguard Worker sha256 = "02c62574631876a4e3b02a1820cb51167bb9cdcdea2381b2fa9d9b8b11c407c4", 61*60517a1eSAndroid Build Coastguard Worker strip_prefix = "rules_testing-0.6.0", 62*60517a1eSAndroid Build Coastguard Worker url = "https://github.com/bazelbuild/rules_testing/releases/download/v0.6.0/rules_testing-v0.6.0.tar.gz", 63*60517a1eSAndroid Build Coastguard Worker ) 64*60517a1eSAndroid Build Coastguard Worker 65*60517a1eSAndroid Build Coastguard Worker http_archive( 66*60517a1eSAndroid Build Coastguard Worker name = "io_bazel_stardoc", 67*60517a1eSAndroid Build Coastguard Worker sha256 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432", 68*60517a1eSAndroid Build Coastguard Worker urls = [ 69*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz", 70*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz", 71*60517a1eSAndroid Build Coastguard Worker ], 72*60517a1eSAndroid Build Coastguard Worker ) 73*60517a1eSAndroid Build Coastguard Worker 74*60517a1eSAndroid Build Coastguard Worker # The below two deps are required for the integration test with bazel 75*60517a1eSAndroid Build Coastguard Worker # gazelle. Maybe the test should be moved to the `gazelle` workspace? 76*60517a1eSAndroid Build Coastguard Worker http_archive( 77*60517a1eSAndroid Build Coastguard Worker name = "io_bazel_rules_go", 78*60517a1eSAndroid Build Coastguard Worker sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", 79*60517a1eSAndroid Build Coastguard Worker urls = [ 80*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", 81*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", 82*60517a1eSAndroid Build Coastguard Worker ], 83*60517a1eSAndroid Build Coastguard Worker ) 84*60517a1eSAndroid Build Coastguard Worker 85*60517a1eSAndroid Build Coastguard Worker http_archive( 86*60517a1eSAndroid Build Coastguard Worker name = "bazel_gazelle", 87*60517a1eSAndroid Build Coastguard Worker sha256 = "727f3e4edd96ea20c29e8c2ca9e8d2af724d8c7778e7923a854b2c80952bc405", 88*60517a1eSAndroid Build Coastguard Worker urls = [ 89*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.30.0/bazel-gazelle-v0.30.0.tar.gz", 90*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.30.0/bazel-gazelle-v0.30.0.tar.gz", 91*60517a1eSAndroid Build Coastguard Worker ], 92*60517a1eSAndroid Build Coastguard Worker ) 93*60517a1eSAndroid Build Coastguard Worker 94*60517a1eSAndroid Build Coastguard Worker # Test data for WHL tool testing. 95*60517a1eSAndroid Build Coastguard Worker http_file( 96*60517a1eSAndroid Build Coastguard Worker name = "futures_2_2_0_whl", 97*60517a1eSAndroid Build Coastguard Worker downloaded_file_path = "futures-2.2.0-py2.py3-none-any.whl", 98*60517a1eSAndroid Build Coastguard Worker sha256 = "9fd22b354a4c4755ad8c7d161d93f5026aca4cfe999bd2e53168f14765c02cd6", 99*60517a1eSAndroid Build Coastguard Worker # From https://pypi.org/pypi/futures/2.2.0 100*60517a1eSAndroid Build Coastguard Worker urls = [ 101*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/pypi.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl", 102*60517a1eSAndroid Build Coastguard Worker "https://pypi.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl", 103*60517a1eSAndroid Build Coastguard Worker ], 104*60517a1eSAndroid Build Coastguard Worker ) 105*60517a1eSAndroid Build Coastguard Worker 106*60517a1eSAndroid Build Coastguard Worker http_file( 107*60517a1eSAndroid Build Coastguard Worker name = "futures_3_1_1_whl", 108*60517a1eSAndroid Build Coastguard Worker downloaded_file_path = "futures-3.1.1-py2-none-any.whl", 109*60517a1eSAndroid Build Coastguard Worker sha256 = "c4884a65654a7c45435063e14ae85280eb1f111d94e542396717ba9828c4337f", 110*60517a1eSAndroid Build Coastguard Worker # From https://pypi.org/pypi/futures 111*60517a1eSAndroid Build Coastguard Worker urls = [ 112*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/pypi.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl", 113*60517a1eSAndroid Build Coastguard Worker "https://pypi.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl", 114*60517a1eSAndroid Build Coastguard Worker ], 115*60517a1eSAndroid Build Coastguard Worker ) 116*60517a1eSAndroid Build Coastguard Worker 117*60517a1eSAndroid Build Coastguard Worker http_file( 118*60517a1eSAndroid Build Coastguard Worker name = "google_cloud_language_whl", 119*60517a1eSAndroid Build Coastguard Worker downloaded_file_path = "google_cloud_language-0.29.0-py2.py3-none-any.whl", 120*60517a1eSAndroid Build Coastguard Worker sha256 = "a2dd34f0a0ebf5705dcbe34bd41199b1d0a55c4597d38ed045bd183361a561e9", 121*60517a1eSAndroid Build Coastguard Worker # From https://pypi.org/pypi/google-cloud-language 122*60517a1eSAndroid Build Coastguard Worker urls = [ 123*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/pypi.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl", 124*60517a1eSAndroid Build Coastguard Worker "https://pypi.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl", 125*60517a1eSAndroid Build Coastguard Worker ], 126*60517a1eSAndroid Build Coastguard Worker ) 127*60517a1eSAndroid Build Coastguard Worker 128*60517a1eSAndroid Build Coastguard Worker http_file( 129*60517a1eSAndroid Build Coastguard Worker name = "grpc_whl", 130*60517a1eSAndroid Build Coastguard Worker downloaded_file_path = "grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", 131*60517a1eSAndroid Build Coastguard Worker sha256 = "c232d6d168cb582e5eba8e1c0da8d64b54b041dd5ea194895a2fe76050916561", 132*60517a1eSAndroid Build Coastguard Worker # From https://pypi.org/pypi/grpcio/1.6.0 133*60517a1eSAndroid Build Coastguard Worker urls = [ 134*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/pypi.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", 135*60517a1eSAndroid Build Coastguard Worker "https://pypi.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", 136*60517a1eSAndroid Build Coastguard Worker ], 137*60517a1eSAndroid Build Coastguard Worker ) 138*60517a1eSAndroid Build Coastguard Worker 139*60517a1eSAndroid Build Coastguard Worker http_file( 140*60517a1eSAndroid Build Coastguard Worker name = "mock_whl", 141*60517a1eSAndroid Build Coastguard Worker downloaded_file_path = "mock-2.0.0-py2.py3-none-any.whl", 142*60517a1eSAndroid Build Coastguard Worker sha256 = "5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", 143*60517a1eSAndroid Build Coastguard Worker # From https://pypi.org/pypi/mock 144*60517a1eSAndroid Build Coastguard Worker urls = [ 145*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/pypi.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl", 146*60517a1eSAndroid Build Coastguard Worker "https://pypi.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl", 147*60517a1eSAndroid Build Coastguard Worker ], 148*60517a1eSAndroid Build Coastguard Worker ) 149*60517a1eSAndroid Build Coastguard Worker 150*60517a1eSAndroid Build Coastguard Worker http_archive( 151*60517a1eSAndroid Build Coastguard Worker name = "rules_bazel_integration_test", 152*60517a1eSAndroid Build Coastguard Worker sha256 = "6e65d497c68f5794349bfa004369e144063686ce1ebd0227717cd23285be45ef", 153*60517a1eSAndroid Build Coastguard Worker urls = [ 154*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazel-contrib/rules_bazel_integration_test/releases/download/v0.20.0/rules_bazel_integration_test.v0.20.0.tar.gz", 155*60517a1eSAndroid Build Coastguard Worker ], 156*60517a1eSAndroid Build Coastguard Worker ) 157*60517a1eSAndroid Build Coastguard Worker 158*60517a1eSAndroid Build Coastguard Worker # Dependency of rules_bazel_integration_test. 159*60517a1eSAndroid Build Coastguard Worker http_archive( 160*60517a1eSAndroid Build Coastguard Worker name = "cgrindel_bazel_starlib", 161*60517a1eSAndroid Build Coastguard Worker sha256 = "9090280a9cff7322e7c22062506b3273a2e880ca464e520b5c77fdfbed4e8805", 162*60517a1eSAndroid Build Coastguard Worker urls = [ 163*60517a1eSAndroid Build Coastguard Worker "https://github.com/cgrindel/bazel-starlib/releases/download/v0.18.1/bazel-starlib.v0.18.1.tar.gz", 164*60517a1eSAndroid Build Coastguard Worker ], 165*60517a1eSAndroid Build Coastguard Worker ) 166*60517a1eSAndroid Build Coastguard Worker 167*60517a1eSAndroid Build Coastguard Worker http_archive( 168*60517a1eSAndroid Build Coastguard Worker name = "rules_proto", 169*60517a1eSAndroid Build Coastguard Worker sha256 = "904a8097fae42a690c8e08d805210e40cccb069f5f9a0f6727cf4faa7bed2c9c", 170*60517a1eSAndroid Build Coastguard Worker strip_prefix = "rules_proto-6.0.0-rc1", 171*60517a1eSAndroid Build Coastguard Worker url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0-rc1/rules_proto-6.0.0-rc1.tar.gz", 172*60517a1eSAndroid Build Coastguard Worker ) 173*60517a1eSAndroid Build Coastguard Worker 174*60517a1eSAndroid Build Coastguard Worker http_archive( 175*60517a1eSAndroid Build Coastguard Worker name = "com_google_protobuf", 176*60517a1eSAndroid Build Coastguard Worker sha256 = "616bb3536ac1fff3fb1a141450fa28b875e985712170ea7f1bfe5e5fc41e2cd8", 177*60517a1eSAndroid Build Coastguard Worker strip_prefix = "protobuf-24.4", 178*60517a1eSAndroid Build Coastguard Worker urls = [ 179*60517a1eSAndroid Build Coastguard Worker "https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protobuf-24.4.tar.gz", 180*60517a1eSAndroid Build Coastguard Worker ], 181*60517a1eSAndroid Build Coastguard Worker ) 182*60517a1eSAndroid Build Coastguard Worker 183*60517a1eSAndroid Build Coastguard Worker # Needed for stardoc 184*60517a1eSAndroid Build Coastguard Worker http_archive( 185*60517a1eSAndroid Build Coastguard Worker name = "rules_java", 186*60517a1eSAndroid Build Coastguard Worker urls = [ 187*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/rules_java/releases/download/6.3.0/rules_java-6.3.0.tar.gz", 188*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/rules_java/releases/download/6.3.0/rules_java-6.3.0.tar.gz", 189*60517a1eSAndroid Build Coastguard Worker ], 190*60517a1eSAndroid Build Coastguard Worker sha256 = "29ba147c583aaf5d211686029842c5278e12aaea86f66bd4a9eb5e525b7f2701", 191*60517a1eSAndroid Build Coastguard Worker ) 192*60517a1eSAndroid Build Coastguard Worker 193*60517a1eSAndroid Build Coastguard Worker RULES_JVM_EXTERNAL_TAG = "5.2" 194*60517a1eSAndroid Build Coastguard Worker RULES_JVM_EXTERNAL_SHA = "f86fd42a809e1871ca0aabe89db0d440451219c3ce46c58da240c7dcdc00125f" 195*60517a1eSAndroid Build Coastguard Worker http_archive( 196*60517a1eSAndroid Build Coastguard Worker name = "rules_jvm_external", 197*60517a1eSAndroid Build Coastguard Worker patch_args = ["-p1"], 198*60517a1eSAndroid Build Coastguard Worker patches = ["@io_bazel_stardoc//:rules_jvm_external.patch"], 199*60517a1eSAndroid Build Coastguard Worker strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, 200*60517a1eSAndroid Build Coastguard Worker sha256 = RULES_JVM_EXTERNAL_SHA, 201*60517a1eSAndroid Build Coastguard Worker url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (RULES_JVM_EXTERNAL_TAG, RULES_JVM_EXTERNAL_TAG), 202*60517a1eSAndroid Build Coastguard Worker ) 203*60517a1eSAndroid Build Coastguard Worker 204*60517a1eSAndroid Build Coastguard Worker http_archive( 205*60517a1eSAndroid Build Coastguard Worker name = "rules_license", 206*60517a1eSAndroid Build Coastguard Worker urls = [ 207*60517a1eSAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz", 208*60517a1eSAndroid Build Coastguard Worker "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz", 209*60517a1eSAndroid Build Coastguard Worker ], 210*60517a1eSAndroid Build Coastguard Worker sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360", 211*60517a1eSAndroid Build Coastguard Worker ) 212*60517a1eSAndroid Build Coastguard Worker 213*60517a1eSAndroid Build Coastguard Worker http_archive( 214*60517a1eSAndroid Build Coastguard Worker name = "bazel_features", 215*60517a1eSAndroid Build Coastguard Worker sha256 = "d7787da289a7fb497352211ad200ec9f698822a9e0757a4976fd9f713ff372b3", 216*60517a1eSAndroid Build Coastguard Worker strip_prefix = "bazel_features-1.9.1", 217*60517a1eSAndroid Build Coastguard Worker url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.9.1/bazel_features-v1.9.1.tar.gz", 218*60517a1eSAndroid Build Coastguard Worker ) 219*60517a1eSAndroid Build Coastguard Worker 220*60517a1eSAndroid Build Coastguard Worker http_archive( 221*60517a1eSAndroid Build Coastguard Worker name = "rules_cc", 222*60517a1eSAndroid Build Coastguard Worker sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf", 223*60517a1eSAndroid Build Coastguard Worker strip_prefix = "rules_cc-0.0.9", 224*60517a1eSAndroid Build Coastguard Worker urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"], 225*60517a1eSAndroid Build Coastguard Worker ) 226