summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoretckeeper2022-07-02 10:04:10 +0200
committeretckeeper2022-07-02 10:04:10 +0200
commitc26954995ccb75a2c9f4254a346d871716ae7314 (patch)
tree9e0ffdc9b87e5dafc1444ad9ad4dc2ee2785d2d3 /PKGBUILD
parentcb4290980dfabaf1db39d6bafcf41d8f15dc5a63 (diff)
downloadaur-c26954995ccb75a2c9f4254a346d871716ae7314.tar.gz
version bump
updated dependencies added documentation building added check function
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 24 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b1fc4dd809cd..266b86f2be37 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,39 @@
# Maintainer: BrainDamage
pkgname="python-wfdb"
-_dirname='wfdb-python'
-pkgver=3.4.1
+pkgver=4.0.0
+_basename='wfdb-python'
+_dirname="${_basename}-${pkgver}"
pkgrel=1
pkgdesc="A library of tools for reading, writing, and processing WFDB signals and annotations"
arch=(any)
url="https://github.com/MIT-LCP/wfdb-python"
license=("MIT")
-depends=("python" "python-numpy" "python-scipy" "python-matplotlib" "python-nose" "python-pandas" "python-requests" "python-scikit-learn" "python-certifi" "python-chardet" "python-cycler" "python-idna" "python-joblib" "python-pyparsing" "python-dateutil" "python-pytz" "python-requests" "python-urllib3" "python-threadpoolctl")
-sha256sums=('1e90b7afc31e5f42db8c482cc4002e16188f1291c504575336fc1a2c73cc9025')
-source=("https://github.com/MIT-LCP/${_dirname}/archive/v${pkgver}.tar.gz")
+depends=("python" "python-numpy" "python-scipy" "python-matplotlib" "python-pandas" "python-requests" "python-soundfile")
+sha256sums=('06e5acfbde5aaa629a4c194ec29eee979b627d0ed711f0ed312b02f338a67a1a')
+source=("https://github.com/MIT-LCP/${_basename}/archive/v${pkgver}.tar.gz")
+makedepends=('python-build' 'python-installer' 'python-wheel' 'python-poetry' 'python-sphinx')
+checkdepends=('python-pytest' 'python-pytest-xdist' 'python-pylint' 'python-black')
build() {
- cd "${srcdir}/${_dirname}-${pkgver}"
- python setup.py build
+ cd "${srcdir}/${_dirname}"
+ export PYTHONHASHSEED=0
+ python -m build --wheel --no-isolation
+ cd docs
+ make html
}
package() {
- cd "${srcdir}/${_dirname}-${pkgver}"
- python setup.py install --optimize=1 --skip-build --root="${pkgdir}/" --prefix="/usr"
+ cd "${srcdir}/${_dirname}"
+ find dist -name '*.whl' -exec python -m installer --compile-bytecode 1 --destdir="${pkgdir}" {} \;
+ # not necessary for every package, but for those who it is, it'd generate conflict with others otherwise
+ rm -rf "${pkgdir}/$(python -c 'import site; print(site.getsitepackages()[0])')/tests/"
+ find docs/_build/html -type f -exec install -Dvm 644 {} -t "${pkgdir}/usr/share/doc/${_basename}/html" \;
+ find . -maxdepth 1 -iname 'README*' -exec install -Dvm 644 {} -t "${pkgdir}/usr/share/doc/${_basename}" \;
+ find . -maxdepth 1 -iname 'LICENSE*' -exec install -Dvm 644 {} -t "${pkgdir}/usr/share/licenses/${_basename}" \;
}
+check() {
+ cd "${srcdir}/${_dirname}"
+ pytest -n auto
+}