aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-tqdm/APKBUILD
blob: cff40a22d97fd0b9dfbfd665a7071d2644b0c1e7 (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-tqdm
_pkgname=tqdm
pkgver=4.56.1
pkgrel=0
pkgdesc="Fast, Extensible Progress Meter"
options="!check" # Broken on our current Python build due to setuptools version conflict
url="https://pypi.python.org/pypi/tqdm"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-tqdm" # Backwards compatibility
provides="py-tqdm=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
	case "$CARCH" in
		# FIXME: remove selected failing tests on selected arches
		aarch64) rm tests/tests_perf.py;;
		s390x) rm tests/tests_perf.py;;
		x86) rm tests/tests_synchronisation.py;;
	esac

	# Remove dep on py3-setuptools_scm
	sed -e "s|use_scm_version=True|version='$pkgver'|" \
		-i setup.py
	sed -e '/setuptools_scm/d' -i setup.cfg
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	mv "$pkgdir"/usr/bin/tqdm "$pkgdir"/usr/bin/tqdm-3

	mkdir -p "$pkgdir"/usr/bin
	ln -s tqdm-3 "$pkgdir"/usr/bin/tqdm
}

sha512sums="4b940bbf2fdd1093e1e0c50f17de7231dd58b0f04d9a8a97df4835f23e46b7b58f68e1ad96f77b191cae49e80498fd31ae67ff4fb4db821d90ec85bf83d48043  tqdm-4.56.1.tar.gz"