summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 591e7be2b1c73fae035e107f6b2a340e72a190e5 (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
# Maintainer: Clint Valentine <valentine.clint@gmail.com>

_name=nimfa
pkgbase='python-nimfa'
pkgname=('python-nimfa' 'python2-nimfa')
pkgver=1.3.4
pkgrel=1
pkgdesc="Nonnegative matrix factorization in Python"
arch=('any')
url=https://github.com/meowklaski/"${_name}"
license=('BSD')
makedepends=(
  'python' 'python-setuptools'
  'python2' 'python2-setuptools')
options=(!emptydirs)
source=("${pkgname}"-"${pkgver}".tar.gz::https://pypi.io/packages/source/"${_name:0:1}"/"${_name}"/"${_name}"-"${pkgver}".tar.gz)
sha256sums=('651376eba6b049fe270dc0d29d4b2abecb5e998c2013df6735a97875503e2ffe')

prepare() {
  cp -a nimfa-"${pkgver}"{,-py2}
}

package() {
  cd "${srcdir}"/nimfa-"${pkgver}"
  python setup.py install --root="${pkgdir}/" --optimize=1
}

build(){
  cd "${srcdir}"/nimfa-"${pkgver}"
  python setup.py build

  cd "${srcdir}"/nimfa-"${pkgver}"-py2
  python2 setup.py build
}

package_python2-nimfa() {
  depends=('python2' 'python2-numpy' 'python2-scipy')

  cd nimfa-"${pkgver}"-py2
  python2 setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
  install -Dm644 COPYING.txt "${pkgdir}"/usr/share/licenses/"${pkgname}"/COPYING.txt
}

package_python-nimfa() {
  depends=('python' 'python-numpy' 'python-scipy')

  cd nimfa-"${pkgver}"
  python setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
  install -Dm644 COPYING.txt "${pkgdir}"/usr/share/licenses/"${pkgname}"/COPYING.txt
}