protobuf: add v4.24.3 (#40152)

This commit is contained in:
Adam J. Stewart 2023-09-23 13:04:10 -05:00 committed by GitHub
parent 25e45f9f07
commit d7e9a13f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View File

@ -14,6 +14,7 @@ class Protobuf(CMakePackage):
url = "https://github.com/protocolbuffers/protobuf/archive/v3.18.0.tar.gz"
maintainers("hyoklee")
version("3.24.3", sha256="2c23dee0bdbc36bd43ee457083f8f5560265d0815cc1c56033de3932843262fe")
version("3.23.3", sha256="5e4b555f72a7e3f143a7aff7262292500bb02c49b174351684bb70fc7f2a6d33")
version("3.22.2", sha256="2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc")
version("3.21.12", sha256="930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53")

View File

@ -17,10 +17,7 @@ class PyProtobuf(PythonPackage):
homepage = "https://developers.google.com/protocol-buffers/"
pypi = "protobuf/protobuf-3.11.0.tar.gz"
variant("cpp", default=True, when="@:4.21", description="Enable the cpp implementation")
# Newer versions seem to require bazel to build?
# https://github.com/protocolbuffers/protobuf/tree/main/python
version("4.24.3", sha256="12e9ad2ec079b833176d2921be2cb24281fa591f0b119b208b788adc48c2561d")
version("4.23.3", sha256="7a92beb30600332a52cdadbedb40d33fd7c8a0d7f549c440347bc606fb3fe34b")
version("4.21.9", sha256="61f21493d96d2a77f9ca84fefa105872550ab5ef71d21c458eb80edcf4885a99")
version("4.21.7", sha256="71d9dba03ed3432c878a801e2ea51e034b0ea01cf3a4344fb60166cb5f6c8757")
@ -62,20 +59,22 @@ class PyProtobuf(PythonPackage):
version("3.3.0", sha256="1cbcee2c45773f57cb6de7ee0eceb97f92b9b69c0178305509b162c0160c1f04")
version("3.0.0", sha256="ecc40bc30f1183b418fe0ec0c90bc3b53fa1707c4205ee278c6b90479e5b6ff5")
# newer versions support python 3.11+, but we need to switch to bazel
depends_on("python@:3.10", type=("build", "link", "run"))
variant("cpp", default=False, when="@:4.21", description="Enable the cpp implementation")
depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools", type=("build", "run"))
# in newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", when="@:4.21", type=("build", "run"))
depends_on("py-pip@:23.0", when="+cpp", type=("build", "run"))
depends_on("py-six@1.9:", when="@3.0:3.17", type=("build", "run"))
# Setup dependencies for protobuf to use the same minor version as py-protobuf
# Handle mapping the 4.x release to the protobuf 3.x releases
for ver in list(range(21, 24)):
depends_on("protobuf@3." + str(ver), when="+cpp @4." + str(ver))
depends_on("protobuf@3.21", when="+cpp @4.21")
# Handle the 3.x series releases
for ver in list(range(0, 21)):
depends_on("protobuf@3." + str(ver), when="+cpp @3." + str(ver))
depends_on(f"protobuf@3.{ver}", when=f"@3.{ver}+cpp")
conflicts("+cpp", when="^python@3.11:")
@property
def build_directory(self):

View File

@ -261,6 +261,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# https://github.com/protocolbuffers/protobuf/issues/10051
# https://github.com/tensorflow/tensorflow/issues/56266
depends_on("py-protobuf@:3.19", type=("build", "run"), when="@:2.11")
# Must be matching versions of py-protobuf and protobuf
conflicts("^py-protobuf~cpp")
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-six@1.12:", type=("build", "run"), when="@2.1:2.3,2.7:")
depends_on("py-six@1.15", type=("build", "run"), when="@2.4:2.6")