blob: 71eaee9b4001777c066a77e0ea8eed012a7216b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_name=json_repair
pkgname=python-$_name
pkgver=0.46.2
pkgrel=1
pkgdesc="A python module to repair invalid JSON, commonly used to parse the output of LLMs"
arch=(any)
url=https://github.com/mangiucugna/json_repair
license=(MIT)
depends=(python)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
checkdepends=(python-pytest)
source=($_name-$pkgver.tar.gz::https://github.com/mangiucugna/$_name/archive/refs/tags/v$pkgver.tar.gz)
b2sums=('3d35ae4fe1c2ecf3b31f94fe8dd81639af7e7a7c7e7d7f41636241b59880a81bc77a79ea7d886e4b5e9aeeaeb3f8c728f167987f4e11229557c77216ae5456e5')
build() {
cd $_name-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd $_name-$pkgver
local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
python -m installer --destdir=../test_dir dist/*.whl
PYTHONPATH="$PWD/../test_dir/usr/lib/python$python_version/site-packages" pytest tests/test_json_repair.py
}
package() {
cd $_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|