summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 70ff060630820331a55f04d333dd5fc4d37c1ab2 (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
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
pkgname='python-ecos'
_module='ecos-python'
pkgver='2.0.8'
pkgrel=1
pkgdesc="Python interface for ECOS."
url="https://github.com/embotech/ecos-python"
depends=('python-numpy'
    'python-scipy'
    'ecos'
    'suitesparse')
makedepends=('python-setuptools')
checkdepends=('python-nose')
license=('GPL3')
arch=('x86_64')
source=("https://github.com/embotech/ecos-python/archive/${pkgver}.tar.gz"
    "use_external_ecos.patch")
sha256sums=('4715d97fa728c1446e2a68a3009f73325c79c509b25ad745d3756a397193d884'
            'c929cbe71cf8a109a66cbc681c6c501c42517b44e63f88440c36e5c7ca9e3be9')

prepare() {
    cd "${srcdir}/${_module}-${pkgver}"
    patch -p1 < ../use_external_ecos.patch
}    

build() {
    cd "${srcdir}/${_module}-${pkgver}"
    make version
    python setup.py build
}

check() {
    cd "${srcdir}/${_module}-${pkgver}"
    python setup.py build_ext --inplace
    nosetests
}

package() {
    cd "${srcdir}/${_module}-${pkgver}"
    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}