Date: Thursday, April 6, 2023 @ 15:04:24
Author: felixonmars
Revision: 1439383
archrelease: copy trunk to community-staging-any
Added:
python-tokenize-rt/repos/community-staging-any/
python-tokenize-rt/repos/community-staging-any/PKGBUILD
(from rev 1439381, python-tokenize-rt/trunk/PKGBUILD)
----------+
PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
Copied: python-tokenize-rt/repos/community-staging-any/PKGBUILD (from rev
1439381, python-tokenize-rt/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-06 15:04:24 UTC (rev 1439383)
@@ -0,0 +1,39 @@
+# Maintainer: Daniel M. Capella <[email protected]>
+
+_name=tokenize-rt
+pkgname=python-tokenize-rt
+pkgver=5.0.0
+pkgrel=2
+pkgdesc='Wrapper around the stdlib `tokenize` which roundtrips'
+arch=('any')
+url=https://github.com/asottile/tokenize-rt
+license=('MIT')
+depends=('python')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+ 'python-wheel')
+checkdepends=('python-pytest')
+source=("$url/archive/v$pkgver/$_name-$pkgver.tar.gz")
+b2sums=('d5e5dd3637615c451463d85e63b6d48670ed18de58e111625b106cfc0af2616726d2ff510412decd32db2c67dea5807d5f9b64ecfa902f56fd32b739085698c3')
+
+build() {
+ cd $_name-$pkgver
+ python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+ cd $_name-$pkgver
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer dist/*.whl
+ test-env/bin/python -m pytest
+}
+
+package() {
+ cd $_name-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # Symlink license file
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s "$site_packages"/tokenize_rt-$pkgver.dist-info/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}