summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1da075d48a643d3e95e22c81985f40cd6187f362 (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: Dylan Delgado <dylan1496 at live dot com>
# Based on the python-scipy PKGBUILD

_name=scipy
pkgname=python-scipy-git
pkgver=v0.17pre.r14548.gf71fe40cdc
pkgrel=1
pkgdesc="SciPy is open-source software for mathematics, science and engineering. Git version"
arch=('x86_64')
url="https://www.scipy.org/"
license=(BSD)
conflicts=(python-scipy)
provides=(python-scipy scipy)
depends=(python-numpy)
makedepends=(gcc-fortran python-setuptools pybind11 python-pythran cython)
checkdepends=(python-pytest)
optdepends=('python-pillow: Image saving module')
source=("git+https://github.com/scipy/scipy.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_name"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd scipy
  git submodule update --init
  cd tools
  touch __init__.py
  cd ..
  python setup.py config_fc build
}

check() {
  cd scipy
  python setup.py config_fc install \
    --prefix=/usr --root="$srcdir"/test --optimize=1
  export PYTHONPATH="$srcdir"/test/usr/lib/python3.10/site-packages
  cd ..
  python -c "from scipy import test; test('full')"
}

package() {
  cd scipy
  python3 setup.py config_fc install \
    --prefix=/usr --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
}