From b27f53c849bc350fa4d71378a45720b4f74a7851 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 15 Nov 2021 11:20:43 -0500 Subject: [PATCH] python3-Twisted: update to 22.1.0. --- srcpkgs/python3-Twisted/INSTALL | 5 +++ srcpkgs/python3-Twisted/REMOVE | 5 +++ srcpkgs/python3-Twisted/template | 54 ++++++++++++++++++++++++++++++++ srcpkgs/python3-Twisted/update | 1 + 4 files changed, 65 insertions(+) create mode 100644 srcpkgs/python3-Twisted/INSTALL create mode 100644 srcpkgs/python3-Twisted/REMOVE create mode 100644 srcpkgs/python3-Twisted/template create mode 100644 srcpkgs/python3-Twisted/update diff --git a/srcpkgs/python3-Twisted/INSTALL b/srcpkgs/python3-Twisted/INSTALL new file mode 100644 index 0000000000..632dfe8fa0 --- /dev/null +++ b/srcpkgs/python3-Twisted/INSTALL @@ -0,0 +1,5 @@ +case ${ACTION} in +post) + python3 -c 'from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))' >/dev/null 2>&1 + ;; +esac diff --git a/srcpkgs/python3-Twisted/REMOVE b/srcpkgs/python3-Twisted/REMOVE new file mode 100644 index 0000000000..ec8608bc5f --- /dev/null +++ b/srcpkgs/python3-Twisted/REMOVE @@ -0,0 +1,5 @@ +case ${ACTION} in +purge) + find usr/lib/python3.*/site-packages/twisted/plugins -name dropin.cache | xargs -r rm -f + ;; +esac diff --git a/srcpkgs/python3-Twisted/template b/srcpkgs/python3-Twisted/template new file mode 100644 index 0000000000..37c2c1fcf2 --- /dev/null +++ b/srcpkgs/python3-Twisted/template @@ -0,0 +1,54 @@ +# Template file for 'python3-Twisted' +pkgname=python3-Twisted +version=22.1.0 +revision=1 +wrksrc="Twisted-${version}" +build_style=python3-module +make_check_target=src/twisted +hostmakedepends="python3-setuptools python3-incremental" +makedepends="python3-devel" +depends="python3-zope.interface python3-constantly python3-incremental + python3-automat python3-hyperlink python3-attrs python3-typing_extensions + python3-openssl python3-service_identity python3-pyasn1" +checkdepends="python3-bcrypt python3-PyHamcrest git python3-h2 + python3-hyperframe python3-priority python3-hpack python3-appdirs $depends" +short_desc="Asynchronous networking framework written in Python (Python3)" +maintainer="Orphaned " +license="MIT" +homepage="https://twistedmatrix.com/" +changelog="https://raw.githubusercontent.com/twisted/twisted/trunk/NEWS.rst" +distfiles="${PYPI_SITE}/T/Twisted/Twisted-${version}.tar.gz" +checksum=b7971ec9805b0f80e1dcb1a3721d7bfad636d5f909de687430ce373979d67b61 +make_check=ci-skip # some tests fail when running as root + +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" + +post_patch() { + # test requires unpackaged cython-test-exception-raiser + rm src/twisted/test/test_failure.py +} + +do_check() { + python3 setup.py install --prefix=build --root="$(pwd)" + PATH="$PWD/build/bin:$PATH" \ + PYTHONPATH="$PWD/build/lib/python$py3_ver/site-packages" \ + python3 -m twisted.trial twisted +} + +post_install() { + # don't conflict with python-Twisted + for f in "${DESTDIR}"/usr/bin/*; do + mv "${f}"{,3} + done + + vlicense LICENSE +} diff --git a/srcpkgs/python3-Twisted/update b/srcpkgs/python3-Twisted/update new file mode 100644 index 0000000000..e299d00ea6 --- /dev/null +++ b/srcpkgs/python3-Twisted/update @@ -0,0 +1 @@ +ignore="*rc*"