| 1 |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 2 |
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") |
| 3 |
load("//bazel:python_downloads.bzl", "python_nuget_package", "python_source_archive") |
| 4 |
load("//bazel:system_python.bzl", "system_python") |
| 5 |
|
| 6 |
def _github_archive(repo, commit, **kwargs): |
| 7 |
repo_name = repo.split("/")[-1] |
| 8 |
http_archive( |
| 9 |
urls = [repo + "/archive/" + commit + ".zip"], |
| 10 |
strip_prefix = repo_name + "-" + commit, |
| 11 |
**kwargs |
| 12 |
) |
| 13 |
|
| 14 |
def upb_deps(): |
| 15 |
maybe( |
| 16 |
http_archive, |
| 17 |
name = "com_google_absl", |
| 18 |
url = "https://github.com/abseil/abseil-cpp/archive/b9b925341f9e90f5e7aa0cf23f036c29c7e454eb.zip", |
| 19 |
strip_prefix = "abseil-cpp-b9b925341f9e90f5e7aa0cf23f036c29c7e454eb", |
| 20 |
sha256 = "bb2a0b57c92b6666e8acb00f4cbbfce6ddb87e83625fb851b0e78db581340617", |
| 21 |
) |
| 22 |
|
| 23 |
maybe( |
| 24 |
_github_archive, |
| 25 |
name = "com_google_protobuf", |
| 26 |
repo = "https://github.com/protocolbuffers/protobuf", |
| 27 |
commit = "14803e6f63d4785ecd95adeeae3ac42a728b3857", |
| 28 |
patches = ["//bazel:protobuf.patch"], |
| 29 |
) |
| 30 |
|
| 31 |
rules_python_version = "740825b7f74930c62f44af95c9a4c1bd428d2c53" # Latest @ 2021-06-23 |
| 32 |
|
| 33 |
maybe( |
| 34 |
http_archive, |
| 35 |
name = "rules_python", |
| 36 |
strip_prefix = "rules_python-{}".format(rules_python_version), |
| 37 |
url = "https://github.com/bazelbuild/rules_python/archive/{}.zip".format(rules_python_version), |
| 38 |
sha256 = "09a3c4791c61b62c2cbc5b2cbea4ccc32487b38c7a2cc8f87a794d7a659cc742", |
| 39 |
) |
| 40 |
|
| 41 |
maybe( |
| 42 |
http_archive, |
| 43 |
name = "bazel_skylib", |
| 44 |
strip_prefix = "bazel-skylib-main", |
| 45 |
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/main.tar.gz"], |
| 46 |
) |
| 47 |
|
| 48 |
system_python( |
| 49 |
name = "system_python", |
| 50 |
) |
| 51 |
|
| 52 |
#Python Downloads |
| 53 |
|
| 54 |
python_source_archive( |
| 55 |
name = "python-3.7.0", |
| 56 |
sha256 = "85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d", |
| 57 |
) |
| 58 |
python_nuget_package( |
| 59 |
name = "nuget_python_i686_3.7.0", |
| 60 |
sha256 = "a8bb49fa1ca62ad55430fcafaca1b58015e22943e66b1a87d5e7cef2556c6a54", |
| 61 |
) |
| 62 |
python_nuget_package( |
| 63 |
name = "nuget_python_x86-64_3.7.0", |
| 64 |
sha256 = "66eb796a5bdb1e6787b8f655a1237a6b6964af2115b7627cf4f0032cf068b4b2", |
| 65 |
) |
| 66 |
python_nuget_package( |
| 67 |
name = "nuget_python_i686_3.8.0", |
| 68 |
sha256 = "87a6481f5eef30b42ac12c93f06f73bd0b8692f26313b76a6615d1641c4e7bca", |
| 69 |
) |
| 70 |
python_nuget_package( |
| 71 |
name = "nuget_python_x86-64_3.8.0", |
| 72 |
sha256 = "96c61321ce90dd053c8a04f305a5f6cc6d91350b862db34440e4a4f069b708a0", |
| 73 |
) |
| 74 |
python_nuget_package( |
| 75 |
name = "nuget_python_i686_3.9.0", |
| 76 |
sha256 = "229abecbe49dc08fe5709e0b31e70edfb3b88f23335ebfc2904c44f940fd59b6", |
| 77 |
) |
| 78 |
python_nuget_package( |
| 79 |
name = "nuget_python_x86-64_3.9.0", |
| 80 |
sha256 = "6af58a733e7dfbfcdd50d55788134393d6ffe7ab8270effbf724bdb786558832", |
| 81 |
) |
| 82 |
python_nuget_package( |
| 83 |
name = "nuget_python_i686_3.10.0", |
| 84 |
sha256 = "e115e102eb90ce160ab0ef7506b750a8d7ecc385bde0a496f02a54337a8bc333", |
| 85 |
) |
| 86 |
python_nuget_package( |
| 87 |
name = "nuget_python_x86-64_3.10.0", |
| 88 |
sha256 = "4474c83c25625d93e772e926f95f4cd398a0abbb52793625fa30f39af3d2cc00", |
| 89 |
) |