summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30d2b40607f7a44e69da2ee4fa578a8b3e8fc072 (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
# Maintainer: Adelmo Junior <noblehelm@gmail.com>
# Done while using both community:python-scikit-learn and AUR:python-keras as base, so credit goes to them
# If anything done wrong, please contact me

pkgbase="python-scikit-fuzzy"
pkgname=("python-scikit-fuzzy" "python2-scikit-fuzzy")
_pkgname="scikit-fuzzy"
pkgver="0.3.1"
pkgrel="1"
pkgdesc="A fuzzy logic toolkit for SciPy"
arch=('any')
url="https://github.com/scikit-fuzzy/scikit-fuzzy"
license=('custom')
makedepends=('python' 'python-setuptools' 'python-numpy' 'python-scipy' 'python-networkx' 'python2' 'python2-setuptools' 'python2-numpy' 'python2-scipy' 'python2-networkx')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('0c5f89f2c5602cb6ebd4f88217b3159ff3171819fb3c83f5e36cc675b71f174a')

prepare() {
  cd "$srcdir"
  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-py2-${pkgver}"
  cd "${_pkgname}-${pkgver}"
  sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
      -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
      -e "s|#![ ]*/bin/env python$|#!/bin/env python2|" \
      -i $(find . -name '*.py')
}

build() {
  msg "Building Python 2"
  cd "$srcdir/${_pkgname}-py2-${pkgver}"
  python2 setup.py build

  msg "Building Python 3"
  cd "$srcdir/${_pkgname}-${pkgver}"
  python setup.py build
}

package_python2-scikit-fuzzy() {
  depends=('python2' 'python2-numpy' 'python2-scipy' 'python2-networkx')
  cd "$srcdir/${_pkgname}-${pkgver}"
  python setup.py install --root="$pkgdir"/ --optimize=1
  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_python-scikit-fuzzy() {
  depends=('python' 'python-numpy' 'python-scipy' 'python-networkx')
  cd "$srcdir/${_pkgname}-${pkgver}"
  python setup.py install --root="$pkgdir"/ --optimize=1
  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

# vim:set ts=2 sw=2 et: