summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2023-07-11 21:26:24 -0500
committerCarlos Aznarán Laos2023-07-11 21:26:24 -0500
commitc994e9c6ee21764ea13bbc81cc1f5a8013ad5220 (patch)
tree06dc0c7f6fc5c9efe6cf10996a5494afb35c758e /PKGBUILD
parente4e7162d14196ee6de17550c781a670d77af2fc0 (diff)
downloadaur-python-matplotlib-label-lines.tar.gz
Drop python2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 18 insertions, 39 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fcd354e80e2c..6483231bdf72 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,24 @@
-# Maintainer: Håvard Pettersson <mail@haavard.me>
-
-_pkgname=matplotlib-label-lines
-pkgbase=python-$_pkgname
-pkgname=(python-$_pkgname python2-$_pkgname)
-pkgver=0.3.4
+# Contributor: Håvard Pettersson <mail@haavard.me>
+_base=matplotlib_label_lines
+pkgname=python-${_base//_/-}
+pkgver=0.6.0
pkgrel=1
-pkgdesc='Label lines with matplotlib.'
-url='https://github.com/cphyc/matplotlib-label-lines'
+pkgdesc="Label lines in matplotlib"
+url="https://github.com/cphyc/${_base//_/-}"
arch=(any)
license=(MIT)
-depends=(python-matplotlib python-numpy)
-makedepends=(python-setuptools python2-setuptools)
-source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
-sha256sums=('af8b8f00bedf25ce081698ac5b91342fe3cba821ab33466848a7ab411230d178')
-
-prepare() {
- cp -a $_pkgname-$pkgver $_pkgname-$pkgver-2
-}
-
-build_python-matplotlib-label-lines() {
- cd $_pkgname-$pkgver
- python setup.py build
-}
-
-build_python2-matplotlib-label-lines() {
- cd $_pkgname-$pkgver-2
- python2 setup.py build
+depends=(python-matplotlib python-more-itertools)
+makedepends=(python-build python-installer python-setuptools python-wheel)
+source=(https://pypi.org/packages/source/${_base::1}/${_base}/${_base}-${pkgver}.tar.gz)
+sha512sums=('af16901de94daa31c13d64479ef948cb0392b09ac7bc133f407a04986b620958889855ea0cf363f652ef1a1d1fb1eac7e5a7364ca45c55521e22868c09b635c1')
+
+build() {
+ cd ${_base}-${pkgver}
+ python -m build --wheel --skip-dependency-check --no-isolation
}
-package_python-matplotlib-label-lines() {
- cd $_pkgname-$pkgver
- python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+package() {
+ cd ${_base}-${pkgver}
+ PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
-
-package_python2-matplotlib-label-lines() {
- depends=(python2-matplotlib python2-numpy)
-
- cd $_pkgname-$pkgver-2
- python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-# vim:set ts=2 sw=2 et: