diff options
author | Konstantin Gizdov | 2017-11-04 18:40:09 +0000 |
---|---|---|
committer | Konstantin Gizdov | 2017-11-04 18:40:09 +0000 |
commit | 01203a652d7f7d43ce6144d04b2c88b6e0f23b6f (patch) | |
tree | 70f05bbdd00e99a56b57bdc6992147a53e436fcb | |
parent | 08516176ea5a4c55c6b482bd2e3d5f0bfe17acba (diff) | |
download | aur-01203a652d7f7d43ce6144d04b2c88b6e0f23b6f.tar.gz |
enable any architecture and safer build
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 50 |
2 files changed, 28 insertions, 27 deletions
@@ -1,10 +1,9 @@ pkgbase = python-hep_ml pkgdesc = Specific machine learning tools for purposes of high energy physics pkgver = 0.5.0 - pkgrel = 1 + pkgrel = 2 url = https://arogozhnikov.github.io/hep_ml/ - arch = i686 - arch = x86_64 + arch = any license = Apache makedepends = python2-scipy makedepends = python-scipy @@ -4,9 +4,9 @@ pkgbase=python-hep_ml _pkgbase=hep_ml pkgname=('python2-hep_ml' 'python-hep_ml') pkgver=0.5.0 -pkgrel=1 +pkgrel=2 pkgdesc="Specific machine learning tools for purposes of high energy physics" -arch=('i686' 'x86_64') +arch=('any') url="https://arogozhnikov.github.io/hep_ml/" license=('Apache') makedepends=('python2-scipy' 'python-scipy' 'python2-setuptools' 'python-setuptools' 'cython2' 'cython' @@ -17,47 +17,49 @@ source=("https://github.com/arogozhnikov/${_pkgbase}/archive/v${pkgver}.zip") sha256sums=('e5145fd84b6876941807bb80fde4ff2e38fd16fb76152b83da70338022074821') prepare() { - cd "$srcdir" - cp -a hep_ml-$pkgver hep_ml-py2-$pkgver - cd hep_ml-py2-$pkgver - - sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ - -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ - -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ - -i $(find . -name '*.py') + cd "${srcdir}" + cp -a "hep_ml-${pkgver}" "hep_ml-py2-${pkgver}" + cd "hep_ml-py2-${pkgver}" + + msg2 "Adjusting Python 2 shebangs..." + find . -name '*.py' -type f -exec \ + sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + -i '{}' \; -print } build() { - msg "Building Python2" - cd "$srcdir"/hep_ml-py2-$pkgver + msg2 "Building Python2" + cd "${srcdir}/hep_ml-py2-${pkgver}" python2 setup.py build - msg "Building Python3" - cd "$srcdir"/hep_ml-$pkgver + msg2 "Building Python3" + cd "${srcdir}/hep_ml-${pkgver}" python setup.py build } package_python2-hep_ml() { depends=('python2-scipy' 'python2-six' 'python2-pandas' 'python2-theano' 'python2-scikit-learn' 'python2-numpy') - cd "$srcdir"/hep_ml-py2-$pkgver + cd "${srcdir}/hep_ml-py2-${pkgver}" - python2 setup.py install --root="$pkgdir"/ --optimize=1 + python2 setup.py install --root="${pkgdir}/" --optimize=1 - install -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -d "$pkgdir"/usr/share/doc/$pkgname - cp -r docs "$pkgdir"/usr/share/doc/$pkgname/ + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/" } package_python-hep_ml() { depends=('python-scipy' 'python-six' 'python-pandas' 'python-theano' 'python-scikit-learn' 'python-numpy') - cd "$srcdir"/hep_ml-$pkgver + cd "${srcdir}/hep_ml-${pkgver}" - python setup.py install --root="$pkgdir"/ --optimize=1 + python setup.py install --root="${pkgdir}/" --optimize=1 - install -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" # See FS#49651 - install -d "$pkgdir"/usr/share/doc/$pkgname - cp -r docs "$pkgdir"/usr/share/doc/$pkgname/ + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/" } |