summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d447b7d1a9a84019ece631eb37f77d5bf43ca04b (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Jingbei Li <i@jingbei.li>
# Contributor: Francois Boulogne <fboulogne at april dot org>
_base=pywavelets
pkgname=python-${_base}
pkgver=1.7.0
pkgrel=1
pkgdesc="Wavelet transform module"
arch=(x86_64)
url="https://github.com/${_base}/${_base::3}t"
license=(MIT)
depends=(python-numpy)
makedepends=(python-build python-installer meson-python python-wheel cython)
# checkdepends=(python-pytest python-matplotlib python-scipy)
optdepends=('python-matplotlib: for plotting support'
  'python-scipy: for scipy.signal.cwt (FFT-based continuous wavelet transforms)')
source=(${_base::3}t-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha512sums=('b437d864efc78616d1dc3cf896a9b89eaa0900329d4c2cf78f9048e793f6600b34390f026b7a81e87d27833280a34607c87659403d768da53102215911fe4cdd')

build() {
  cd ${_base::3}t-${pkgver}
  python -m build --wheel --skip-dependency-check --no-isolation
}

# check() {
#   python -m venv --system-site-packages test-env
#   test-env/bin/python -m installer ${_base::3}t-${pkgver}/dist/*.whl
#   MPLBACKEND=Agg test-env/bin/python -m pytest --pyargs ${_base::3}t-${pkgver}/${_base::3}t/tests
# }

package() {
  cd ${_base::3}t-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}