This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 292
/
Copy pathPKGBUILD
48 lines (41 loc) · 1.63 KB
/
PKGBUILD
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
# Maintainer: Felix Yan <[email protected]>
# Maintainer: Morten Linderud <[email protected]>
# Contributor: Lance Chen <[email protected]>
_pypiname=wheel
pkgname=python-wheel
pkgver=0.37.1
pkgrel=1
pkgdesc="A built-package format for Python"
arch=(any)
url="https://pypi.python.org/pypi/wheel"
license=('MIT')
depends=('python-packaging')
optdepends=('python-keyring: for wheel.signatures'
'python-xdg: for wheel.signatures')
makedepends=('python-setuptools')
checkdepends=('python-jsonschema' 'python-pytest' 'python-keyring' 'python-keyrings-alt'
'python-xdg' 'python-pytest-cov')
source=("$pkgname-$pkgver.tar.gz::https://github.com/pypa/wheel/archive/$pkgver.tar.gz")
sha512sums=('9493db2f29e16d17ca06a4d47854b3df5dfd17f21c77efd42befd54470858256fd59f56aa9585cbf0a09830927b657d546324f793e1b1153665bf0b74d0c0457')
prepare() {
# don't depend on python-coverage for tests
sed -i 's/--cov=wheel//' wheel-$pkgver/setup.cfg
# https://github.com/pypa/wheel/pull/365 but why?
rm -r wheel-$pkgver/src/wheel/vendored
sed -i 's/from .vendored.packaging import tags/from packaging import tags/' wheel-$pkgver/src/wheel/bdist_wheel.py
}
build() {
cd "$srcdir/wheel-$pkgver"
python setup.py build
}
check() {
# Hack entry points by installing it
cd wheel-$pkgver
python setup.py install --root="$PWD/tmp_install" --optimize=1
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH" py.test
}
package() {
cd "$srcdir/$_pypiname-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}