Remove `upb_deps()` helper function

This separate helper for upb dependencies no longer makes sense now that upb
has been merged into the protobuf repo. This change deletes that helper and
moves the upb-specific dependencies into the `protobuf_deps()` function.

I noticed that the Python package deps need to be updated to reflect our
current support level, but I will fix that in a followup CL.

PiperOrigin-RevId: 568997625
pull/14172/head
Adam Cozzette 1 year ago committed by Copybara-Service
parent 7bd4744da6
commit 0d995193e5
  1. 4
      WORKSPACE
  2. 5
      bazel/BUILD
  3. 103
      bazel/workspace_deps.bzl
  4. 39
      protobuf_deps.bzl

@ -107,10 +107,6 @@ ruby_bundle(
gemfile = "//ruby:Gemfile",
)
load("//bazel:workspace_deps.bzl", "upb_deps")
upb_deps()
http_archive(
name = "lua",
build_file = "//bazel:lua.BUILD",

@ -14,11 +14,6 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
licenses(["notice"])
exports_files(
["workspace_deps.bzl"],
visibility = ["//upb/cmake:__pkg__"],
)
py_binary(
name = "amalgamate",
srcs = ["amalgamate.py"],

@ -1,103 +0,0 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("//bazel:python_downloads.bzl", "python_nuget_package", "python_source_archive")
def _github_archive(repo, commit, **kwargs):
repo_name = repo.split("/")[-1]
http_archive(
urls = [repo + "/archive/" + commit + ".zip"],
strip_prefix = repo_name + "-" + commit,
**kwargs
)
def upb_deps():
maybe(
_github_archive,
name = "com_google_absl",
repo = "https://github.com/abseil/abseil-cpp",
commit = "fb3621f4f897824c0dbe0615fa94543df6192f30", # Abseil LTS 20230802.1
sha256 = "aa768256d0567f626334fcbe722f564c40b281518fc8423e2708a308e5f983ea",
)
maybe(
_github_archive,
name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf",
commit = "f85a338d79f05938d1725fba3b2c603a8d06462e",
sha256 = "cd28ae63e40a146ec1a2d41e96f53e637aaa5d6c746e7120d013aafc65092882",
)
maybe(
_github_archive,
name = "utf8_range",
repo = "https://github.com/protocolbuffers/utf8_range",
commit = "de0b4a8ff9b5d4c98108bdfe723291a33c52c54f",
sha256 = "5da960e5e5d92394c809629a03af3c7709d2d3d0ca731dacb3a9fb4bf28f7702",
)
maybe(
http_archive,
name = "rules_pkg",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz",
],
sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2",
)
maybe(
_github_archive,
name = "rules_python",
repo = "https://github.com/bazelbuild/rules_python",
commit = "912a5051f51581784fd64094f6bdabf93f6d698f", # 0.14.0
sha256 = "a3e4b4ade7c4a52e757b16a16e94d0b2640333062180cba577d81fac087a501d",
)
maybe(
http_archive,
name = "bazel_skylib",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
],
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
)
#Python Downloads
python_source_archive(
name = "python-3.7.0",
sha256 = "85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d",
)
python_nuget_package(
name = "nuget_python_i686_3.7.0",
sha256 = "a8bb49fa1ca62ad55430fcafaca1b58015e22943e66b1a87d5e7cef2556c6a54",
)
python_nuget_package(
name = "nuget_python_x86-64_3.7.0",
sha256 = "66eb796a5bdb1e6787b8f655a1237a6b6964af2115b7627cf4f0032cf068b4b2",
)
python_nuget_package(
name = "nuget_python_i686_3.8.0",
sha256 = "87a6481f5eef30b42ac12c93f06f73bd0b8692f26313b76a6615d1641c4e7bca",
)
python_nuget_package(
name = "nuget_python_x86-64_3.8.0",
sha256 = "96c61321ce90dd053c8a04f305a5f6cc6d91350b862db34440e4a4f069b708a0",
)
python_nuget_package(
name = "nuget_python_i686_3.9.0",
sha256 = "229abecbe49dc08fe5709e0b31e70edfb3b88f23335ebfc2904c44f940fd59b6",
)
python_nuget_package(
name = "nuget_python_x86-64_3.9.0",
sha256 = "6af58a733e7dfbfcdd50d55788134393d6ffe7ab8270effbf724bdb786558832",
)
python_nuget_package(
name = "nuget_python_i686_3.10.0",
sha256 = "e115e102eb90ce160ab0ef7506b750a8d7ecc385bde0a496f02a54337a8bc333",
)
python_nuget_package(
name = "nuget_python_x86-64_3.10.0",
sha256 = "4474c83c25625d93e772e926f95f4cd398a0abbb52793625fa30f39af3d2cc00",
)

@ -1,6 +1,7 @@
"""Load dependencies needed to compile the protobuf library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//bazel:python_downloads.bzl", "python_nuget_package", "python_source_archive")
PROTOBUF_MAVEN_ARTIFACTS = [
"com.google.caliper:caliper:1.0-beta-3",
@ -147,3 +148,41 @@ def protobuf_deps():
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.8.1/rules_kotlin_release.tgz"],
sha256 = "a630cda9fdb4f56cf2dc20a4bf873765c41cf00e9379e8d59cd07b24730f4fde",
)
# Python Downloads
python_source_archive(
name = "python-3.7.0",
sha256 = "85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d",
)
python_nuget_package(
name = "nuget_python_i686_3.7.0",
sha256 = "a8bb49fa1ca62ad55430fcafaca1b58015e22943e66b1a87d5e7cef2556c6a54",
)
python_nuget_package(
name = "nuget_python_x86-64_3.7.0",
sha256 = "66eb796a5bdb1e6787b8f655a1237a6b6964af2115b7627cf4f0032cf068b4b2",
)
python_nuget_package(
name = "nuget_python_i686_3.8.0",
sha256 = "87a6481f5eef30b42ac12c93f06f73bd0b8692f26313b76a6615d1641c4e7bca",
)
python_nuget_package(
name = "nuget_python_x86-64_3.8.0",
sha256 = "96c61321ce90dd053c8a04f305a5f6cc6d91350b862db34440e4a4f069b708a0",
)
python_nuget_package(
name = "nuget_python_i686_3.9.0",
sha256 = "229abecbe49dc08fe5709e0b31e70edfb3b88f23335ebfc2904c44f940fd59b6",
)
python_nuget_package(
name = "nuget_python_x86-64_3.9.0",
sha256 = "6af58a733e7dfbfcdd50d55788134393d6ffe7ab8270effbf724bdb786558832",
)
python_nuget_package(
name = "nuget_python_i686_3.10.0",
sha256 = "e115e102eb90ce160ab0ef7506b750a8d7ecc385bde0a496f02a54337a8bc333",
)
python_nuget_package(
name = "nuget_python_x86-64_3.10.0",
sha256 = "4474c83c25625d93e772e926f95f4cd398a0abbb52793625fa30f39af3d2cc00",
)

Loading…
Cancel
Save