From 3abf16c47f88a3a0324327201da7b9a9068b6c1b Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Fri, 16 Jun 2023 21:53:18 +0200 Subject: [PATCH] python-automat: split python3-automat to a new package --- srcpkgs/python-automat/template | 23 ++++------------------- srcpkgs/python3-automat | 1 - srcpkgs/python3-automat/template | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 20 deletions(-) delete mode 120000 srcpkgs/python3-automat create mode 100644 srcpkgs/python3-automat/template diff --git a/srcpkgs/python-automat/template b/srcpkgs/python-automat/template index bc9ea242cfe246..cf564d324fc97a 100644 --- a/srcpkgs/python-automat/template +++ b/srcpkgs/python-automat/template @@ -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 " 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 - } -} diff --git a/srcpkgs/python3-automat b/srcpkgs/python3-automat deleted file mode 120000 index 2df0fb5b1fc35f..00000000000000 --- a/srcpkgs/python3-automat +++ /dev/null @@ -1 +0,0 @@ -python-automat \ No newline at end of file diff --git a/srcpkgs/python3-automat/template b/srcpkgs/python3-automat/template new file mode 100644 index 00000000000000..5d3f0b26d88a91 --- /dev/null +++ b/srcpkgs/python3-automat/template @@ -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 " +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 +}