summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf4fad0532f2464d1c1a39b330000731f4b19bf4 (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
# Contributor: Lex Black <autumn-wind@web.de>
# Contributor: Hector <hsearaDOTatDOTgmailDOTcom>

_name=numdifftools
pkgbase=python-numdifftools
pkgname=('python2-numdifftools' 'python-numdifftools')
pkgver=0.9.39
pkgrel=2
pkgdesc='suite of tools written in _Python to solve automatic numerical differentiation problems in one or more variables'
url='https://github.com/pbrod/numdifftools/'
license=("LGPL")
arch=('i686' 'x86_64')
makedepends=('python-setuptools' 'python-numpy' 'python-scipy' 'python-algopy' 'python-statsmodels')
makedepends+=('python2-setuptools' 'python2-numpy' 'python2-scipy' 'python2-algopy' 'python2-statsmodels')
options=('!libtool')
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha1sums=('336c470027eb0730e6cfec0db7710f690311b129')


prepare() {
  cp -a ${_name}-${pkgver} ${_name}-py2-${pkgver}
}

build() {
  cd "${_name}-py2-${pkgver}"
  python2 setup.py build

  cd "${_name}-${pkgver}"
  python setup.py build
}

package_python-numdifftools() {
  depends=('python-numpy' 'python-scipy' 'python-algopy' 'python-statsmodels')

  cd "${_name}-${pkgver}"
  python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build

  # Remove left over directories from distribute utils.
  find ${pkgdir} -type d -name "__pycache__" -exec rm -r {} \; -prune
}

package_python2-numdifftools() {
  depends=('python2-numpy' 'python2-scipy' 'python2-algopy' 'python2-statsmodels')

  cd "${_name}-py2-${pkgver}"
  python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build

  # Remove duplicated documentation
  rm -rf ${pkgdir}/usr/share

  # Remove left over directories from distribute utils.
  find ${pkgdir} -type d -name "__pycache__" -exec rm -r {} \; -prune
}