void-packages/srcpkgs/python3-Twisted/template

58 lines
1.9 KiB
Bash

# Template file for 'python3-Twisted'
pkgname=python3-Twisted
version=23.8.0
revision=1
build_style=python3-pep517
hostmakedepends="hatchling 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-idna"
checkdepends="python3-PyHamcrest python3-hypothesis python3-pyserial
python3-cryptography python3-appdirs python3-bcrypt python3-h2
python3-priority git xvfb-run $depends"
short_desc="Asynchronous networking framework written in Python (Python3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://twisted.org/"
changelog="https://raw.githubusercontent.com/twisted/twisted/trunk/NEWS.rst"
distfiles="${PYPI_SITE}/t/twisted/twisted-${version}.tar.gz"
checksum=3c73360add17336a622c0d811c2a2ce29866b6e59b1125fd6509b17252098a24
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
# issues with executing shell executables from the test
rm src/twisted/test/test_main.py
}
do_check() {
export LC_CTYPE=en_US.UTF-8
testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
python3 -m installer --destdir "${testdir}" \
${make_install_args} ${make_install_target:-dist/*.whl}
PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \
trial ${makejobs} src/twisted
}
post_install() {
# don't conflict with python-Twisted
for f in "${DESTDIR}"/usr/bin/*; do
mv "${f}"{,3}
done
vlicense LICENSE
}