1 # Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
5 pkgname=python-$_pkgname
8 pkgdesc='A simple, correct PEP 517 build frontend'
10 url='https://github.com/pypa/build'
12 depends=('python-packaging' 'python-pyproject-hooks')
13 optdepends=('python-virtualenv: Use virtualenv for build isolation')
14 makedepends=('git' 'python-build' 'python-flit-core' 'python-installer'
15 'python-sphinx' 'python-sphinx-argparse-cli' 'python-sphinx-autodoc-typehints' 'python-sphinx-furo')
16 checkdepends=('python-pytest' 'python-pytest-mock' 'python-pytest-rerunfailures' 'python-filelock' 'python-setuptools' 'python-toml' 'python-wheel')
17 source=("git+$url#tag=$pkgver?signed")
18 validpgpkeys=('3DCE51D60930EBA47858BA4146F633CBB0EB4BF2') # Filipe Laíns (FFY00) <lains@archlinux.org>
24 python -m build --wheel --skip-dependency-check --no-isolation
26 PYTHONPATH=src sphinx-build -b dirhtml -v docs docs/build/html
38 python -m installer --destdir="$pkgdir" dist/*.whl
40 install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
41 cp -r -a --no-preserve=ownership docs/build/html "$pkgdir"/usr/share/doc/$pkgname
42 rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
44 # Symlink license file
45 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
46 install -d "$pkgdir"/usr/share/licenses/$pkgname
47 ln -s "$site_packages"/$_pkgname-$pkgver.dist-info/LICENSE \
48 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE