blob: af00550636b0c34baae3cb4334bba93d30d51639 (
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
|
# Maintainer: xiretza <xiretza+aur@xiretza.xyz>
_pkgname=pysat
pkgname="python-$_pkgname-git"
pkgver=0.1.6.dev6.r16.g58a7658
pkgrel=1
pkgdesc="A toolkit for SAT-based prototyping in Python"
arch=(x86_64)
url="https://github.com/pysathq/pysat"
license=('MIT')
depends=('python')
makedepends=('git' 'python-setuptools')
checkdepends=('python-pytest')
provides=("${pkgname%%-git}=$pkgver")
conflicts=("${pkgname%%-git}")
source=("git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$_pkgname"
python setup.py build
}
check() {
cd "$_pkgname"
local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
touch tests/__init__.py
PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" pytest
}
package() {
cd "$_pkgname"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|