Files
void-packages/srcpkgs/python-jsonschema/template
2019-09-13 08:17:57 +02:00

42 lines
1.1 KiB
Bash

# Template file for 'python-jsonschema'
pkgname=python-jsonschema
version=3.0.2
revision=1
archs=noarch
wrksrc="jsonschema-${version}"
build_style=python-module
pycompile_module="jsonschema"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools python-functools32"
short_desc="Implementation of JSON Schema for Python2"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="MIT"
homepage="https://github.com/Julian/jsonschema"
distfiles="${PYPI_SITE}/j/jsonschema/jsonschema-${version}.tar.gz"
checksum=8d4a2b7b6c2237e0199c8ea1a6d3e05bf118e289ae2b9d7ba444182a2959560d
alternatives="jsonschema:jsonschema:/usr/bin/jsonschema2"
pre_build() {
sed -i setup.py \
-e '/setup_requires/d' \
-e '/vcversioner/d' \
-e "/name=/a\
version=\"${version}\","
}
post_install() {
vlicense COPYING LICENSE
}
python3-jsonschema_package() {
archs=noarch
depends="python3-setuptools"
pycompile_module="jsonschema"
short_desc="${short_desc/Python2/Python3}"
alternatives="jsonschema:jsonschema:/usr/bin/jsonschema3"
pkg_install() {
vmove usr/bin/jsonschema3
vmove usr/lib/python3*
vlicense COPYING LICENSE
}
}