summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d1f5269e2f42be859e2d714450843cff926fdaf3 (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
# Maintainer: Rafael Dominiquini <rafaeldominiquini at gmail dot com>

pkgname="python-kajson"
pkgver=0.7.3
pkgrel=1
pkgdesc="Powerful universal JSON encoder/decoder for Python objects"

arch=('any')
license=('Apache-2.0')
url='https://github.com/Pipelex/kajson'

_pypi_package=${pkgname#python-}
_pypi_version=${pkgver}

depends=('python' 'python-pydantic' 'python-typing_extensions')
makedepends=('python-setuptools' 'python-wheel' 'python-build' 'python-installer')

source=("https://files.pythonhosted.org/packages/source/${_pypi_package::1}/${_pypi_package//-/_}/${_pypi_package//-/_}-${_pypi_version}.tar.gz")
sha256sums=('e03f4ef3e80d44eda1aa4b813eab638acb8b055828071a01f3441399dde52786')


build() {
    cd "${srcdir}/${_pypi_package}-${_pypi_version}/"

    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${_pypi_package}-${_pypi_version}/"

    python -m installer --destdir="${pkgdir}" dist/*.whl

    install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"

    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}