summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0d93585d547655b9834496711ad151baa6868e4d (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
# Original maintainer: Miguel de Val-Borro <miguel dot deval at gmail dot com>
# Current maintainer: Corentin Cadiou <contact@cphyc.me>
_gitname=yt
pkgname=python-${_gitname}-git
pkgver=4.0.0.r2489.g7df628d03
pkgrel=3
pkgdesc="python package for data analysis and visualization"
url="http://yt-project.org"
arch=(any)
license=('BSD')
depends=(
    'python-cmyt'
    'python-ewah-bool-utils'
    'python-matplotlib'
    'python-more-itertools'
    'python-numpy'
    'python-pillow'
    'python-sympy'
    'python-tomli-w'
    'python-tqdm'
    'python-typing_extensions'
    'python-unyt'
)
makedepends=(
    'cython'
    'python-build'
    'python-installer'
    'python-wheel'
)
optdepends=(
    'jupyterlab: interactive analysis'
    'openmp: multithred support'
    'python-astropy: reading FITS files'
    'python-f90nml: reading RAMSES namelist files'
    'python-mpi4py: parallelism support'
    'python-netcdf4: read netCDF-backed datasets'
    'python-pandas: support downloading sample datasets '
    'python-pooch: support downloading sample datasets'
    'python-scipy: KDtree-accelerated spatial indexing'
    'python-xarray: input/output to xarray format'
    'python-glue: input/output to glueviz format'
)
source=("git+https://github.com/yt-project/yt")
provides=('python-yt')
conflicts=('python-yt')
md5sums=('SKIP')

prepare() {
    cd "${srcdir}/${_gitname}"
    git clean -dfx
}

build() {
  cd "${srcdir}/${_gitname}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${srcdir}/${_gitname}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -D -m644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

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