~dricottone/apkbuilds

ref: de512ca534b7f8c089f44eb2c60a82b4c7f87520 apkbuilds/src/py3-atpublic/APKBUILD -rw-r--r-- 1.2 KiB
de512ca5Dominic Ricottone sr.ht packages fix a month ago
                                                                                
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
# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-atpublic
_pyname=atpublic
pkgver=4.0
pkgrel=0
pkgdesc="@public for populating __all__"
url="https://gitlab.com/warsaw/public"
arch="noarch"
license="Apache-2.0"
makedepends="python3-dev py3-setuptools py3-build py3-installer py3-wheel py3-toml"
checkdepends="py3-sybil py3-pytest py3-pytest-cov"
_pypiprefix="${_pyname%${_pyname#?}}"
source="
	https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz
	pyproject.toml
"
replaces="py-atpublic"
builddir="$srcdir"/$_pyname-$pkgver

# Skip failing check
options="!check"

prepare() {
	default_prepare
	# Remove pdm garbage
	cp "$srcdir"/pyproject.toml "$builddir"
}

build() {
	python3 -m build --no-isolation --wheel
}

check() {
	export PYTHONPATH="$builddir"/src
	python3 -m pytest
}

package() {
	python3 -m installer -d"$pkgdir" dist/$_pyname-$pkgver-py3-none-any.whl
}

sha512sums="
2f338d3ae11d15e9ffe26881fab1c183154b9a0a7a66532a5eb39d1d48d41548078826875247c94f3853925bc1df2b8f86f4ed94533a8e58aa98de148cf5639c  atpublic-4.0.tar.gz
a937fb89a2868722edbbd3d99e823a7c4fa36c1f4b9a16bd0dcefba9a3c78f09e47d420f8600aff7ad77fb914b4a2e0ea5011bdef7697672d701b5602080c284  pyproject.toml
"