python-automat: split python3-automat to a new package

This commit is contained in:
Michal Vasilek 2023-06-16 21:53:18 +02:00
parent 7b1eb7282b
commit 17c7ba5eca
3 changed files with 36 additions and 20 deletions

View File

@ -2,10 +2,9 @@
pkgname=python-automat
version=22.10.0
revision=2
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
build_style=python2-module
hostmakedepends="python-setuptools"
depends="python-setuptools python-attrs python-six"
checkdepends="python3-pytest python3-attrs python3-six python3-graphviz"
short_desc="Finite-state machines in Python (Python2)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
@ -13,6 +12,7 @@ homepage="https://github.com/glyph/Automat"
distfiles="${PYPI_SITE}/A/Automat/Automat-${version}.tar.gz"
checksum=e56beb84edad19dcc11d30e8d9b895f75deeb5ef5e96b84a467066b3b84bb04e
alternatives="automat:automat-visualize:/usr/bin/automat-visualize2"
make_check=no # python2
pre_build() {
sed -i setup.py \
@ -21,22 +21,7 @@ pre_build() {
-e "s/use_scm_version=True/version='${version}'/"
}
do_check() {
PYTHONPATH="$(cd build/lib* && pwd)" \
python3 -m pytest ${testjobs} automat/_test
}
post_install() {
mv ${DESTDIR}/usr/bin/automat-visualize{,2}
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
}
}

View File

@ -1 +0,0 @@
python-automat

View File

@ -0,0 +1,32 @@
# Template file for 'python3-automat'
pkgname=python3-automat
version=22.10.0
revision=2
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-setuptools python3-attrs python3-six"
checkdepends="${depends} python3-pytest python3-pytest-benchmark python3-graphviz"
short_desc="Finite-state machines in Python (Python3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/glyph/Automat"
distfiles="${PYPI_SITE}/A/Automat/Automat-${version}.tar.gz"
checksum=e56beb84edad19dcc11d30e8d9b895f75deeb5ef5e96b84a467066b3b84bb04e
alternatives="automat:automat-visualize:/usr/bin/automat-visualize3"
pre_build() {
sed -i setup.py \
-e '/print(/d' \
-e '/setup_requires=/,+3d' \
-e "s/use_scm_version=True/version='${version}'/"
}
# do_check() {
# PYTHONPATH="$(cd build/lib* && pwd)" \
# python3 -m pytest ${testjobs} automat/_test
# }
post_install() {
mv ${DESTDIR}/usr/bin/automat-visualize{,3}
vlicense LICENSE
}