void-packages/srcpkgs/python-automat/template
2020-10-10 10:22:17 -04:00

42 lines
1.2 KiB
Bash

# Template file for 'python-automat'
pkgname=python-automat
version=20.2.0
revision=3
wrksrc="Automat-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools python-attrs python-six"
checkdepends="python3-attrs python3-six python3-Twisted python3-graphviz"
short_desc="Finite-state machines in Python (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="MIT"
homepage="https://github.com/glyph/Automat"
distfiles="${PYPI_SITE}/A/Automat/Automat-${version}.tar.gz"
checksum=7979803c74610e11ef0c0d68a2942b152df52da55336e0c9d58daf1831cbdf33
alternatives="automat:automat-visualize:/usr/bin/automat-visualize2"
pre_build() {
sed -i setup.py \
-e '/print(/d' \
-e '/setup_requires=/,+3d' \
-e "s/use_scm_version=True/version='${version}'/"
}
do_check() {
python3 setup.py test
}
post_install() {
vlicense LICENSE
}
python3-automat_package() {
short_desc="${short_desc/Python2/Python3}"
depends="python3-setuptools python3-attrs python3-six"
alternatives="automat:automat-visualize:/usr/bin/automat-visualize3"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
vlicense LICENSE
}
}