blob: acc3266db14fff46eb7c80d14410f9833bb320d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Aleksey Filippov <sarum9in@gmail.com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Thomas S Hatch <thatch45@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=python2-protobuf
pkgver=3.17.3
pkgrel=1
pkgdesc='Python 2 bindings for Google Protocol Buffers'
arch=('x86_64')
url='https://developers.google.com/protocol-buffers/'
license=('BSD')
depends=('gcc-libs'
'glibc'
'zlib'
'python2-six'
"protobuf=${pkgver}"
)
makedepends=('unzip'
'python2-setuptools'
)
source=("https://github.com/protocolbuffers/protobuf/releases/download/v${pkgver}/protobuf-all-${pkgver}.tar.gz")
sha512sums=('4a5e2ba080310492eb4fd8f6d89d46591254544f4fc1ef1b6a3a285aa12089e3124ff41994455b4b77e79eb1e993c68ec9c54e13a78052b9fb29b8cbf1dc67e1')
prepare() {
cd "protobuf-${pkgver}"
autoreconf -vfi
}
build() {
cd "protobuf-${pkgver}"
cd python
python2 setup.py build --cpp_implementation
}
check() {
cd "protobuf-${pkgver}"
cd python
python2 setup.py test
}
package() {
local python_version=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
cd "protobuf-${pkgver}"
(
cd python
PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}:PYTHONPATH" \
python2 setup.py install --skip-build \
--cpp_implementation \
--optimize=1 \
--root="${pkgdir}"
)
install -vDm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|