summaryrefslogtreecommitdiff
path: root/python-pyfftw/PKGBUILD
blob: f9481196ddcf7430edad67833de764c47c0bdc10 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Antony Lee <anntzer dot lee at gmail dot com>

_pyname=pyFFTW
pkgname=("python-pyfftw" "python2-pyfftw")
pkgbase="python-pyfftw"
pkgver=0.11.1
pkgrel=1
pkgdesc='A pythonic wrapper around FFTW.'
url='http://hgomersall.github.io/pyFFTW/'
_deppy2=(
  'python2>=2.7'
  'python2<2.8'
)
_deppy=(
  'python>=3.7'
  'python<3.8'
)
_depends=(
  'python-numpy'
  'python-scipy'
  'fftw'
)
_makedepends=(
  'cython'
  'python-setuptools'
)
makedepends=(
  "${_deppy[@]}"
  "${_deppy2[@]}"
  "${_depends[@]}"
  "${_depends[@]/python-/python2-}"
  "${_makedepends[@]}"
  "${_makedepends[@]/ython/ython2}"
)
license=('BSD')
arch=('i686' 'x86_64')
source=("https://pypi.python.org/packages/fa/7f/e65fe8b9f1b66aab22c8d76c2f03180714a558fcef4a723263fa8f3754f8/pyFFTW-${pkgver}.tar.gz")
sha512sums=('2dab5d6c2c28731a096122ca7013c56469b8cd0509cb37abb7571290efc96925034e8c30833014c9f4d9db62234b4cb0e92cdc3b41880ac02bfa790370ee3f94')

build() {
  cd $srcdir/$_pyname-$pkgver
  python setup.py build_ext --inplace
  python setup.py test
}

package_python-pyfftw() {
  depends=(
    "${_deppy[@]}"
    "${_depends[@]}"
  )
  cd $srcdir/$_pyname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 
  install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_python2-pyfftw() {
  depends=(
    "${_deppy2[@]}"
    "${_depends[@]/python-/python2-}"
  )
  cd $srcdir/$_pyname-$pkgver
  python2 setup.py install --root="$pkgdir" --optimize=1 
  install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}