summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAsger Hautop Drewsen2024-04-04 00:06:00 +0200
committerAsger Hautop Drewsen2024-04-04 00:06:00 +0200
commitd49a1bdc49fbe861ba990009f82af9b96b2e48ea (patch)
tree460043f235515f01a4f5ce85b3b21d8178c9a51b /PKGBUILD
parent8178fffc2f72b96b6602f28cb14b1136be75130b (diff)
downloadaur-python-pylatexenc.tar.gz
Use PEP 517 conformant installation flow
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 11 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 28e4b3fe2924..3b1862d61045 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,30 @@
-# Maintainer: Asger Hautop Drewsen <asgerdrewsen@gmail.com>
-# PKGBUILD generated by pipman
-# Python package author: Philippe Faist <philippe.faist@bluewin.ch>
+# Maintainer: Asger Hautop Drewsen <asger@tyilo.com>
pkgname=python-pylatexenc
+_name=${pkgname#python-}
pkgver=2.10
-pkgrel=2
+pkgrel=3
pkgdesc="Python library for encoding unicode to latex and for parsing LaTeX to generate unicode text"
arch=(any)
url="https://github.com/phfaist/pylatexenc"
license=(MIT)
depends=(python)
-makedepends=(python-setuptools)
+makedepends=(python-build python-installer python-wheel python-setuptools)
+checkdepends=(python-pytest)
source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/phfaist/pylatexenc/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('bcb859affea00b5acb25aec780620170ab9d385c8f7dc266b7237ce9f47a59fd')
build() {
- cd "pylatexenc-${pkgver}"
- python setup.py build
+ cd $_name-$pkgver
+ python -m build --wheel --no-isolation
}
package() {
- cd "pylatexenc-${pkgver}"
- python setup.py install --root="$pkgdir" --optimize=1
+ cd $_name-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE.txt
}
check() {
- cd "pylatexenc-${pkgver}"
- python -m venv venv
- source venv/bin/activate
- python setup.py install
- cd test
- python -m unittest test_*.py
- deactivate
+ cd $_name-$pkgver
+ PYTHONPATH=. pytest
}