blob: f990696675f2b84c369869492301924f072ef7c6 (
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
93
94
95
|
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgbase=python-postpic
pkgname=(python-postpic python2-postpic)
pkgver=0.3.1
pkgrel='2'
pkgdesc='The open source particle-in-cell post processor.'
url='https://github.com/skuschel/postpic'
arch=('i686' 'x86_64')
license=('GPL3')
_deppy2=(
'python2>=2.7'
'python2<2.8'
)
_deppy=(
'python>=3.7'
'python<3.8'
)
_depends=(
'python-matplotlib' 'python-numpy>=1.7' 'python-scipy' 'python-future' 'python-urllib3' 'python-numexpr'
)
_makedepends=(
'python-setuptools'
'cython'
'python-h5py'
)
_optdepends=(
'python-h5py: h5 reader for openPMD support'
'python-sdf: sdf support for EPOCH reader'
)
makedepends=(
"${_deppy[@]}"
"${_deppy2[@]}"
"${_depends[@]}"
"${_depends[@]/python/python2}"
"${_makedepends[@]}"
"${_makedepends[@]/ython/ython2}"
)
source=($pkgname-$pkgver.tar.gz::https://github.com/skuschel/postpic/archive/v$pkgver.tar.gz)
sha512sums=('0b1e2d80c7c8944b81da7c4b389c5d8190e856857acc56cd6c50545e15f7819182c2843e40a3cad5456406ad2d442b851cb6df732579d8e752cd09bc45e9cc79')
prepare() {
cp -a postpic-${pkgver}{,-py2}
}
build() {
msg2 "Building python..."
(cd postpic-${pkgver}
python setup.py build
)
msg2 "Building python2..."
(cd postpic-${pkgver}-py2
python2 setup.py build
)
}
check() {
msg2 "Checking python..."
(cd postpic-${pkgver}
python setup.py test
)
msg2 "Checking python2..."
(cd postpic-${pkgver}-py2
python2 setup.py test
)
}
package_python-postpic() {
depends=(
"${_deppy[@]}"
"${_depends[@]}"
)
optdepends=("${_optdepends[@]}")
cd postpic-${pkgver}
python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build
install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
#install -Dm 644 CHANGES README -t "${pkgdir}"/usr/share/doc/${pkgname}
}
package_python2-postpic() {
depends=(
"${_deppy2[@]}"
"${_depends[@]}"
"${_depends[@]/python/python2}"
)
optdepends=("${_optdepends[@]/python/python2}")
cd postpic-${pkgver}-py2
python2 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build
install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
#install -Dm 644 CHANGES README -t "${pkgdir}"/usr/share/doc/${pkgname}
}
# vim: ts=2 sw=2 et:
|