summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMaximilian Stahlberg2021-01-30 12:04:14 +0100
committerMaximilian Stahlberg2021-01-30 12:07:52 +0100
commit8f3b7105ff52a697d3d3acc18b71ed8894b01eeb (patch)
tree5201273b3ccca9b2262e85d24cb11827df42c03a /PKGBUILD
parentc28be6a2c496a014dc9bbd5ab0298f75c47c9fc0 (diff)
downloadaur-8f3b7105ff52a697d3d3acc18b71ed8894b01eeb.tar.gz
Use a build/check/package flow.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD21
1 files changed, 15 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fd2845500f9..e9a573b037d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=python-picos
pkgver=2.1
-pkgrel=1
+pkgrel=2
pkgdesc='A Python interface to conic optimization solvers.'
arch=('any')
url='https://gitlab.com/picos-api/picos'
@@ -21,16 +21,25 @@ makedepends=('python-setuptools')
conflicts=('python-picos-git')
source=("https://gitlab.com/picos-api/picos/-/archive/v${pkgver}/picos-v${pkgver}.tar.gz"
"https://gitlab.com/picos-api/picos/-/raw/bb51b369/setup.py")
+md5sums=('41ce633ae2afe1bf63753d519f75ec9e'
+ '65309df6473e3a9b641da9744d51bdd1')
prepare() {
# Work around a bug in setup.py that's fixed in version 2.1.1.
- mv "${srcdir}/setup.py" "${srcdir}/picos-v${pkgver}/"
+ ln -sfr "${srcdir}/setup.py" "${srcdir}/picos-v${pkgver}/"
}
-package() {
+build() {
cd "${srcdir}/picos-v${pkgver}"
- python setup.py install --root=${pkgdir}
+ python setup.py build
}
-md5sums=('41ce633ae2afe1bf63753d519f75ec9e'
- '65309df6473e3a9b641da9744d51bdd1')
+check() {
+ cd "${srcdir}/picos-v${pkgver}/build/lib"
+ python -BIc "import picos"
+}
+
+package() {
+ cd "${srcdir}/picos-v${pkgver}"
+ python setup.py install --root=${pkgdir} --optimize=1 --skip-build
+}