summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD25
2 files changed, 23 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 43e60fca9904..5d193b0eff71 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = python-logging-helper
pkgdesc = Provides enhancements to built-in logging module
pkgver = 1.9.0
- pkgrel = 2
+ pkgrel = 3
url = https://pypi.python.org/pypi/logging-helper
arch = any
license = MIT
checkdepends = python-testfixtures
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
- depends = python-better-exceptions>=0.1.6
- depends = python-logging_tree>=1.7
- depends = python-future>=0.16.0
+ makedepends = python-wheel
+ depends = python-better-exceptions
+ depends = python-logging_tree
+ depends = python-future
source = python-logging-helper-1.9.0.tar.gz::https://files.pythonhosted.org/packages/source/l/logging_helper/logging_helper-1.9.0.tar.gz
sha256sums = 03aaff3c4e6967f7a18d576acba1adf22c47d30df4d4bf9164514d046c818645
diff --git a/PKGBUILD b/PKGBUILD
index 84bf289ba5de..29b819b3af6c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,23 +2,25 @@
pkgname=python-logging-helper
pkgver=1.9.0
-pkgrel=2
+pkgrel=3
pkgdesc="Provides enhancements to built-in logging module"
url="https://pypi.python.org/pypi/logging-helper"
arch=('any')
license=('MIT')
-depends=(
- 'python-better-exceptions>=0.1.6'
- 'python-logging_tree>=1.7'
- 'python-future>=0.16.0')
-makedepends=('python-setuptools')
+depends=('python-better-exceptions' 'python-logging_tree' 'python-future')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-testfixtures')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/l/logging_helper/logging_helper-$pkgver.tar.gz")
sha256sums=('03aaff3c4e6967f7a18d576acba1adf22c47d30df4d4bf9164514d046c818645')
+prepare() {
+ cd "logging_helper-$pkgver"
+ sed -i '/packages=/s/()/(exclude=["*unittests*"])/' setup.py
+}
+
build() {
cd "logging_helper-$pkgver"
- python setup.py build
+ python -m build --wheel --no-isolation
}
check() {
@@ -28,6 +30,11 @@ check() {
package() {
cd "logging_helper-$pkgver"
- PYTHONHASHSEED=0 python setup.py install --root=${pkgdir} --optimize=1 --skip-build
- install -Dm 644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
+
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s \
+ "$_site/logging_helper-$pkgver.dist-info/LICENSE.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}