aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-filelock/APKBUILD
blob: 69b5506ba4aafab5f5928846a436e7698e6bd3d3 (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
# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py-filelock
_pkgname=filelock
pkgver=3.0.12
pkgrel=0
pkgdesc="A platform independent file lock for Python"
url="https://github.com/benediktschmitt/py-filelock"
arch="noarch"
license="Unlicense"
depends=""
checkdepends="pytest"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 -m pytest -xvv test.py
	python3 -m pytest -xvv test.py
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="09b8b16c12a60044a259a5d644bc8066660871104a7f4cd431431173d475b9f15744adfb8d86ec8cda69f2a1b52bd14cb8a066d70fa5e49c449bc5ee702ec2a0  filelock-3.0.12.tar.gz"