[arch-commits] Commit in trash-cli/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Sun Jun 6 21:06:33 UTC 2021


    Date: Sunday, June 6, 2021 @ 21:06:33
  Author: eschwartz
Revision: 956341

upgpkg: trash-cli 0.21.5.25-1: upstream release

Modified:
  trash-cli/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-06 21:01:53 UTC (rev 956340)
+++ PKGBUILD	2021-06-06 21:06:33 UTC (rev 956341)
@@ -3,23 +3,27 @@
 # Contributor: Renato Garcia <fgarcia.renato at gmail.com>
 
 pkgname=trash-cli
-pkgver=0.17.1.14
-pkgrel=6
+pkgver=0.21.5.25
+pkgrel=1
 pkgdesc="Command line trashcan (recycle bin) interface"
 arch=('any')
 url="https://github.com/andreafrancia/${pkgname}"
 license=('GPL')
-depends=('python')
+depends=('python-psutil')
 makedepends=('python-setuptools')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
-        "0001-Use-py-bytes-to-interact-with-ctypes.patch::${url}/pull/115.patch")
-sha256sums=('8fdd20e5e9c55ea4e24677e602a06a94a93f1155f9970c55b25dede5e037b974'
-            '71c674d0c36fad172fd39c75052ac0de1a3f4739e13cffb8ed78148f11eda0a3')
+checkdepends=('python-pytest')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
+sha256sums=('1c26cbaa8daac275768c5f46c52d693af76050a6ee6d30b10a169059b61ee270')
 
 prepare() {
     cd "${srcdir}"/${pkgname}-${pkgver}
-    # https://github.com/andreafrancia/trash-cli/issues/95
-    patch -p1 -i ../0001-Use-py-bytes-to-interact-with-ctypes.patch
+
+    # don't depend on thirdparty copies of the stdlib
+    find tests -type f -name "*.py" -exec \
+        sed -i 's/^import mock$/from unittest import mock/;s/from mock /from unittest.mock /' {} +
+
+    # don't install dev tooling? https://github.com/andreafrancia/trash-cli/issues/205
+    rm trashcli/bump.py tests/test_bump.py
 }
 
 build() {
@@ -27,7 +31,14 @@
     python setup.py build
 }
 
+check() {
+    cd "${srcdir}"/${pkgname}-${pkgver}
+
+    python -m pytest
+}
+
 package(){
     cd "${srcdir}"/${pkgname}-${pkgver}
+
     python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
 }



More information about the arch-commits mailing list