# Maintainer: Erich Eckner pkgname=xraylarch pkgver=0.9.44 pkgrel=2 pkgdesc="Data Analysis Tools for X-ray Spectroscopy" arch=('i686' 'pentium4' 'x86_64') url="http://xraypy.github.io/xraylarch/" license=('BSD') groups=() depends=( 'python>=3.7' 'python<3.8' 'python-asteval>=0.9.12' 'python-h5py>=2.4' 'python-lmfit>=0.9.11' 'python-matplotlib>=2.0' 'python-numpy>=1.10' 'python-peakutils>=1.0.0' 'python-pillow>=3.4' 'python-psutil' 'python-pyepics>=3.2.4' 'python-pyfai>=0.12.0' 'python-pyaml' 'python-pyshortcuts' 'python-requests>=2.1' 'python-scikit-learn>=0.18' 'python-scipy>=0.17' 'python-silx' 'python-six>=1.10' 'python-sqlalchemy>=1.1.5' 'python-termcolor' 'python-uncertainties>=3.0' 'python-wxpython>=2.8.12' 'python-wxutils' 'python-wxmplot' ) makedepends=() checkdepends=( 'python-pytest' ) optdepends=( 'python-CifFile: needed for xrd modules' 'python-epics: needed for using the EPICS control system' 'python-fabio: needed for xrd modules' 'python-nose: needed for testing tools' 'python-pyFAI: needed for xrd modules' 'python-xrayutilities: needed for xrd modules' 'python-yaml: needed for graphics and plotting' ) provides=() conflicts=() replaces=() backup=() options=() source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/xraypy/${pkgname}/archive/${pkgver}.tar.gz" ) sha512sums=('f6d7370cb598667c5fac46ea9f62e6e80ee2e559c02688a3fc6e7e2fb97be2ccba589137d2a7c3c96e7cd267f719056208359c60061baaf197dbcf816727fc83') prepare() { sed -i ' s/^\s*setup(/_setup = \0/ s/^\(\s*dest\s*=\s*\)\(\S.*\)$/\1_setup.get_command_obj('"'"'install'"'"').root + os.path.abspath(\2)/ /subprocess\.check_call/ { N; d; } ' "${pkgname}-${pkgver}/setup.py" if [ "${CARCH}" = 'i686' ] || [ "${CARCH}" = 'pentium4' ]; then sed -i ' /^\s*compiled_exes\s*=\s*(/,/)/ { s/(.*/(/ t s/.*)/)/ t d } ' "${pkgname}-${pkgver}/setup.py" fi } build() { cd "${pkgname}-${pkgver}" sed "s|DEBUG = False|DEBUG = True|" -i setup.py python setup.py build } check() { cd "${pkgname}-${pkgver}" python setup.py check } package() { cd "${pkgname}-${pkgver}" python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr }