summaryrefslogtreecommitdiff
path: root/python-lmfit/PKGBUILD
blob: 80a157066b5420923a2f71264bda2b324abb5cf2 (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
# Contributor: Francois Boulogne <fboulogne at april dot org>
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgbase=python-lmfit
pkgname=('python-lmfit' 'python2-lmfit')
pkgver=0.9.9
pkgrel=2
pkgdesc="Least-Squares Minimization with Constraints for Python"
arch=('any')
url="http://lmfit.github.io/lmfit-py/"
license=('BSD')
_depends=('python' 'python-numpy' 'python-scipy' 'python-asteval')
_makedepends=('python-setuptools')
_checkdepends=('python-nose')
makedepends=(
  "${_depends[@]}" "${_depends[@]/python/python2}"
  "${_makedepends[@]}" "${_makedepends[@]/python/python2}"
  )
checkdepends=(
  "${_checkdepends[@]}" "${_checkdepends[@]/python/python2}"
  )
source=("https://github.com/lmfit/lmfit-py/archive/${pkgver}.tar.gz")
sha512sums=('71f59ce998f3244ba4c9361aba16a0118534f253984b03d979e4ddcf0d83f35cf00efa04704acbc1e81b26ea16443593923779a3b18778b7d7905a60ebc8d086')

prepare() {
  cp -a "lmfit-py-${pkgver}" "lmfit-py2-${pkgver}"
}

build() {
  cd "$srcdir/lmfit-py-$pkgver"
  python setup.py build
  
  cd "$srcdir/lmfit-py2-$pkgver"
  python2 setup.py build
}

check() {
  cd "$srcdir/lmfit-py-$pkgver"
  nosetests3 tests

  cd "$srcdir/lmfit-py2-$pkgver"
  nosetests2 tests
}

package_python-lmfit(){
  depends=("${_depends[@]}")
  cd "$srcdir/lmfit-py-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1
}

package_python2-lmfit(){
  depends=("${_depends[@]/python/python2}")
  cd "$srcdir/lmfit-py2-$pkgver"
  python2 setup.py install --root="$pkgdir/" --optimize=1
}

# vim:ts=2:sw=2:et: