Date: Saturday, April 8, 2023 @ 12:38:47
Author: felixonmars
Revision: 1442339
archrelease: copy trunk to community-staging-any
Added:
trash-cli/repos/community-staging-any/
trash-cli/repos/community-staging-any/PKGBUILD
(from rev 1442337, trash-cli/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: trash-cli/repos/community-staging-any/PKGBUILD (from rev 1442337,
trash-cli/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-08 12:38:47 UTC (rev 1442339)
@@ -0,0 +1,51 @@
+# Maintainer: Alexander Epaneshnikov <[email protected]>
+# Contributor: Eli Schwartz <[email protected]>
+# Contributor: Pierre Neidhardt <[email protected]>
+# Contributor: Renato Garcia <[email protected]>
+
+pkgname=trash-cli
+pkgver=0.23.2.13.2
+pkgrel=2
+pkgdesc="Command line trashcan (recycle bin) interface"
+arch=('any')
+url="https://github.com/andreafrancia/trash-cli"
+license=('GPL')
+depends=('python-psutil' 'python-six')
+makedepends=('python-setuptools' 'python-shtab')
+checkdepends=('python-pytest' 'python-flexmock' 'python-parameterized')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
+sha256sums=('98123bedccd88a970d78f696b4211669593d21e1e2e64f86f9546bf680a29bf2')
+
+prepare() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ # 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 /;s/from mock.mock /from unittest.mock /' {} +
+}
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ python setup.py build
+ for cmd in trash-empty trash-list trash-restore trash-put trash; do
+ ./$cmd --print-completion bash > ./$cmd-completion
+ ./$cmd --print-completion zsh > ./_$cmd-completion
+ done
+}
+
+check() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ python -m pytest
+}
+
+package(){
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+ for cmd in trash-empty trash-list trash-restore trash-put trash; do
+ install -vDm 644 ./$cmd-completion
"$pkgdir/usr/share/bash-completion/completions/$cmd"
+ install -vDm 644 ./_$cmd-completion
"$pkgdir/usr/share/zsh/site-functions/_$cmd"
+ done
+}