python-natsort: fix template

- needs setuptools for the entry point
- fix tests: needs pytest-mock
- move bin script to python3 flavor and add missing alternatives
This commit is contained in:
Alessio Sergi 2018-10-18 19:18:39 +02:00
parent 36d7162af9
commit 1cec9f6176

View file

@ -1,20 +1,21 @@
# Template file for 'python-natsort'
pkgname=python-natsort
version=5.4.1
revision=1
revision=2
noarch=yes
wrksrc="natsort-${version}"
build_style=python-module
pycompile_module="natsort"
hostmakedepends="python-setuptools python3-setuptools"
depends="python"
checkdepends="python3-pytest python3-hypothesis"
short_desc="Simple yet flexible natural sorting in Python"
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://pypi.org/project/natsort/"
homepage="https://github.com/SethMMorton/natsort"
distfiles="${PYPI_SITE}/n/natsort/natsort-${version}.tar.gz"
checksum=ae73b005135dc152e7b282b2d4cf19380d8cab4c4026461ee9f37bf3aa12e344
alternatives="natsort:natsort:/usr/bin/natsort2"
do_check() {
python3 -m pytest
@ -26,10 +27,12 @@ post_install() {
python3-natsort_package() {
noarch=yes
depends="python3"
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
}