db-move: moved gnome-terminal from [staging] to [testing] (x86_64)
[arch-packages.git] / python-validate-pyproject / trunk / PKGBUILD
blobfbe104488be68ae20351c7eeff358ec966cd7f79
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-validate-pyproject
4 pkgver=0.12.2
5 _commit=2940279970c3de0992b3c44aff7dc19e6bb1043e
6 pkgrel=3
7 pkgdesc="Validation library and CLI tool for checking on 'pyproject.toml' files using JSON Schema"
8 url="https://github.com/abravalheri/validate-pyproject"
9 license=('MPL')
10 arch=('any')
11 depends=('python-fastjsonschema' 'python-packaging' 'python-trove-classifiers' 'python-tomli')
12 makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools-scm')
13 checkdepends=('python-pytest')
14 source=("git+https://github.com/abravalheri/validate-pyproject.git#commit=$_commit")
15 sha512sums=('SKIP')
17 prepare() {
18   cd validate-pyproject
19   sed -i '/--cov/d' setup.cfg
22 build() {
23   cd validate-pyproject
24   python -m build -wn
27 check() {
28   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
30   cd validate-pyproject
31   python -m installer --destdir=tmp_install dist/*.whl
32   PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH" pytest --doctest-modules --ignore src/validate_pyproject/_vendor src
33   # Deselected tests requiring a installed validate-pyproject
34   PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH" pytest --deselect tests/test_pre_compile.py --deselect tests/test_vendoring.py
37 package() {
38   cd validate-pyproject
39   python -m installer --destdir="$pkgdir" dist/*.whl