blob: 486396c169ab3f845d2f048ed0a4d07afcb2ff08 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: redponike <proton (dot) me>
# Maintainer: Alex Hirzel <alex at hirzel period us>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Butui Hu <hot123tea123@gmail.com>
pkgname=python-jsonargparse
_pkgname=${pkgname#python-}
pkgver=4.38.0
pkgrel=1
pkgdesc='Parsing library for CLI options, configs, and environment variables'
arch=('any')
url='https://github.com/omni-us/jsonargparse'
license=('MIT')
depends=('python-yaml')
optdepends=(
'python-docstring-parser'
'python-fsspec'
'python-jsonschema'
'python-omegaconf'
'python-ruyaml'
'python-toml'
)
makedepends=(
'python-build'
'python-installer'
'python-wheel'
'python-setuptools'
)
checkdepends=(
'python-pytest'
'python-pytest-subtests'
'python-attrs'
'python-argcomplete'
'python-pydantic'
'python-requests'
'python-shtab'
'python-responses'
)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('a73f2388f894fb2705eb06ec5fb424efe284330e35be5ad8356ac707810d4880')
build() {
cd "${_pkgname}-${pkgver}"
python -m build --wheel --no-isolation
}
check() {
cd "${_pkgname}-${pkgver}"
PYTHONPATH="jsonargparse_tests" pytest -vv
}
package() {
cd "${_pkgname}-${pkgver}"
PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl
local _site=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir/usr/share/licenses/$pkgname/"
ln -s "$_site/$_pkgname-$pkgver.dist-info/LICENSE.rst" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
|