1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
4 pkgname=python-tokenize-rt
7 pkgdesc='Wrapper around the stdlib `tokenize` which roundtrips'
9 url=https://github.com/asottile/tokenize-rt
12 makedepends=('python-build' 'python-installer' 'python-setuptools'
14 checkdepends=('python-pytest')
15 source=("$url/archive/v$pkgver/$_name-$pkgver.tar.gz")
16 b2sums=('d5e5dd3637615c451463d85e63b6d48670ed18de58e111625b106cfc0af2616726d2ff510412decd32db2c67dea5807d5f9b64ecfa902f56fd32b739085698c3')
20 python -m build --wheel --skip-dependency-check --no-isolation
25 python -m venv --system-site-packages test-env
26 test-env/bin/python -m installer dist/*.whl
27 test-env/bin/python -m pytest
32 python -m installer --destdir="$pkgdir" dist/*.whl
34 # Symlink license file
35 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
36 install -d "$pkgdir"/usr/share/licenses/$pkgname
37 ln -s "$site_packages"/tokenize_rt-$pkgver.dist-info/LICENSE \
38 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE