summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 07098362dacc01651058dd955fb48e49d68ef242 (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
63
64
65
66
# Maintainer: BigfootACA <bigfoot@classfun.cn>

_pyname=oslo.privsep
_pycname=${_pyname/./-}
pkgname=python-${_pycname}
pkgver=3.0.1
pkgrel=1
pkgdesc="OpenStack library for privilege separation"
arch=(any)
url="https://docs.openstack.org/oslo.privsep/latest/"
license=(Apache)
depends=(
	python
	python-pbr
	python-oslo-log
	python-oslo-i18n
	python-oslo-config
	python-oslo-utils
	python-cffi
	python-eventlet
	python-greenlet
	python-msgpack
)
makedepends=(
	python-setuptools
	python-openstackdocstheme
	python-sphinx
	python-reno
	python-sphinxcontrib-apidoc
)
checkdepends=(
	python-hacking
	python-oslotest
	python-fixtures
	python-stestr
	bandit
	python-pre-commit
)
options=('!emptydirs')
source=(https://pypi.io/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz)
md5sums=('96951be7cf8a90ad7a55ffac32fc1e88')
sha256sums=('c50977470b09a4016254dadc274837673604bd07b23b9d77a00769c47a0b05e4')
sha512sums=('fc373a6c8690545f8e8fb9a2d05e7ce8b25453f31b7f5cf7c851573b7492b7c333583c35ed08b6867af6e928759764dcb6a4cc733550b0fc1be0eab216e9bae3')

export PBR_VERSION=$pkgver

build(){
	cd $_pyname-$pkgver
	export PYTHONPATH="$PWD"
	python setup.py build
	sphinx-build -b text doc/source doc/build/text
}

check(){
	cd $_pyname-$pkgver
	stestr run
}

package(){
	cd $_pyname-$pkgver
	python setup.py install --root="$pkgdir/" --optimize=1
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	mkdir -p "$pkgdir/usr/share/doc"
	cp -r doc/build/text "$pkgdir/usr/share/doc/$pkgname"
	rm -r "$pkgdir/usr/share/doc/$pkgname/.doctrees"
}