vp-build/srcpkgs/python-natsort/template

40 lines
1.0 KiB
Bash

# Template file for 'python-natsort'
pkgname=python-natsort
version=5.5.0
revision=1
noarch=yes
wrksrc="natsort-${version}"
build_style=python-module
pycompile_module="natsort"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools"
checkdepends="python3-pytest-mock python3-hypothesis"
short_desc="Simple yet flexible natural sorting in Python2"
maintainer="Michal Koutenský <koutak.m@gmail.com>"
license="MIT"
homepage="https://github.com/SethMMorton/natsort"
distfiles="${PYPI_SITE}/n/natsort/natsort-${version}.tar.gz"
checksum=e29031f37aa264145d6ad9acdab335479ce3636806fc7aa70b7675a2b2198d09
alternatives="natsort:natsort:/usr/bin/natsort2"
do_check() {
python3 -m pytest
}
post_install() {
vlicense LICENSE
}
python3-natsort_package() {
noarch=yes
pycompile_module="natsort"
depends="python3-setuptools"
short_desc="${short_desc/Python2/Python3}"
alternatives="natsort:natsort:/usr/bin/natsort3"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
vlicense LICENSE
}
}