Date: Monday, January 9, 2023 @ 18:29:35
Author: dvzrv
Revision: 1382148
upgpkg: python-pytoolconfig 1.2.2-4: Rebuild to fix build and test requirements.
Switch to python-pdm-pep517 as it is the actual build backend.
Fix an unsupported license-expression identifier in pyproject.toml.
Run tests in check().
Add optional dependencies.
Modified:
python-pytoolconfig/trunk/PKGBUILD
----------+
PKGBUILD | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-01-09 18:29:02 UTC (rev 1382147)
+++ PKGBUILD 2023-01-09 18:29:35 UTC (rev 1382148)
@@ -4,21 +4,41 @@
pkgname=python-pytoolconfig
_name=${pkgname#python-}
pkgver=1.2.2
-pkgrel=3
+pkgrel=4
pkgdesc="Manage configuration for python tools, such as black and rope."
arch=('any')
url="https://pypi.org/project/pytoolconfig/"
license=('LGPL3')
depends=('python' 'python-tomli' 'python-packaging')
-makedepends=('python-build' 'python-installer' 'python-wheel' 'python-pdm')
+makedepends=('python-build' 'python-installer' 'python-wheel'
'python-pdm-pep517')
+checkdepends=('python-docutils' 'python-pytest' 'python-sphinx'
'python-tabulate')
+optdepends=(
+ 'python-appdirs: for finding configuration dirs'
+ 'python-pydantic: for validation'
+ 'python-sphinx: for automatic documentation'
+ 'python-tabulate: for tables in documentation'
+)
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('2512a1f261a40e73cef2e58e786184261b60c802ae7ed01249342b1949ec3aa2')
+prepare() {
+ # fix unsupported identifier
+ sed -e 's/-expression//' -i "$_name-$pkgver/pyproject.toml"
+}
+
build() {
cd "$_name-$pkgver"
python -m build --wheel --no-isolation
}
+check() {
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+ cd "$_name-$pkgver"
+ python -m installer --destdir=test_dir dist/*.whl
+ export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+ pytest -vv
+}
+
package() {
cd "$_name-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl