diff options
author | Erich Eckner <git@eckner.net> | 2018-07-09 11:37:18 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-09 11:37:18 +0200 |
commit | b4d7daef0702be812f892d132aa113123eef483e (patch) | |
tree | 41645246601508af110ae43ed8ef7ce0d904813a /python-pyfai | |
parent | 097c0b63a5187f17922cbf8da5a28273a455b1b8 (diff) | |
download | archlinuxewe-b4d7daef0702be812f892d132aa113123eef483e.tar.xz |
python-fabio new
Diffstat (limited to 'python-pyfai')
-rw-r--r-- | python-pyfai/PKGBUILD | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/python-pyfai/PKGBUILD b/python-pyfai/PKGBUILD new file mode 100644 index 000000000..06b862cdc --- /dev/null +++ b/python-pyfai/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: Leonid B <leonid dot bloch at esrf dot fr> +# Upstream contact: silx at esrf dot fr +pkgbase=python-pyfai +pkgname=(python2-pyfai python-pyfai) +_pkgname=pyFAI +pkgver=0.15.0 +pkgrel=1 +pkgdesc="Fast Azimuthal Integration in Python." +arch=('i686' 'x86_64') +url="http://www.silx.org" +license=('GPLv3' 'BSD' 'MIT') +_depends=('python-numpy' 'python-scipy' 'python-matplotlib' 'python-fabio' + 'python-h5py' 'python-pyopencl' 'python-pyqt5' 'fftw' 'opencl-driver') +_makedepends=('cython') +_optdepends=() +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/silx-kit/pyFAI/archive/v${pkgver}.tar.gz") +sha256sums=('d72ae3b81ee4350e3768fd9ddc7a03ede4e33dbccddcba449cf1d563757c4726') + +makedepends=( + "${_depends[@]}" + "${_depends[@]//python/python2}" + "${_makedepends[@]}" + "${_makedepends[@]//ython/ython2}" +) + +prepare() { + cp -r "${_pkgname}-${pkgver}" "py2-${_pkgname}-${pkgver}" + mv "${_pkgname}-${pkgver}" "py-${_pkgname}-${pkgver}" +} + +build() { + cd "${srcdir}/py2-${_pkgname}-${pkgver}" + python2 setup.py build + + cd "${srcdir}/py-${_pkgname}-${pkgver}" + python setup.py build +} + +package_python2-pyfai() { + depends=( + "${_depends[@]//python/python2}" + ) + optdepends=( + "${_optdepends[@]//python/python2}" + ) + cd "${srcdir}/py2-${_pkgname}-${pkgver}" + python2 setup.py install --root="${pkgdir}/" --optimize=1 + install -D LICENSES.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D copyright "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT" + find "${pkgdir}/usr/bin" -maxdepth 1 -type f -printf '%f\n' | \ + while read -r f; do + mv "${pkgdir}/usr/bin/${f}" "${pkgdir}/usr/bin/python2-${f}" + sed -i '1 s/python/python2/' "${pkgdir}/usr/bin/python2-${f}" + done +} + +package_python-pyfai() { + depends=( + "${_depends[@]}" + ) + optdepends=( + "${_optdepends[@]}" + ) + cd "${srcdir}/py-${_pkgname}-${pkgver}" + python setup.py install --root="${pkgdir}/" --optimize=1 + install -D LICENSES.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D copyright "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT" +} |