Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorTasos Sahanidis <tasos@tasossah.com>2024-07-13 02:21:35 +0300
committerTasos Sahanidis <tasos@tasossah.com>2024-07-13 02:21:40 +0300
commit9ddc1799846ca531475a2b08ca9806f13afee6f8 (patch)
tree8855cad9ac3be008089e2b17f3789a3ac955e6ba /extra
parent165337a2c175b8eda9c7910c5d5557a61ce02a53 (diff)
extra/protobuf: Use PyPI source to avoid Bazel requirement
Diffstat (limited to 'extra')
-rw-r--r--extra/protobuf/PKGBUILD12
1 files changed, 12 insertions, 0 deletions
diff --git a/extra/protobuf/PKGBUILD b/extra/protobuf/PKGBUILD
index ca6fdb6b..2e8d65a8 100644
--- a/extra/protobuf/PKGBUILD
+++ b/extra/protobuf/PKGBUILD
@@ -12,3 +12,15 @@ if [ "$CARCH" = 'i486' ]; then
1i options=(!lto)
' PKGBUILD
fi
+
+# We need Bazel to build the python package from the git tree
+# Instead, download the source package from pypi and use that
+# See https://github.com/protocolbuffers/protobuf/pull/15708
+source+=("https://files.pythonhosted.org/packages/source/p/protobuf/protobuf-5.${pkgver}.tar.gz")
+sha512sums+=("SKIP")
+makedepends=(${makedepends[@]//bazel/})
+
+eval "$(
+ declare -f build | sed '/bazel build/d' | sed '$ d' | sed '$ a cd "../protobuf-5.${pkgver}"; python -m build --wheel --no-isolation ; }'
+ declare -f package_python-protobuf | sed 's@ \".*bazel-bin/python@ \"protobuf-5.${pkgver}\"@'
+)"