projects/aports·blob master · refs

61 lines · 1.4 KiB

1# Contributor: Celeste <[email protected]>
2# Maintainer: Wen Heping <[email protected]>
3pkgname=lastversion
4pkgver=3.6.12
5pkgrel=0
6pkgdesc="CLI tool to find the latest stable version of a project"
7url="https://lastversion.getpagespeed.com/"
8arch="noarch"
9license="BSD-2-Clause"
10depends="
11 py3-appdirs
12 py3-beautifulsoup4
13 py3-cachecontrol
14 py3-dateutil
15 py3-distro
16 py3-feedparser
17 py3-filelock
18 py3-packaging
19 py3-requests
20 py3-tqdm
21 py3-urllib3
22 py3-yaml
23 "
24makedepends="
25 py3-gpep517
26 py3-setuptools
27 py3-wheel
28 "
29checkdepends="py3-pytest"
30options="net" # tests require network access
31subpackages="$pkgname-pyc"
32source="https://github.com/dvershinin/lastversion/archive/v$pkgver/lastversion-$pkgver.tar.gz"
33
34build() {
35 gpep517 build-wheel \
36 --wheel-dir .dist \
37 --output-fd 3 3>&1 >&2
38}
39
40check() {
41 python3 -m venv --clear --without-pip --system-site-packages .testenv
42 .testenv/bin/python3 -m installer .dist/*.whl
43
44 # Running the ignored tests will exceed Github's
45 # API rate limit for unauthenticated requests
46 PATH="$builddir/.testenv/bin:$PATH" \
47 .testenv/bin/python3 -m pytest \
48 --ignore tests/test_cli.py \
49 --ignore tests/test_github.py \
50 --ignore tests/test_hg.py \
51 --ignore tests/test_lastversion.py
52}
53
54package() {
55 python3 -m installer -d "$pkgdir" \
56 .dist/*.whl
57}
58
59sha512sums="
60a65e2089a4416d2449026e9b5e15cad6a083162754bb5edc56f6130ceeb9dfef0b733e8b3446d321775fc88f0b410b828ef86bb4852d34c6ae64b7de206080fa lastversion-3.6.12.tar.gz
61"