upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-executing / trunk / PKGBUILD
blobe7f92ec597b3f103142ac2df7735f21780866f42
1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 _name=executing
4 pkgname=python-executing
5 pkgver=1.2.0
6 pkgrel=3
7 pkgdesc='Get the currently executing AST node of a frame, and other information'
8 arch=('any')
9 url=https://github.com/alexmojaki/executing
10 license=('MIT')
11 depends=('python')
12 makedepends=('python-build' 'python-installer' 'python-setuptools-scm'
13              'python-wheel')
14 checkdepends=('python-asttokens' 'python-littleutils' 'python-pytest')
15 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
16 sha256sums=('19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107')
17 b2sums=('662048e98a1eb3128dd57bbd61a8b7d7fb90dcf5adabc532c69f9ecce2a8ca73cf496ce7ba9b19c94d40083be1382b59dd673b36840e004a7cd0add888292ada')
19 build() {
20   cd "$_name-$pkgver"
21   python -m build --wheel --skip-dependency-check --no-isolation
24 check() {
25   cd "$_name-$pkgver"
26   python -m venv --system-site-packages test-env
27   test-env/bin/python -m installer dist/*.whl
28   test-env/bin/python tests/test_main.py
29   test-env/bin/python -m pytest tests/test_pytest.py
32 package() {
33   cd "$_name-$pkgver"
34   python -m installer --destdir="$pkgdir" dist/*.whl
36   # Symlink license file
37   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
38   install -d "$pkgdir"/usr/share/licenses/$pkgname
39   ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE.txt \
40     "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt