1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Morten Linderud <foxboron@archlinux.org>
3 # Contributor: Lance Chen <cyen0312@gmail.com>
9 pkgdesc="A built-package format for Python"
11 url="https://pypi.python.org/pypi/wheel"
13 depends=('python-packaging')
14 optdepends=('python-keyring: for wheel.signatures'
15 'python-xdg: for wheel.signatures')
16 makedepends=('python-setuptools' 'python-build' 'python-flit-core' 'python-installer')
17 checkdepends=('python-jsonschema' 'python-pytest' 'python-keyring' 'python-keyrings-alt'
18 'python-xdg' 'python-pytest-cov')
19 source=("$pkgname-$pkgver.tar.gz::https://github.com/pypa/wheel/archive/$pkgver.tar.gz")
20 sha512sums=('f23bddfb0c23c77d16b24d9c6b132b0272830c89ae63ac672f204af665863a38779c142a72a66a33c615c4b52450d433b4edcbd333de4e0d418b4fbe836de953')
24 # https://github.com/pypa/wheel/pull/365 but why?
25 rm -r src/wheel/vendored
26 sed -i 's/from .vendored.packaging.requirements import Requirement/from packaging.requirements import Requirement/' src/wheel/metadata.py
27 sed -i 's/from .vendored.packaging import tags/from packaging import tags/' src/wheel/bdist_wheel.py
28 sed -i 's/from .vendored.packaging import version as _packaging_version/from packaging import version as _packaging_version/' src/wheel/bdist_wheel.py
29 sed -i 's/from wheel.vendored.packaging import tags/from packaging import tags/' tests/test_bdist_wheel.py
34 python -m build --wheel --no-isolation
38 # Hack entry points by installing it
41 python -m installer --destdir="$PWD/tmp_install" dist/*.whl
42 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
43 PYTHONPATH="$PWD/tmp_install/$site_packages" pytest
48 python -m installer --destdir="$pkgdir" dist/*.whl
49 install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/