summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhinoceros2022-11-23 16:15:07 +1100
committerRhinoceros2022-11-23 16:15:07 +1100
commit85bbcbcd1eda69c7990ba052d70dbd1d52ae786f (patch)
treec62ca88e2b1413b75821ee0bc5c78c977b9c645c
parent243292d299565e4fb272ecb70b74a9a413a23f31 (diff)
downloadaur-85bbcbcd1eda69c7990ba052d70dbd1d52ae786f.tar.gz
Re-upload
-rw-r--r--PKGBUILD51
1 files changed, 39 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 30280486ada0..9496ab21c063 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,61 @@
-# Maintainer : Johnathan Jenkins <twodopeshaggy@gmail.com>
+# Contributor: Alexander Epaneshnikov <alex19ep@archlinux.org>
+# Contributor: Eli Schwartz <eschwartz@archlinux.org>
+# Contributor: Pierre Neidhardt <ambrevar@gmail.com>
+# Contributor: Johnathan Jenkins <twodopeshaggy@gmail.com>
# Contributor: Trustin Lee <t@motd.kr>
# Contributor: Renato Garcia <fgarcia.renato@gmail.com>
pkgname=trash-cli-git
_pkgname=trash-cli
-pkgver=591.36ae6da
+pkgver=0.22.10.20.r52.g0b476b1
pkgrel=1
pkgdesc='Command line trashcan (recycle bin) interface'
arch=('any')
-url="http://github.com/andreafrancia/${_pkgname}"
+url="https://github.com/andreafrancia/${_pkgname}"
license=('GPL')
-depends=('python2')
-makedepends=('python2-setuptools')
+depends=('python-psutil' 'python-six')
+makedepends=('python-setuptools' 'python-shtab' 'git')
+checkdepends=('python-pytest' 'python-flexmock' 'python-parameterized')
provides=('trash-cli')
conflicts=('trash-cli')
source=("git+http://github.com/andreafrancia/${_pkgname}.git")
-md5sums=('SKIP')
+sha256sums=('SKIP')
pkgver() {
cd "${_pkgname}"
- echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${_pkgname}"
+
+ # 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 "${_pkgname}"
- python2 setup.py build
+ cd "${_pkgname}"
+
+ 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
}
-package(){
- cd "${_pkgname}"
- python2 setup.py install --root="${pkgdir}"
+check() {
+ cd "${_pkgname}"
+
+ python -m pytest
}
+package(){
+ cd "${_pkgname}"
+
+ 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
+}