diff options
author | Erich Eckner <git@eckner.net> | 2018-02-23 10:02:01 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-23 10:02:01 +0100 |
commit | 4e01fe7c8cefa3032f6fac136af78957fc8da0cf (patch) | |
tree | cf7c2b944ad12f5def1b448b1fd1b50f28cd69b8 /python-lmfit/PKGBUILD | |
parent | b33d2366efd042c4aa2b420ec4aa504855cea6cc (diff) | |
download | archlinuxewe.git.save-4e01fe7c8cefa3032f6fac136af78957fc8da0cf.tar.xz |
python2-lmfit -> python-lmfit
Diffstat (limited to 'python-lmfit/PKGBUILD')
-rw-r--r-- | python-lmfit/PKGBUILD | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/python-lmfit/PKGBUILD b/python-lmfit/PKGBUILD new file mode 100644 index 00000000..54f41a40 --- /dev/null +++ b/python-lmfit/PKGBUILD @@ -0,0 +1,60 @@ +# 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.8 +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') +makedepends=( + "${_depends[@]}" "${_depends[@]/python/python2}" + 'python-setuptools' 'python2-setuptools' + ) +checkdepends=( + 'python-nose' 'python2-nose' + ) +source=("https://github.com/lmfit/lmfit-py/archive/${pkgver}.tar.gz" + 'test.patch') +sha512sums=('2a73acf1d2b700a5641f5393e079d56f7f43d3160a48fe0bce9beafbec0cce5e7954c4e2d343aadba1f832c0c816466f7be8ea94dab19a4a8ad82279419f1c68' + '779bbd1d71d7e15ce740fb3bdfaffb044912e1c2bc790732f9be101af2771c00ca00d21defd10fafd98694f42ffcaacff29e856060b27be1877a329a8a4449c7') + +prepare() { + cd "${srcdir}/lmfit-py-${pkgver}" + patch -p1 -i "${srcdir}/test.patch" + cd "${srcdir}" + 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: |