summaryrefslogtreecommitdiff
path: root/python-peakutils/PKGBUILD
blob: 53336a4b05e6802e8d7e66eb5f43bbab80212b81 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Jakob Nixdorf <flocke@shadowice.org>

pkgbase=python-peakutils
pkgname=('python-peakutils' 'python2-peakutils')
_pkgname='PeakUtils'
pkgver=1.3.0
pkgrel=1
pkgdesc="Peak detection utilities for 1D data"
arch=('any')
url="https://pypi.python.org/pypi/PeakUtils"
license=('MIT')
_deppy2=(
  'python2>=2.7'
  'python2<2.8'
)
_deppy=(
  'python>=3.7'
  'python<3.8'
)
_depends=(
  'python-sphinx-better-theme')
_makedepends=(
  'python-setuptools')
makedepends=(
  "${_deppy[@]}"
  "${_deppy2[@]}"
  "${_depends[@]}"
  "${_depends[@]/python/python2}"
  "${_makedepends[@]}"
  "${_makedepends[@]/python/python2}"
)
source=("https://pypi.python.org/packages/cf/07/7bd0f10c2f35884fdb04affdb3c137a955d68c3840da86c896f4dcc9b6ee/${_pkgname}-${pkgver}.tar.gz")
sha512sums=('dd9d26dd2d0e41fe480a92f61d5b22f45adf2988e2078589369dfabf003e39dfd96e0308ce19f08d10bfeafab1e4fcf4478a58fdd4deebeefeff9a7a2108d009')

prepare() {
  cd "${srcdir}"

  cp -a "${_pkgname}-${pkgver}" "${pkgname[0]}"
  mv "${_pkgname}-${pkgver}" "${pkgname[1]}"
}

build() {
  cd "${srcdir}/${pkgname[0]}"
  python setup.py build

  cd "${srcdir}/${pkgname[1]}"
  python2 setup.py build
}

package_python-peakutils() {
  depends=(
    "${_deppy[@]}"
    "${_depends[@]}"
  )

  cd "${srcdir}/${pkgname[0]}"
  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
}

package_python2-peakutils() {
  depends=(
    "${_deppy2[@]}"
    "${_depends[@]/python/python2}"
  )

  cd "${srcdir}/${pkgname[1]}"
  python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
}