summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD48
1 files changed, 30 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b808821235bb..b3b2fa80b260 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,42 @@
-# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
-pkgname=python-xmlformatter
-pkgver=0.2.4
-pkgrel=3
-pkgdesc="Provides formatting of XML documents"
+_distname=xmlformatter
+pkgname="python-${_distname}"
+pkgver=0.2.6
+pkgrel=1
+pkgdesc='CLI utility and Python library for formatting XML documents'
arch=('any')
-url="https://github.com/pamoller/xmlformatter"
+url="https://pypi.org/project/${_distname}"
+_repourl="https://github.com/pamoller/${_distname}"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
-source=("$pkgname-$pkgver.tar.gz::https://pypi.python.org/packages/source/x/xmlformatter/xmlformatter-$pkgver.tar.gz")
-sha256sums=('6d93c4bc04cffb1d4cf6eb9d9034018e9b264e4554269e7da67539ba4bff03f5')
+checkdepends=('python-pytest')
+provides=("${_distname}=${pkgver}")
+conflicts=("${_distname}")
+source=("${_distname}-${pkgver}.tar.gz::${_repourl}/archive/refs/tags/v${pkgver}.tar.gz")
+b2sums=('1403e3b320551b130d580964c378900bc91869b4b2209815eb51ce073a2fe818337c10f65bbb30efe2ee1a431f885168b4aed1462846eed34599ffbd84edbb69')
build() {
- cd "xmlformatter-$pkgver"
- python -m build --wheel --no-isolation
+ cd "${_distname}-$pkgver"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "${_distname}-$pkgver/test"
+ python test_xmlformatter.py
}
package() {
- cd "xmlformatter-$pkgver"
- PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
- install -Dm644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
- local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
- install -d "$pkgdir/usr/share/licenses/$pkgname/"
- ln -s \
- "$_site/xmlformatter-$pkgver.dist-info/LICENSE.txt" \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "${_distname}-$pkgver"
+ python -m installer --destdir="${pkgdir}/" dist/*.whl
+
+ install -Dm644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "${pkgdir}/usr/share/licenses/${pkgname}/"
+ ln -s \
+ "${_site}/${_distname}-${pkgver}.dist-info/LICENSE.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}