[arch-commits] Commit in python-gitdb/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Tue Aug 27 15:02:06 UTC 2019


    Date: Tuesday, August 27, 2019 @ 15:02:05
  Author: dvzrv
Revision: 503064

upgpkg: python-gitdb 2.0.5-2

Dropping python2 support. Adding (but disabling) tests and adding upstream ticket for them failing. Updating maintainer. Minor cleanups.

Modified:
  python-gitdb/trunk/PKGBUILD

----------+
 PKGBUILD |   62 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 32 insertions(+), 30 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-27 15:02:05 UTC (rev 503063)
+++ PKGBUILD	2019-08-27 15:02:05 UTC (rev 503064)
@@ -1,48 +1,50 @@
-# Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
-# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
+# Maintainer: David Runge <dave at sleepmap.de>
+# Contributor: NicoHood <archlinux {cat} nicohood {dog} de>
 # Contributor: Carl George < arch at cgtx dot us >
 
-_pkgname=python-gitdb
-_pypiname=gitdb2
-pkgbase=python-gitdb
+_name=gitdb2
 pkgdesc="A pure-Python git object database"
-pkgname=('python-gitdb' 'python2-gitdb')
+pkgname=python-gitdb
 pkgver=2.0.5
-pkgrel=1
+pkgrel=2
 url="https://github.com/gitpython-developers/gitdb"
 license=('BSD')
-arch=("any")
-makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
-source=("${_pkgname}-${pkgver}.tar.gz::https://pypi.org/packages/source/g/${_pypiname}/${_pypiname}-${pkgver}.tar.gz"
-        "${_pkgname}-${pkgver}.tar.gz.asc::https://pypi.org/packages/source/g/${_pypiname}/${_pypiname}-${pkgver}.tar.gz.asc")
+arch=('any')
+depends=('git' 'python-smmap')
+makedepends=('python-setuptools')
+checkdepends=('python-nose')
+source=("${pkgname}-${pkgver}.tar.gz::https://pypi.org/packages/source/g/${_name}/${_name}-${pkgver}.tar.gz"
+        "${pkgname}-${pkgver}.tar.gz.asc::https://pypi.org/packages/source/g/${_name}/${_name}-${pkgver}.tar.gz.asc")
 sha512sums=('a1d52529afa10d01ce96fc33ba7e78e36e841fca8041a416a873075cb0b11b8bdc0bcfaf787918962f3c4eb442ae938c9cd280f85cb3ce71e1c916816018ad10'
             'SKIP')
 validpgpkeys=('2CF6E0B51AAF73F09B1C21174D1DA68C88710E60') # Sebastian Thiel (In Rust I trust!) <byronimo at gmail.com>
 
 prepare() {
-    cp -a "${srcdir}/${_pypiname}-${pkgver}"{,-py2}
+  mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
 }
 
 build() {
-    cd "${srcdir}/${_pypiname}-${pkgver}"
-    python setup.py build
-
-    cd "${srcdir}/${_pypiname}-${pkgver}-py2"
-    python2 setup.py build
+  cd "${pkgname}-${pkgver}"
+  python setup.py build
 }
 
-package_python-gitdb() {
-    depends=('python' 'python-smmap>=2.0.0')
+# # tests fail due to test repo coupling with development environment
+# # https://github.com/gitpython-developers/gitdb/issues/51
+# check() {
+#   cd "${pkgname}-${pkgver}"
+#   local TEST_TMPDIR=$(mktemp -d)
+#   ( cd "$TEST_TMPDIR" && git init . )
+#   export GITDB_TEST_GIT_REPO_BASE="${TEST_TMPDIR}/.git"
+#   nosetests -vd
+# }
 
-    cd "${srcdir}/${_pypiname}-${pkgver}"
-    python setup.py install --skip-build --root="${pkgdir}" --optimize=1
-    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+package() {
+  cd "${pkgname}-${pkgver}"
+  python setup.py install --skip-build \
+                          --optimize=1 \
+                          --prefix=/usr \
+                          --root="${pkgdir}"
+  install -vDm 644 {AUTHORS,README.rst} \
+    -t "${pkgdir}/usr/share/doc/${pkgname}/"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
 }
-
-package_python2-gitdb() {
-    depends=('python2' 'python2-smmap>=2.0.0')
-
-    cd "${srcdir}/${_pypiname}-${pkgver}-py2"
-    python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
-    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}


More information about the arch-commits mailing list