blob: 4cd9d75c26a73f4d5a60e8dfd76bbf5ca67c4f09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname='python-pyshortcuts'
_pkgname='pyshortcuts'
pkgver=1.7.1
pkgrel=2
pkgdesc='create desktop shortcuts to python scripts on Windows, Mac, or Linux'
arch=('any')
url='https://github.com/newville/pyshortcuts'
license=('MIT')
depends=(
'python>=3.8'
'python<3.9'
'python-six')
makedepends=(
'python-setuptools')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/newville/${_pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('14ab47a173f0af7c08cbd0596058717affcbc3a719df969f8c6010858194e0d0d2ebf0ba60a21a503903bdf94d7d095088a7b29a93fc7ff85192b810899aa0cf')
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py build
}
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
errors=$(
find "${pkgdir}/usr/lib"/python*/site-packages/pyshortcuts-*.egg-info -name 'requires.txt' -execdir cat {} \; \
| sed 's/^/python-/' \
| grep -vxF "$(printf '%s\n' "${depends[@]}")"
) || true
if [ -n "${errors}" ]; then
echo 'missing dependencies:'
printf '%s\n' "${errors}"
return 1
fi
rm -rf --one-file-system "${pkgdir}/usr/bin"
}
|