summaryrefslogtreecommitdiff
path: root/xraylarch/PKGBUILD
blob: 745cdcc9fd7fe98c58fd58bebc09985a5187e47e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname=xraylarch
pkgver=0.9.41
pkgrel=1
pkgdesc="Data Analysis Tools for X-ray Spectroscopy"
arch=('i686' 'x86_64')
url="http://xraypy.github.io/xraylarch/"
license=('BSD')
groups=()
depends=(
  'python2>=2.7'
  'python2<2.8'
  'python2-asteval>=0.9.12'
  'python2-backports.functools_lru_cache'
#  'python2-epics>=3.2.4'
  'python2-h5py>=2.4'
  'python2-lmfit>=0.9.11'
  'python2-matplotlib>=2.0'
  'python2-numpy>=1.10'
  'python2-peakutils>=1.0.0'
  'python2-pillow>=3.4'
  'python2-psutil'
  'python2-pyfai>=0.12.0'
  'python2-pyaml'
  'python2-pyshortcuts'
  'python2-requests>=2.1'
  'python2-scikit-learn>=0.18'
  'python2-scipy>=0.17'
  'python2-silx'
  'python2-six>=1.10'
  'python2-sqlalchemy>=1.1.5'
  'python2-termcolor'
  'python2-uncertainties>=3.0'
  'python2-wxpython3>=2.8.12'
  'python2-wxutils'
  'python2-wxmplot'
)
makedepends=()
checkdepends=(
  'python2-pytest'
)
optdepends=(
  'python2-CifFile:        needed for xrd modules'
  'python2-epics:          needed for using the EPICS control system'
  'python2-fabio:          needed for xrd modules'
  'python2-nose:           needed for testing tools'
  'python2-pyFAI:          needed for xrd modules'
  'python2-xrayutilities:  needed for xrd modules'
  'python2-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=('32a19b9f900ea4829fbb1632c4787f5ccad003baad5b4823dee155608f8ec96269a5bb3ad349d852d2dc3d5cac3c5e3d8eae8bc83cc0f3a322cf20cf1063e0e2')

prepare() {

  sed -i '
    /^\s*pyexe\s*=/ s/python/python2/
    s/^\s*setup(/_setup = \0/
    s/^\(\s*dest\s*=\s*\)\(\S.*\)$/\1_setup.get_command_obj('"'"'install'"'"').root + os.path.abspath(\2)/
  ' "${pkgname}-${pkgver}/setup.py"

}

build() {

  cd "${pkgname}-${pkgver}"
  sed "s|DEBUG = False|DEBUG = True|" -i setup.py
  python2 setup.py build

}

check() {

  cd "${pkgname}-${pkgver}"
  python2 setup.py check

}

package() {

  cd "${pkgname}-${pkgver}"
  python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
  sed 's| python$| python2|' -i "${pkgdir}/usr/bin/"*

}