python-Twisted: remove python3 subpackage

This commit is contained in:
Joel Beckmeyer 2021-11-15 11:15:03 -05:00 committed by Echo
parent ee4b3fdb07
commit 13e6496a50
4 changed files with 10 additions and 38 deletions

View file

@ -1,5 +0,0 @@
case ${ACTION} in
post)
python3 -c 'from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))' >/dev/null 2>&1
;;
esac

View file

@ -1,5 +0,0 @@
case ${ACTION} in
purge)
find usr/lib/python3.*/site-packages/twisted/plugins -name dropin.cache | xargs -r rm -f
;;
esac

View file

@ -1,12 +1,11 @@
# Template file for 'python-Twisted'
pkgname=python-Twisted
version=20.3.0
revision=3
revision=4
wrksrc="Twisted-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools
python-incremental python3-incremental"
makedepends="python-devel python3-devel"
build_style=python2-module
hostmakedepends="python-setuptools python-incremental"
makedepends="python-devel"
depends="python-setuptools python-zope.interface python-openssl
python-service_identity python-constantly python-incremental python-automat
python-hyperlink python-PyHamcrest"
@ -14,6 +13,7 @@ short_desc="Asynchronous networking framework written in Python (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="MIT"
homepage="https://twistedmatrix.com/"
changelog="https://raw.githubusercontent.com/twisted/twisted/trunk/NEWS.rst"
distfiles="${PYPI_SITE}/T/Twisted/Twisted-${version}.tar.bz2"
checksum=d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10
@ -29,27 +29,10 @@ alternatives="
twisted:twistd:/usr/bin/twistd2"
post_install() {
# don't conflict with python3-Twisted
for f in "${DESTDIR}"/usr/bin/*; do
mv "${f}"{,2}
done
vlicense LICENSE
}
python3-Twisted_package() {
alternatives="
twisted:cftp:/usr/bin/cftp3
twisted:ckeygen:/usr/bin/ckeygen3
twisted:conch:/usr/bin/conch3
twisted:mailmail:/usr/bin/mailmail3
twisted:pyhtmlizer:/usr/bin/pyhtmlizer3
twisted:tkconch:/usr/bin/tkconch3
twisted:trial:/usr/bin/trial3
twisted:twist:/usr/bin/twist3
twisted:twistd:/usr/bin/twistd3"
depends="python3-setuptools python3-zope.interface python3-openssl
python3-service_identity python3-constantly python3-incremental
python3-automat python3-hyperlink python3-PyHamcrest"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
vlicense LICENSE
}
}

View file

@ -1 +0,0 @@
python-Twisted