upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pytoolconfig / repos / community-any / PKGBUILD
blob576915d59ed21bbd7f6cd5ad62af01e086ebed44
1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
2 # Contributor: bonob <bonob at fastmail dot com>
4 pkgname=python-pytoolconfig
5 _name=${pkgname#python-}
6 pkgver=1.2.5
7 pkgrel=2
8 pkgdesc="Manage configuration for python tools, such as black and rope."
9 arch=('any')
10 url="https://pypi.org/project/pytoolconfig/"
11 license=('LGPL3')
12 depends=('python' 'python-packaging')
13 makedepends=('python-build' 'python-installer' 'python-wheel' 'python-pdm-pep517')
14 checkdepends=('python-docutils' 'python-pytest' 'python-sphinx' 'python-tabulate')
15 optdepends=(
16         'python-appdirs: for finding configuration dirs'
17         'python-pydantic: for validation'
18         'python-sphinx: for automatic documentation'
19         'python-tabulate: for tables in documentation'
21 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
22 sha256sums=('a50f9dfe23b03a9d40414c1fdf902fefbeae12f2ac75a3c8f915944d6ffac279')
24 prepare() {
25         # fix unsupported identifier
26         sed -e 's/-expression//' -i "$_name-$pkgver/pyproject.toml"
29 build() {
30         cd "$_name-$pkgver"
31         python -m build --wheel --no-isolation
34 check() {
35         local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
36         cd "$_name-$pkgver"
37         python -m installer --destdir=test_dir dist/*.whl
38         export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
39         pytest -vv
42 package() {
43         cd "$_name-$pkgver"
44         python -m installer --destdir="$pkgdir" dist/*.whl