# Contributor: Francois Boulogne # Maintainer: Erich Eckner pkgbase=python-lmfit pkgname=('python-lmfit' 'python2-lmfit') pkgver=0.9.10 pkgrel=1 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' 'python-uncertainties') 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=('066efe1970e36b756b6f0f3e23c5850f5308808c00417462d7140f588565f3337a14a729dfe0f89bc3b04b07e254e88f68e56adecae22d064031d4c8b70a8375') 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: