[arch-commits] Commit in python-configobj/trunk (PKGBUILD)
Daniel M. Capella
polyzen at archlinux.org
Thu Dec 24 21:25:34 UTC 2020
Date: Thursday, December 24, 2020 @ 21:25:33
Author: polyzen
Revision: 788890
upgpkg: python-configobj 5.0.6.r110.g3e2f4cc-1: Fix pkgver and install shim
Fixes #69057
Modified:
python-configobj/trunk/PKGBUILD
----------+
PKGBUILD | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-12-24 21:25:22 UTC (rev 788889)
+++ PKGBUILD 2020-12-24 21:25:33 UTC (rev 788890)
@@ -4,8 +4,8 @@
# Contributor: Manuel C.
pkgname=python-configobj
-pkgver=5.0.6
-pkgrel=10
+pkgver=5.0.6.r110.g3e2f4cc
+pkgrel=1
pkgdesc='Simple config file reader and writer'
arch=(any)
url='https://github.com/DiffSK/configobj'
@@ -15,8 +15,21 @@
source=("git+$url#commit=3e2f4cca81b60171e6b3e23619f6f4929a13322e") # latest master, ref FS#68893
sha256sums=(SKIP)
+pkgver() {
+ cd configobj
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd configobj
+ # Avoid the need for a local configobj install just for VERSION
+ local _version=$(grep -oP "__version__ = '\K[^']+" src/configobj/_version.py)
+ sed -i "/from validate/d;s/VERSION/\"$_version\"/" setup_validate.py
+}
+
package() {
cd configobj
python setup.py install --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ python setup_validate.py install --root="$pkgdir" --optimize=1
}
More information about the arch-commits
mailing list