diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2021-07-30 20:14:53 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2021-07-30 20:14:53 +0000 |
| commit | 0bb248cec95bc08912c471abb2251dfba5265353 (patch) | |
| tree | 2407b7c3b2010140b3deed802b016e0d7980a77c /dev-python | |
| parent | 53909176a66e403ac54dcc147dc2180a7161d724 (diff) | |
| download | baldeagleos-repo-0bb248cec95bc08912c471abb2251dfba5265353.tar.gz baldeagleos-repo-0bb248cec95bc08912c471abb2251dfba5265353.tar.xz baldeagleos-repo-0bb248cec95bc08912c471abb2251dfba5265353.zip | |
Adding metadata
Diffstat (limited to 'dev-python')
23 files changed, 329 insertions, 1338 deletions
diff --git a/dev-python/bitarray/Manifest b/dev-python/bitarray/Manifest index 24fa3b81eb5c..a1a30fd5322d 100644 --- a/dev-python/bitarray/Manifest +++ b/dev-python/bitarray/Manifest @@ -1,2 +1,2 @@ -DIST bitarray-2.2.2.tar.gz 78273 BLAKE2B 1c9b9c4011b1b11481209aba6958aa3c58dc2c1f5188a97f8b6c15a8a77ed0338bfc64bfcf6da3667c317631e5d271408f443a33e214c8f123f2c764cc93d6b0 SHA512 98b02ecc39befa619c816117fdfc3d69efb931203bb509e92bdf800f5c64e8633a986751d1650cb33dd0c6c0df0653f70c97fe73d4334198b81f39aafec4e019 DIST bitarray-2.2.3.tar.gz 79709 BLAKE2B 75bb085914fa5f7b926ede947d69f7a8de1dcd8e61917d1e154049102c539e78a7d0a4bab181a8bf8a19338d0d73124d9aec5f746f25d12a8f5a0c188f309009 SHA512 ed8641bd12a87e440642535baab62b132ce4499b8525a699eb82926b098d7f9ce6f66ea07846bfacabcf45cdc1d30c12c104a0b1af638efa8ad809329914a186 +DIST bitarray-2.2.4.tar.gz 82471 BLAKE2B 0b2bd1afd17df2756e3e6ecfe78f84ee4ec84121c9eb59eaaa57042c67702004c25b0286474b1abea82a10ed682b8e0e221001e770238d144452049019300ae3 SHA512 ad5d96c8232d239e51c40782e7a487fd898732774e39228c996dd32f0697898b65f2a26479a0af03e07a347a404174924c8299590433b41a6bf6189447f4194f diff --git a/dev-python/bitarray/bitarray-2.2.2.ebuild b/dev-python/bitarray/bitarray-2.2.4.ebuild index 012b3f886892..012b3f886892 100644 --- a/dev-python/bitarray/bitarray-2.2.2.ebuild +++ b/dev-python/bitarray/bitarray-2.2.4.ebuild diff --git a/dev-python/clang-python/clang-python-14.0.0.9999.ebuild b/dev-python/clang-python/clang-python-14.0.0.9999.ebuild new file mode 100644 index 000000000000..2f2f8087f297 --- /dev/null +++ b/dev-python/clang-python/clang-python-14.0.0.9999.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) +inherit llvm.org python-r1 + +DESCRIPTION="Python bindings for sys-devel/clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="" +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +# The module is opening libclang.so directly, and doing some blasphemy +# on top of it. +RDEPEND=" + >=sys-devel/clang-${PV}:* + !sys-devel/llvm:0[clang(-),python(-)] + !sys-devel/clang:0[python(-)] + ${PYTHON_DEPS}" +DEPEND="${RDEPEND}" + +LLVM_COMPONENTS=( clang/bindings/python ) +llvm.org_set_globals + +python_test() { + "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}" +} + +src_test() { + python_foreach_impl python_test +} + +src_install() { + python_foreach_impl python_domodule clang +} diff --git a/dev-python/lit/lit-14.0.0.9999.ebuild b/dev-python/lit/lit-14.0.0.9999.ebuild new file mode 100644 index 000000000000..f538abb22ff5 --- /dev/null +++ b/dev-python/lit/lit-14.0.0.9999.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) + +inherit distutils-r1 llvm.org + +DESCRIPTION="A stand-alone install of the LLVM suite testing tool" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="" +IUSE="test" +RESTRICT="!test? ( test )" + +# Tests require 'FileCheck' and 'not' utilities (from llvm) +BDEPEND=" + test? ( + dev-python/psutil[${PYTHON_USEDEP}] + sys-devel/llvm )" + +LLVM_COMPONENTS=( llvm/utils/lit ) +llvm.org_set_globals + +# TODO: move the manpage generation here (from sys-devel/llvm) + +src_prepare() { + cd "${WORKDIR}" || die + distutils-r1_src_prepare +} + +python_test() { + local -x LIT_PRESERVES_TMP=1 + local litflags=$(get_lit_flags) + ./lit.py ${litflags//;/ } tests || die +} diff --git a/dev-python/pypy-exe-bin/Manifest b/dev-python/pypy-exe-bin/Manifest index f4919baf5da5..24bf47a66082 100644 --- a/dev-python/pypy-exe-bin/Manifest +++ b/dev-python/pypy-exe-bin/Manifest @@ -1,4 +1,4 @@ -DIST pypy-exe-7.3.3_p2-1.amd64.xpak 13559131 BLAKE2B 85826ef13cc12ec07143b55cd6821f50db821ba3dad351aae90c2beb98b85f51f39ee26626a04757a63e96ef0da6062ad714f1bf96900ef361d61f2051342787 SHA512 5f5566942f6187d8fdf5b05dc27a3eb7e4bfa958da9b39a85a3531c427de89ca5bea16d080dd5450df906e5a3ab56fdb09010a603795a4763b80d5e4ee4ed96c -DIST pypy-exe-7.3.3_p2-1.x86.xpak 10215453 BLAKE2B 34bbac2f3fab96eb91d2f3a9514e8f1b7ecb342da7402385f6d44755bf31f9b3d76688dcc7446aac2a9d768b588c545c0557e96b2bcace39ee669ab3ba5f882b SHA512 9cfc4fc080ec67a1a28cad2d1a76ffcff0db3e1d02ca2efe35f9dd4931c6d2e58ea9de1b3bd8098fc891f7c4b2ff703e42c77f19bedc837c1f5c4c7dc141f26f DIST pypy-exe-7.3.4-1.amd64.xpak 13659131 BLAKE2B f8dc0875bec1027fd86499d13e435f97bd015882260b449de279ef41f8b8e9b89fc6e9f197539314ada54e2435a2cb7e7baf3da6e47b872d6717c847c3b7ddcf SHA512 e14312457c1fed4d815c7dee0487b5d77e781b3139381a142156e6fc524df7e7f4f613799a570716d89c95fd704ecad3c095f839296d7c1e63bd675aaac2c92e DIST pypy-exe-7.3.4-1.x86.xpak 10291603 BLAKE2B 62e83aa57b176a02a64a1826515763c24d008a02733ef32040ba2c908dffaca371cda3f55eddecfe93f45c1ba52aa7d0ccb898d84f0dbf8ab004f8a79a3814bb SHA512 73c6481530f4c4305a16d12995b11860023f7516737f892df7911d1effd01142c22f2318fb3b392e2483b976fa2609dbff37b61ad8847e395cbaaccbac0301dd +DIST pypy-exe-7.3.5-1.amd64.xpak 13646862 BLAKE2B ac2aecdb15d5b73cbd27b8a295ef5f11895ed7f897cda93cdff96c72ad727ab7998332231a1166100126ec2252b7c5b69e6b5bbfcb3e7fcb7738f5967809f5d8 SHA512 346f7b47d0e48799edd0e00b6bf683053ccaf20e6663ddd01e5753703082035cb4079a3539981813fc54abd7f83456353c38bd733dacf782e59a6548f861d1a7 +DIST pypy-exe-7.3.5-1.x86.xpak 10297092 BLAKE2B 149672f5714959deeb790b575e7980c1281b1cf37c0853e3ddf8c150104b2da0b8d32736eacc31f67d4d522902599e64bec7427727e560d8d54bbe7c5bd9a06e SHA512 48e4858489e928d44dd8570b783623eb33ce7a1fb62b2a054cd2841ca2be8ab7dd3bbd00c3aff770c1f8dc42ef52f52da3d18c5c27ebd08d19e78bdf56081e96 diff --git a/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.3_p2.ebuild b/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.5.ebuild index 3d0b3fd13699..9759ac9bb38f 100644 --- a/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.3_p2.ebuild +++ b/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.5.ebuild @@ -1,6 +1,5 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 2021 Liguros Authors # Distributed under the terms of the GNU General Public License v2 - EAPI=7 inherit pax-utils @@ -21,10 +20,13 @@ S="${WORKDIR}" LICENSE="MIT" SLOT="${PV%_p*}" -KEYWORDS="amd64 x86" +KEYWORDS="~amd64 ~x86" RDEPEND=">=sys-libs/zlib-1.1.3:0/1 - dev-libs/libffi:0/7 + || ( + dev-libs/libffi-compat:7 + dev-libs/libffi:0/7 + ) virtual/libintl:0/0 dev-libs/expat:0/0 app-arch/bzip2:0/1 diff --git a/dev-python/pypy-exe/Manifest b/dev-python/pypy-exe/Manifest index 7b09b3316a2c..a6e03b1addd1 100644 --- a/dev-python/pypy-exe/Manifest +++ b/dev-python/pypy-exe/Manifest @@ -1,4 +1,6 @@ DIST pypy2.7-gentoo-patches-7.3.4.tar.xz 7844 BLAKE2B d06694fa085667e40ef8805c29f7ccf95b49f9de4e99e3ebfa3d69c4202a0ddcebb54c524d7d9f9ec67573a8d2ebe38fb7023d4d3ecef67afc907ecef5c16c02 SHA512 aa8ffefb5d30070ae86c1c14c55c277e39d3da66aea3a0951319158fb65e716e7fa7864e8bf5d26314d4b2a8030c766b63cad6a3663822d2875cd8cc1f3f2de5 +DIST pypy2.7-gentoo-patches-7.3.5.tar.xz 6928 BLAKE2B 41aff14411882e60102866a41de6a2c13983d5489c9ed928e2823714883b5cca289c093426fdec35b6df8d17de7a96528d799e10412a0f2f02563e152acf24ea SHA512 f12c1a414cf40e86e9d2a7d1cdfaaacc1045f8043da479b5270ef983ffcf01418a70bbd21ae740abf544091cdc5026bffe467d631242d5e9e0863a64fa8d026b DIST pypy2.7-gentoo-patches-7.3.5rc3.tar.xz 5796 BLAKE2B b1c0fb0a8d86d117a9d4102777605eedd026b614f4b66272b3fc5da246bbe5edf516e95a40471117b61078c18b9fc615e55e0992a5d0a1be7caf9026ee26b6be SHA512 8699813837dfa4560a6e73b96f770c5d5999ce008e17cf62a856a454cb0b63146787a54934874162c79345488959e0936b3bd03823bc9f8e276f80df1122f7a8 DIST pypy2.7-v7.3.4-src.tar.bz2 21571561 BLAKE2B d0ac56fadec63fe7e65728c36c2aaf96fc5f54919dddbca9571a24c42a9e3e21f672f84555a18a384c4715f0489bd7aef009c0a47b635de88c472a93e2ae8d71 SHA512 4c18c2dbfbf0cc1034bea773828204df77aec7ef82119fb94e5cb762ce1783e00ad70e99d1432b4948dc132e726bdc6015f4a5bf10a5b10415bcfe99da2ecd17 +DIST pypy2.7-v7.3.5-src.tar.bz2 21572184 BLAKE2B 388b8623c2c5de839dea0e60acc5e11a6a774b4a6cdc051691053a97fe13ec12c6735a4be64015653ef420c0d8af2c79d8faa90a7dfc3042e29f35f4e1ded6c3 SHA512 a30c666c29eec7cca7e2e52f26480958b5885cd59c6b2e3d3c0d8c1cc55c298e878fc95f88e38a4297bb3d7d1cc1f77470de958e5acfd317e1fc8bdd5d013dcb DIST pypy2.7-v7.3.5rc3-src.tar.bz2 21563312 BLAKE2B e343dcd617026ea5f951f3d24deeb59736c9a6ecc91d1b9c1bd980b6f3c239a5bf0edb9b72a0847a6aeeaead8aca9ecf537af81c9fcf0a2f6647c99edc0d1735 SHA512 e080771ea10a30820f8844b3f512a7681f2e619e8a37fa8ac60198f3c8c3780a8e08aa63749be375c00cd547994f428df44e2cd9f61b272b215ded433374e0a1 diff --git a/dev-python/pypy-exe/pypy-exe-7.3.5.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.5.ebuild new file mode 100644 index 000000000000..08a241f6d46f --- /dev/null +++ b/dev-python/pypy-exe/pypy-exe-7.3.5.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9,10} ) +inherit check-reqs pax-utils python-any-r1 toolchain-funcs + +PYPY_PV=${PV%_p*} +MY_P=pypy2.7-v${PYPY_PV/_} +PATCHSET="pypy2.7-gentoo-patches-${PV/_}" + +DESCRIPTION="PyPy executable (build from source)" +HOMEPAGE="https://www.pypy.org/" +SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +SLOT="${PYPY_PV}" +KEYWORDS="" +IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" + +RDEPEND=">=sys-libs/zlib-1.1.3:0= + dev-libs/libffi:0= + virtual/libintl:0= + dev-libs/expat:0= + bzip2? ( app-arch/bzip2:0= ) + ncurses? ( sys-libs/ncurses:0= ) + !dev-python/pypy-exe-bin:${PYPY_PV}" +# don't enforce the dep on pypy with USE=low-memory since it's going +# to cause either collisions or circular dep on itself +DEPEND="${RDEPEND}" +BDEPEND=" + !low-memory? ( + || ( + dev-python/pypy + dev-lang/python:2.7 + ) + )" + +check_env() { + if use low-memory; then + if ! has_version -b dev-python/pypy && + ! has_version -b dev-python/pypy-bin + then + eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" + eerror "being installed. Please install it using e.g.:" + eerror + eerror " $ emerge -1v dev-python/pypy dev-python/pypy-exe-bin" + eerror + eerror "before attempting to build dev-python/pypy-exe[low-memory]." + die "dev-python/pypy needs to be installed for USE=low-memory" + fi + + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" + fi + + check-reqs_pkg_pretend +} + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && check_env +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + check_env + + use low-memory && EPYTHON= + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] && + { has_version -b dev-python/pypy || + has_version -b dev-python/pypy-bin; } + then + einfo "Using already-installed PyPy to perform the translation." + EPYTHON=pypy + else + einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" + einfo "recommends using PyPy for that. If you wish to do so, please unset" + einfo "the EPYTHON variable." + python-any-r1_pkg_setup + fi + fi +} + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + default +} + +src_configure() { + tc-export CC + + local jit_backend + if use jit; then + jit_backend='--jit-backend=' + + # We only need the explicit sse2 switch for x86. + # On other arches we can rely on autodetection which uses + # compiler macros. Plus, --jit-backend= doesn't accept all + # the modern values... + + if use x86; then + if use cpu_flags_x86_sse2; then + jit_backend+=x86 + else + jit_backend+=x86-without-sse2 + fi + else + jit_backend+=auto + fi + fi + + local args=( + --no-shared + $(usex jit -Ojit -O2) + + ${jit_backend} + + pypy/goal/targetpypystandalone + ) + + # Avoid linking against libraries disabled by use flags + local opts=( + bzip2:bz2 + ncurses:_minimal_curses + ) + + local opt + for opt in "${opts[@]}"; do + local flag=${opt%:*} + local mod=${opt#*:} + + args+=( + $(usex ${flag} --withmod --withoutmod)-${mod} + ) + done + + local interp=( "${EPYTHON}" ) + if use low-memory; then + interp=( env PYPY_GC_MAX_DELTA=200MB + "${EPYTHON}" --jit loop_longevity=300 ) + fi + + if [[ ${EPYTHON} != pypy ]]; then + # reuse bundled pycparser to avoid external dep + mkdir -p "${T}"/pymod/cffi || die + : > "${T}"/pymod/cffi/__init__.py || die + cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die + local -x PYTHONPATH=${T}/pymod:${PYTHONPATH} + fi + + # translate into the C sources + # we're going to build them ourselves since otherwise pypy does not + # free up the unneeded memory before spawning the compiler + set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" + echo -e "\033[1m${@}\033[0m" + "${@}" || die "translation failed" +} + +src_compile() { + emake -C "${T}"/usession*-0/testing_1 +} + +src_install() { + local dest=/usr/lib/pypy2.7 + exeinto "${dest}" + newexe "${T}"/usession*-0/testing_1/pypy-c pypy-c-${PYPY_PV} + insinto "${dest}"/include/${PYPY_PV} + doins include/pypy_* + pax-mark m "${ED}${dest}/pypy-c-${PYPY_PV}" +} diff --git a/dev-python/pypy3-exe-bin/Manifest b/dev-python/pypy3-exe-bin/Manifest index dd3726fc1e4c..da711e5d5c37 100644 --- a/dev-python/pypy3-exe-bin/Manifest +++ b/dev-python/pypy3-exe-bin/Manifest @@ -1,2 +1,4 @@ DIST pypy3-exe-7.3.4-1.amd64.xpak 12038379 BLAKE2B 6f51ec285cedef0703a9e145e5ac0ada1d19585be97997a8156a3964949490fd0c874b8c355433d3cd04df4df5c11be7f5badefe2e9c69129052fe51de627a72 SHA512 f1badabde936f5dc5700fda01941be249f4a056f1d61a685bb8c168a5cca6eac4c7e6cd660a5a5d2695307a3b7f4ef1941e5ea63a57816b669d54f497a1a5b91 DIST pypy3-exe-7.3.4-1.x86.xpak 9159557 BLAKE2B 754fd401084c480a5a2a20c6e9a533fa5f691cbca06b0516d3d44fdf9529541c43f84fccdfdd70422231ddb887a9f5a9e38789b6fc3dce81d9f0fafade587bec SHA512 ff05c3ae252b0a5eeb403a18782707ea8884126763a83bcebe1e60934ad7cd6070db24ebeeffb15397b6c02fc68766011438b2064b484ae6d24991311e2a012a +DIST pypy3-exe-7.3.5-1.amd64.xpak 12030139 BLAKE2B f9a76a2304b3a29985209910b2082aeb07f08a22fce771aa7d548af6e662b88563f61b66582fe0ded21a00463725d4b21cb943c6dedba090cdcfcbf2754433f6 SHA512 d223095cc28f5fceb10196a172ddc2e363dd7e0c5e55b79c959d2ff3f84cb96c652e44bf8c2f7b4555d90289fa0768b18cc26a9212264ab397dd7308a14a93df +DIST pypy3-exe-7.3.5-1.x86.xpak 9156096 BLAKE2B c3a3a329c2f8bd843fc4c882bbddc1ad124dc797d4915818769e79663e53e787b991b04b8006e8b8548249e4e76d8b68545b9d7470d8cf41bece2cd8e085066c SHA512 b58d48e1fde3ec12b497a30035b719a64a16de1292fb34df6a8e3ecddc277a477641d7781a3440ef2b73dfb1b50ca34cbdca702f27d6a5e00ad25e88bd8ebf34 diff --git a/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.4.ebuild b/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.4-r1.ebuild index 277fe587ef6d..64af9ea94084 100644 --- a/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.4.ebuild +++ b/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.4-r1.ebuild @@ -24,7 +24,10 @@ SLOT="${PV%_p*}" KEYWORDS="amd64 x86" RDEPEND=">=sys-libs/zlib-1.1.3:0/1 - dev-libs/libffi:0/7 + || ( + dev-libs/libffi-compat:7 + dev-libs/libffi:0/7 + ) virtual/libintl:0/0 dev-libs/expat:0/0 app-arch/bzip2:0/1 diff --git a/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.5.ebuild b/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.5.ebuild new file mode 100644 index 000000000000..b8309912e695 --- /dev/null +++ b/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.5.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pax-utils + +MY_P=pypy3-exe-${PV}-1 +DESCRIPTION="PyPy3 executable (pre-built version)" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/pypy/dev-python/pypy3-exe/${MY_P}.xpak + -> ${MY_P}.amd64.xpak + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86/pypy/dev-python/pypy3-exe/${MY_P}.xpak + -> ${MY_P}.x86.xpak + )" +S="${WORKDIR}" + +LICENSE="MIT" +SLOT="${PV%_p*}" +KEYWORDS="~amd64 ~x86" + +RDEPEND=">=sys-libs/zlib-1.1.3:0/1 + || ( + dev-libs/libffi-compat:7 + dev-libs/libffi:0/7 + ) + virtual/libintl:0/0 + dev-libs/expat:0/0 + app-arch/bzip2:0/1 + sys-libs/ncurses:0/6 + !dev-python/pypy-exe:${SLOT}" + +PYPY_PV=${SLOT%_p*} +QA_PREBUILT=" + usr/lib/pypy3.7/pypy3-c-${PYPY_PV}" + +src_unpack() { + ebegin "Unpacking ${MY_P}.${ARCH}.xpak" + tar -x < <(xz -c -d --single-stream "${DISTDIR}/${MY_P}.${ARCH}.xpak") + eend ${?} || die "Unpacking ${MY_P} failed" +} + +src_install() { + insinto / + doins -r usr + fperms +x "/usr/lib/pypy3.7/pypy3-c-${PYPY_PV}" + pax-mark m "${ED}/usr/lib/pypy3.7/pypy3-c-${PYPY_PV}" +} diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest index 0ed1eeac5fba..8f648038b168 100644 --- a/dev-python/twisted/Manifest +++ b/dev-python/twisted/Manifest @@ -1,5 +1,3 @@ -DIST Twisted-19.10.0.tar.bz2 3118485 BLAKE2B a0d532b67177aa017e463bf823d7842d4f6ff694f78cd7600865718ffe861023a53ea6a922f7de232133edba26f5255074d7ef277ce8f3bdf02d556ccf4abf41 SHA512 de8d7fd0b2081cebeff68b060c8469377011648bc563a94a993d3530fb007ed42c3a54925c9a10c465ee7a3065cc9108ace12d10d358223fab13494becb9ac4b -DIST Twisted-20.3.0.tar.bz2 3127793 BLAKE2B 2e85fc3ec26d89e563c9e79a5d2adea81ff1745d18f0f92b8d45ae3729fbddf09998664257880372c7a4caeb5977c5cad7c863596b8c27ad7890275cead9f763 SHA512 1b850e5fc21a3630ead4c2cc3622c16e78bb3be38ab11d021779b7ce3d3c30acc4e19d79c7791a5fce6c5c6e09c2baa349901dffe952de67dd98eec419846365 DIST twisted-21.2.0.tar.gz 3882978 BLAKE2B ba37572b0f9eadf2962a2730e4c2c0ed65f582b11b3350034660a2c53c5cd0892b19867d19e0201d4808c09fca621dbe540d153dc6c7d5827d45d2423d19d28b SHA512 fa743dcf22f3c17dfd17f39b7df0cc31fb8ce3e989478ada9a026424ec2de35e6a403ef35acdef5905eed008d42e3c2fee6b7ccdda433e6c250f1feaa83ea8a4 DIST twisted-21.7.0.tar.gz 3895345 BLAKE2B 510165ad2933f07005e508df5a8bdf2863a7988c0f18fcc089e948d190c65aab32fc876d3120e311e91d6989f1ea2d8b3b5f5db4a9dfc63c38da56213f718728 SHA512 a946769a6bc6c72af26e7763b9e0675788f134b4d005ea89d935da1b1d5f60d92c84fdb2615e442e7da2b98291ee8a63d5236ec7ba72ef04ad3f847b092feecb DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03 diff --git a/dev-python/twisted/files/twisted-19.10.0-py38-cgi.patch b/dev-python/twisted/files/twisted-19.10.0-py38-cgi.patch deleted file mode 100644 index 5fc4768e5d23..000000000000 --- a/dev-python/twisted/files/twisted-19.10.0-py38-cgi.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/src/twisted/web/test/test_http.py b/src/twisted/web/test/test_http.py -index 6001d1e40..1cf9172ef 100644 ---- a/src/twisted/web/test/test_http.py -+++ b/src/twisted/web/test/test_http.py -@@ -9,15 +9,15 @@ from __future__ import absolute_import, division - - import base64 - import calendar --import cgi - import random - - import hamcrest - - try: - from urlparse import urlparse, urlunsplit, clear_cache -+ from cgi import parse_qs - except ImportError: -- from urllib.parse import urlparse, urlunsplit, clear_cache -+ from urllib.parse import urlparse, urlunsplit, clear_cache, parse_qs - - from io import BytesIO - from itertools import cycle -@@ -2156,15 +2156,15 @@ Hello, - class QueryArgumentsTests(unittest.TestCase): - def testParseqs(self): - self.assertEqual( -- cgi.parse_qs(b"a=b&d=c;+=f"), -+ parse_qs(b"a=b&d=c;+=f"), - http.parse_qs(b"a=b&d=c;+=f")) - self.assertRaises( - ValueError, http.parse_qs, b"blah", strict_parsing=True) - self.assertEqual( -- cgi.parse_qs(b"a=&b=c", keep_blank_values=1), -+ parse_qs(b"a=&b=c", keep_blank_values=1), - http.parse_qs(b"a=&b=c", keep_blank_values=1)) - self.assertEqual( -- cgi.parse_qs(b"a=&b=c"), -+ parse_qs(b"a=&b=c"), - http.parse_qs(b"a=&b=c")) - - diff --git a/dev-python/twisted/files/twisted-19.10.0-py38.patch b/dev-python/twisted/files/twisted-19.10.0-py38.patch deleted file mode 100644 index e787167d45b3..000000000000 --- a/dev-python/twisted/files/twisted-19.10.0-py38.patch +++ /dev/null @@ -1,110 +0,0 @@ -From d33b90880b8eb024daa73bc3fd39aca0bc791ff1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lucas=20Treffenst=C3=A4dt?= <lucas@treffenstaedt.de> -Date: Mon, 13 Jan 2020 13:54:08 +0100 -Subject: [PATCH 1/2] CramMD5ClientAuthenticator now specifies the digestmod - argument to hmac.HMAC constructor explicitly. - ---- - src/twisted/mail/_cred.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/twisted/mail/_cred.py b/src/twisted/mail/_cred.py -index 9d3646948..43c406f90 100644 ---- a/src/twisted/mail/_cred.py -+++ b/src/twisted/mail/_cred.py -@@ -8,6 +8,7 @@ Credential managers for L{twisted.mail}. - from __future__ import absolute_import, division - - import hmac -+import hashlib - - from zope.interface import implementer - -@@ -28,7 +29,7 @@ class CramMD5ClientAuthenticator: - - - def challengeResponse(self, secret, chal): -- response = hmac.HMAC(secret, chal).hexdigest().encode('ascii') -+ response = hmac.HMAC(secret, chal, digestmod = hashlib.md5).hexdigest().encode('ascii') - return self.user + b' ' + response - - --- -2.26.2 - -From 694bc67f3cf7d36a6f512f0b76882e85d0966dd2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Poisson?= <goffi@goffi.org> -Date: Sun, 17 Nov 2019 19:48:53 +0100 -Subject: [PATCH 2/2] Fix parsing of namespaced attributes with Python 3.8 in - twisted.words.xish.domish.ExpatElementStream - ---- - src/twisted/words/newsfragments/9730.bugfix | 1 + - src/twisted/words/test/test_domish.py | 17 +++++++++++++++++ - src/twisted/words/xish/domish.py | 11 +++++++++-- - 3 files changed, 27 insertions(+), 2 deletions(-) - create mode 100644 src/twisted/words/newsfragments/9730.bugfix - -diff --git a/src/twisted/words/newsfragments/9730.bugfix b/src/twisted/words/newsfragments/9730.bugfix -new file mode 100644 -index 000000000..5c91305c8 ---- /dev/null -+++ b/src/twisted/words/newsfragments/9730.bugfix -@@ -0,0 +1 @@ -+Fixed parsing of streams with Python 3.8 when there are spaces in namespaces or namespaced attributes in twisted.words.xish.domish.ExpatElementStream -diff --git a/src/twisted/words/test/test_domish.py b/src/twisted/words/test/test_domish.py -index a8f8fa76b..cd16e3a4d 100644 ---- a/src/twisted/words/test/test_domish.py -+++ b/src/twisted/words/test/test_domish.py -@@ -350,6 +350,23 @@ class DomishStreamTestsMixin: - self.elements[0].attributes, {(" bar baz ", "baz"): "quux"}) - - -+ def test_attributesWithNamespaces(self): -+ """ -+ Attributes with namespace are parsed without Exception. -+ (https://twistedmatrix.com/trac/ticket/9730 regression test) -+ """ -+ -+ xml = b"""<root xmlns:test='http://example.org' xml:lang='en'> -+ <test:test>test</test:test> -+ </root>""" -+ -+ # with Python 3.8 and without #9730 fix, the following error would -+ # happen at next line: -+ # ``RuntimeError: dictionary keys changed during iteration`` -+ self.stream.parse(xml) -+ self.assertEqual(self.elements[0].uri, "http://example.org") -+ -+ - def testChildPrefix(self): - xml = b"<root xmlns='testns' xmlns:foo='testns2'><foo:child/></root>" - -diff --git a/src/twisted/words/xish/domish.py b/src/twisted/words/xish/domish.py -index 2063c410a..fc49285f5 100644 ---- a/src/twisted/words/xish/domish.py -+++ b/src/twisted/words/xish/domish.py -@@ -807,11 +807,18 @@ class ExpatElementStream: - qname = ('', name) - - # Process attributes -+ newAttrs = {} -+ toDelete = [] - for k, v in attrs.items(): - if " " in k: - aqname = k.rsplit(" ", 1) -- attrs[(aqname[0], aqname[1])] = v -- del attrs[k] -+ newAttrs[(aqname[0], aqname[1])] = v -+ toDelete.append(k) -+ -+ attrs.update(newAttrs) -+ -+ for k in toDelete: -+ del attrs[k] - - # Construct the new element - e = Element(qname, self.defaultNsStack[-1], attrs, self.localPrefixes) --- -2.26.2 - diff --git a/dev-python/twisted/files/twisted-19.10.0-py39-b64.patch b/dev-python/twisted/files/twisted-19.10.0-py39-b64.patch deleted file mode 100644 index f67d6240558a..000000000000 --- a/dev-python/twisted/files/twisted-19.10.0-py39-b64.patch +++ /dev/null @@ -1,165 +0,0 @@ -From f56133a2e0d7ddf9ee6e43bf9e1d62e970cb0b3a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 27 May 2020 13:23:37 +0200 -Subject: [PATCH] Replace base64.*string() functions to fix py3.9 support - -Replace base64.decodestring() and .encodestring() functions as they -were deprecated since Python 3.1 in favor of (equivalent) .decodebytes() -and .encodebytes(), and were eventually removed in Python 3.9. - -While at it, replace most of their uses with base64.b64encode() -and .b64decode() that are preferable to the former wrt ticket #6446, -and they do not introduce line breaks that the twisted code usually -discarded. - -Use .decodebytes() and .encodebytes() in DirDBM as it seems to rely -on the exact presence of newlines, and changing that would break -backwards compatibility. - -Fixes: ticket:6446 -Fixes: ticket:9831 ---- - src/twisted/conch/scripts/tkconch.py | 2 +- - src/twisted/conch/test/test_keys.py | 2 +- - src/twisted/mail/pop3.py | 4 ++-- - src/twisted/mail/test/test_pop3.py | 4 ++-- - src/twisted/persisted/dirdbm.py | 10 ++++++++-- - src/twisted/web/http.py | 2 +- - src/twisted/web/test/test_http.py | 6 +++--- - 14 files changed, 18 insertions(+), 12 deletions(-) - -diff --git a/src/twisted/conch/scripts/tkconch.py b/src/twisted/conch/scripts/tkconch.py -index 9c48e8a7f..5e007ebdc 100644 ---- a/src/twisted/conch/scripts/tkconch.py -+++ b/src/twisted/conch/scripts/tkconch.py -@@ -409,7 +409,7 @@ class SSHClientTransport(transport.SSHClientTransport): - "known hosts.\r\n" % - (khHost, {b'ssh-dss':'DSA', b'ssh-rsa':'RSA'}[keyType])) - with open(os.path.expanduser('~/.ssh/known_hosts'), 'a') as known_hosts: -- encodedKey = base64.encodestring(pubKey).replace(b'\n', b'') -+ encodedKey = base64.b64encode(pubKey) - known_hosts.write('\n%s %s %s' % (khHost, keyType, encodedKey)) - except: - log.deferr() -diff --git a/src/twisted/conch/test/test_keys.py b/src/twisted/conch/test/test_keys.py -index 41e49f415..795e7b8d7 100644 ---- a/src/twisted/conch/test/test_keys.py -+++ b/src/twisted/conch/test/test_keys.py -@@ -352,7 +352,7 @@ SUrCyZXsNh6VXwjs3gKQ - - self.assertRaises( - keys.BadKeyError, -- keys.Key.fromString, data=b'{' + base64.encodestring(sexp) + b'}', -+ keys.Key.fromString, data=b'{' + base64.b64encode(sexp) + b'}', - ) - - -diff --git a/src/twisted/mail/pop3.py b/src/twisted/mail/pop3.py -index ffe9714c9..057389e3a 100644 ---- a/src/twisted/mail/pop3.py -+++ b/src/twisted/mail/pop3.py -@@ -728,7 +728,7 @@ class POP3(basic.LineOnlyReceiver, policies.TimeoutMixin): - self._auth = auth() - chal = self._auth.getChallenge() - -- self.sendLine(b'+ ' + base64.encodestring(chal).rstrip(b'\n')) -+ self.sendLine(b'+ ' + base64.b64encode(chal)) - self.state = 'AUTH' - - -@@ -747,7 +747,7 @@ class POP3(basic.LineOnlyReceiver, policies.TimeoutMixin): - """ - self.state = "COMMAND" - try: -- parts = base64.decodestring(line).split(None, 1) -+ parts = base64.b64decode(line).split(None, 1) - except binascii.Error: - self.failResponse(b"Invalid BASE64 encoding") - else: -diff --git a/src/twisted/mail/test/test_pop3.py b/src/twisted/mail/test/test_pop3.py -index ea513487c..36780d9c9 100644 ---- a/src/twisted/mail/test/test_pop3.py -+++ b/src/twisted/mail/test/test_pop3.py -@@ -1097,12 +1097,12 @@ class SASLTests(unittest.TestCase): - - p.lineReceived(b"AUTH CRAM-MD5") - chal = s.getvalue().splitlines()[-1][2:] -- chal = base64.decodestring(chal) -+ chal = base64.b64decode(chal) - response = hmac.HMAC(b'testpassword', chal, - digestmod=md5).hexdigest().encode("ascii") - - p.lineReceived( -- base64.encodestring(b'testuser ' + response).rstrip(b'\n')) -+ base64.b64encode(b'testuser ' + response)) - self.assertTrue(p.mbox) - self.assertTrue(s.getvalue().splitlines()[-1].find(b"+OK") >= 0) - p.connectionLost(failure.Failure(Exception("Test harness disconnect"))) -diff --git a/src/twisted/persisted/dirdbm.py b/src/twisted/persisted/dirdbm.py -index f97c526d0..d9f29cce2 100644 ---- a/src/twisted/persisted/dirdbm.py -+++ b/src/twisted/persisted/dirdbm.py -@@ -81,14 +81,20 @@ class DirDBM: - Encode a key so it can be used as a filename. - """ - # NOTE: '_' is NOT in the base64 alphabet! -- return base64.encodestring(k).replace(b'\n', b'_').replace(b"/", b"-") -+ try: -+ return base64.encodebytes(k).replace(b'\n', b'_').replace(b"/", b"-") -+ except AttributeError: -+ return base64.encodestring(k).replace(b'\n', b'_').replace(b"/", b"-") - - - def _decode(self, k): - """ - Decode a filename to get the key. - """ -- return base64.decodestring(k.replace(b'_', b'\n').replace(b"-", b"/")) -+ try: -+ return base64.decodebytes(k.replace(b'_', b'\n').replace(b"-", b"/")) -+ except AttributeError: -+ return base64.decodestring(k.replace(b'_', b'\n').replace(b"-", b"/")) - - - def _readFile(self, path): -diff --git a/src/twisted/web/http.py b/src/twisted/web/http.py -index fe88d3373..602a58f31 100644 ---- a/src/twisted/web/http.py -+++ b/src/twisted/web/http.py -@@ -1540,7 +1540,7 @@ class Request: - bas, upw = authh.split() - if bas.lower() != b"basic": - raise ValueError() -- upw = base64.decodestring(upw) -+ upw = base64.b64decode(upw) - self.user, self.password = upw.split(b':', 1) - except (binascii.Error, ValueError): - self.user = self.password = "" -diff --git a/src/twisted/web/test/test_http.py b/src/twisted/web/test/test_http.py -index 6001d1e40..70065e232 100644 ---- a/src/twisted/web/test/test_http.py -+++ b/src/twisted/web/test/test_http.py -@@ -1513,7 +1513,7 @@ class ParsingTests(unittest.TestCase): - requests.append(self) - - for u, p in [(b"foo", b"bar"), (b"hello", b"there:z")]: -- s = base64.encodestring(b":".join((u, p))).strip() -+ s = base64.b64encode(b":".join((u, p))) - f = b"GET / HTTP/1.0\nAuthorization: Basic " + s + b"\n\n" - self.runRequest(f, Request, 0) - req = requests.pop() -@@ -2139,9 +2139,9 @@ Hello, - - u = b"foo" - p = b"bar" -- s = base64.encodestring(b":".join((u, p))).strip() -+ s = base64.b64encode(b":".join((u, p))) - f = b"GET / HTTP/1.0\nAuthorization: Basic " + s + b"\n\n" -- self.patch(base64, 'decodestring', lambda x: []) -+ self.patch(base64, 'b64decode', lambda x: []) - self.runRequest(f, Request, 0) - req = requests.pop() - self.assertEqual(('', ''), req.credentials) --- -2.26.2 - diff --git a/dev-python/twisted/files/twisted-20.3.0-py38-cgi.patch b/dev-python/twisted/files/twisted-20.3.0-py38-cgi.patch deleted file mode 100644 index 5151f297f7f4..000000000000 --- a/dev-python/twisted/files/twisted-20.3.0-py38-cgi.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 62ab0203c59c1f9788c53dfad4a212774094d05c Mon Sep 17 00:00:00 2001 -From: Craig Rodrigues <rodrigc@FreeBSD.org> -Date: Mon, 13 Apr 2020 01:22:23 -0700 -Subject: [PATCH 2/2] Merge 9801-rodrigc-cgi: Change import of cgi.parse_qs to - urllib.parse.parse_qs - -Author: rodrigc -Reviewer: hawkowl -Fixes: ticket:9801 ---- - src/twisted/web/client.py | 17 ++++----- - src/twisted/web/http.py | 49 ++++++++++++------------- - src/twisted/web/newsfragments/9801.misc | 0 - src/twisted/web/test/test_http.py | 41 +++------------------ - src/twisted/web/test/test_webclient.py | 5 +-- - 5 files changed, 38 insertions(+), 74 deletions(-) - create mode 100644 src/twisted/web/newsfragments/9801.misc - -diff --git a/src/twisted/web/client.py b/src/twisted/web/client.py -index 7e4642ef3..8209f5a5e 100644 ---- a/src/twisted/web/client.py -+++ b/src/twisted/web/client.py -@@ -12,15 +12,8 @@ import os - import collections - import warnings - --try: -- from urlparse import urlunparse, urljoin, urldefrag --except ImportError: -- from urllib.parse import urljoin, urldefrag -- from urllib.parse import urlunparse as _urlunparse -- -- def urlunparse(parts): -- result = _urlunparse(tuple([p.decode("charmap") for p in parts])) -- return result.encode("charmap") -+from urllib.parse import urljoin, urldefrag -+from urllib.parse import urlunparse as _urlunparse - - import zlib - from functools import wraps -@@ -51,6 +44,12 @@ from twisted.web._newclient import _ensureValidURI, _ensureValidMethod - - - -+def urlunparse(parts): -+ result = _urlunparse(tuple([p.decode("charmap") for p in parts])) -+ return result.encode("charmap") -+ -+ -+ - class PartialDownloadError(error.Error): - """ - Page was only partially downloaded, we got disconnected in middle. -diff --git a/src/twisted/web/http.py b/src/twisted/web/http.py -index b7afa8b0d..94d0ae81f 100644 ---- a/src/twisted/web/http.py -+++ b/src/twisted/web/http.py -@@ -66,27 +66,10 @@ import time - import calendar - import warnings - import os --from io import BytesIO as StringIO -- --try: -- from urlparse import ( -- ParseResult as ParseResultBytes, urlparse as _urlparse) -- from urllib import unquote -- from cgi import parse_header as _parseHeader --except ImportError: -- from urllib.parse import ( -- ParseResultBytes, urlparse as _urlparse, unquote_to_bytes as unquote) -- -- def _parseHeader(line): -- # cgi.parse_header requires a str -- key, pdict = cgi.parse_header(line.decode('charmap')) -- -- # We want the key as bytes, and cgi.parse_multipart (which consumes -- # pdict) expects a dict of str keys but bytes values -- key = key.encode('charmap') -- pdict = {x:y.encode('charmap') for x, y in pdict.items()} -- return (key, pdict) -+from io import BytesIO - -+from urllib.parse import ( -+ ParseResultBytes, urlparse as _urlparse, unquote_to_bytes as unquote) - - from zope.interface import Attribute, Interface, implementer, provider - -@@ -163,6 +146,20 @@ monthname = [None, - weekdayname_lower = [name.lower() for name in weekdayname] - monthname_lower = [name and name.lower() for name in monthname] - -+ -+ -+def _parseHeader(line): -+ # cgi.parse_header requires a str -+ key, pdict = cgi.parse_header(line.decode('charmap')) -+ -+ # We want the key as bytes, and cgi.parse_multipart (which consumes -+ # pdict) expects a dict of str keys but bytes values -+ key = key.encode('charmap') -+ pdict = {x: y.encode('charmap') for x, y in pdict.items()} -+ return (key, pdict) -+ -+ -+ - def urlparse(url): - """ - Parse an URL into six components. -@@ -486,13 +483,15 @@ class _IDeprecatedHTTPChannelToRequestInterface(Interface): - - class StringTransport: - """ -- I am a StringIO wrapper that conforms for the transport API. I support -+ I am a BytesIO wrapper that conforms for the transport API. I support - the `writeSequence' method. - """ - def __init__(self): -- self.s = StringIO() -+ self.s = BytesIO() -+ - def writeSequence(self, seq): - self.s.write(b''.join(seq)) -+ - def __getattr__(self, attr): - return getattr(self.__dict__['s'], attr) - -@@ -513,7 +512,7 @@ class HTTPClient(basic.LineReceiver): - @type firstLine: C{bool} - - @ivar __buffer: The buffer that stores the response to the HTTP request. -- @type __buffer: A C{StringIO} object. -+ @type __buffer: A C{BytesIO} object. - - @ivar _header: Part or all of an HTTP request header. - @type _header: C{bytes} -@@ -579,7 +578,7 @@ class HTTPClient(basic.LineReceiver): - if self._header != b"": - # Only extract headers if there are any - self.extractHeader(self._header) -- self.__buffer = StringIO() -+ self.__buffer = BytesIO() - self.handleEndHeaders() - self.setRawMode() - return -@@ -665,7 +664,7 @@ def _getContentFile(length): - Get a writeable file-like object to which request content can be written. - """ - if length is not None and length < 100000: -- return StringIO() -+ return BytesIO() - return tempfile.TemporaryFile() - - -diff --git a/src/twisted/web/newsfragments/9801.misc b/src/twisted/web/newsfragments/9801.misc -new file mode 100644 -index 000000000..e69de29bb -diff --git a/src/twisted/web/test/test_http.py b/src/twisted/web/test/test_http.py -index a3067f732..4189b307c 100644 ---- a/src/twisted/web/test/test_http.py -+++ b/src/twisted/web/test/test_http.py -@@ -9,15 +9,11 @@ from __future__ import absolute_import, division - - import base64 - import calendar --import cgi - import random - - import hamcrest - --try: -- from urlparse import urlparse, urlunsplit, clear_cache --except ImportError: -- from urllib.parse import urlparse, urlunsplit, clear_cache -+from urllib.parse import urlparse, urlunsplit, clear_cache, parse_qs - - from io import BytesIO - from itertools import cycle -@@ -28,7 +24,7 @@ from zope.interface import ( - ) - from zope.interface.verify import verifyObject - --from twisted.python.compat import (_PY3, iterbytes, long, networkString, -+from twisted.python.compat import (iterbytes, long, networkString, - unicode, intToBytes) - from twisted.python.components import proxyForInterface - from twisted.python.failure import Failure -@@ -2019,33 +2015,6 @@ Content-Type: application/x-www-form-urlencoded - self.assertEqual(content, [networkString(query)]) - - -- def test_missingContentDisposition(self): -- """ -- If the C{Content-Disposition} header is missing, the request is denied -- as a bad request. -- """ -- req = b'''\ --POST / HTTP/1.0 --Content-Type: multipart/form-data; boundary=AaB03x --Content-Length: 103 -- ----AaB03x --Content-Type: text/plain --Content-Transfer-Encoding: quoted-printable -- --abasdfg ----AaB03x-- --''' -- channel = self.runRequest(req, http.Request, success=False) -- self.assertEqual( -- channel.transport.value(), -- b"HTTP/1.1 400 Bad Request\r\n\r\n") -- -- if _PY3: -- test_missingContentDisposition.skip = ( -- "cgi.parse_multipart is much more error-tolerant on Python 3.") -- -- - def test_multipartProcessingFailure(self): - """ - When the multipart processing fails the client gets a 400 Bad Request. -@@ -2373,15 +2342,15 @@ ok - class QueryArgumentsTests(unittest.TestCase): - def testParseqs(self): - self.assertEqual( -- cgi.parse_qs(b"a=b&d=c;+=f"), -+ parse_qs(b"a=b&d=c;+=f"), - http.parse_qs(b"a=b&d=c;+=f")) - self.assertRaises( - ValueError, http.parse_qs, b"blah", strict_parsing=True) - self.assertEqual( -- cgi.parse_qs(b"a=&b=c", keep_blank_values=1), -+ parse_qs(b"a=&b=c", keep_blank_values=1), - http.parse_qs(b"a=&b=c", keep_blank_values=1)) - self.assertEqual( -- cgi.parse_qs(b"a=&b=c"), -+ parse_qs(b"a=&b=c"), - http.parse_qs(b"a=&b=c")) - - -diff --git a/src/twisted/web/test/test_webclient.py b/src/twisted/web/test/test_webclient.py -index 680e02780..672594993 100644 ---- a/src/twisted/web/test/test_webclient.py -+++ b/src/twisted/web/test/test_webclient.py -@@ -11,10 +11,7 @@ import io - import os - from errno import ENOSPC - --try: -- from urlparse import urlparse, urljoin --except ImportError: -- from urllib.parse import urlparse, urljoin -+from urllib.parse import urlparse, urljoin - - from twisted.python.compat import networkString, nativeString, intToBytes - from twisted.trial import unittest, util --- -2.26.2 - diff --git a/dev-python/twisted/files/twisted-20.3.0-py38-hmac.patch b/dev-python/twisted/files/twisted-20.3.0-py38-hmac.patch deleted file mode 100644 index 1c1ee01b2187..000000000000 --- a/dev-python/twisted/files/twisted-20.3.0-py38-hmac.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 653fb2aea0ca1f60558917d52f4ff0c33cd7b067 Mon Sep 17 00:00:00 2001 -From: Craig Rodrigues <rodrigc@crodrigues.org> -Date: Sun, 12 Apr 2020 14:28:23 -0700 -Subject: [PATCH 1/2] Add digestmod parameter to HMAC.__init__() invocations - -This parameter is now required on Python 3.8+ ---- - src/twisted/cred/credentials.py | 3 ++- - src/twisted/cred/test/test_cramauth.py | 11 ++++++++--- - src/twisted/mail/test/test_pop3.py | 4 +++- - 3 files changed, 13 insertions(+), 5 deletions(-) - -diff --git a/src/twisted/cred/credentials.py b/src/twisted/cred/credentials.py -index 5469e5158..67c24cb01 100644 ---- a/src/twisted/cred/credentials.py -+++ b/src/twisted/cred/credentials.py -@@ -441,7 +441,8 @@ class CramMD5Credentials(object): - - - def checkPassword(self, password): -- verify = hexlify(hmac.HMAC(password, self.challenge).digest()) -+ verify = hexlify(hmac.HMAC(password, self.challenge, -+ digestmod=md5).digest()) - return verify == self.response - - -diff --git a/src/twisted/cred/test/test_cramauth.py b/src/twisted/cred/test/test_cramauth.py -index 1ee08712b..d21f2f68c 100644 ---- a/src/twisted/cred/test/test_cramauth.py -+++ b/src/twisted/cred/test/test_cramauth.py -@@ -7,6 +7,8 @@ Tests for L{twisted.cred}'s implementation of CRAM-MD5. - - from __future__ import division, absolute_import - -+import hashlib -+ - from hmac import HMAC - from binascii import hexlify - -@@ -39,7 +41,8 @@ class CramMD5CredentialsTests(TestCase): - """ - c = CramMD5Credentials() - chal = c.getChallenge() -- c.response = hexlify(HMAC(b'secret', chal).digest()) -+ c.response = hexlify(HMAC(b'secret', chal, -+ digestmod=hashlib.md5).digest()) - self.assertTrue(c.checkPassword(b'secret')) - - -@@ -61,7 +64,8 @@ class CramMD5CredentialsTests(TestCase): - """ - c = CramMD5Credentials() - chal = c.getChallenge() -- c.response = hexlify(HMAC(b'thewrongsecret', chal).digest()) -+ c.response = hexlify(HMAC(b'thewrongsecret', chal, -+ digestmod=hashlib.md5).digest()) - self.assertFalse(c.checkPassword(b'secret')) - - -@@ -75,7 +79,8 @@ class CramMD5CredentialsTests(TestCase): - chal = c.getChallenge() - c.setResponse(b" ".join( - (b"squirrel", -- hexlify(HMAC(b'supersecret', chal).digest())))) -+ hexlify(HMAC(b'supersecret', chal, -+ digestmod=hashlib.md5).digest())))) - self.assertTrue(c.checkPassword(b'supersecret')) - self.assertEqual(c.username, b"squirrel") - -diff --git a/src/twisted/mail/test/test_pop3.py b/src/twisted/mail/test/test_pop3.py -index 4a59c3b49..ea513487c 100644 ---- a/src/twisted/mail/test/test_pop3.py -+++ b/src/twisted/mail/test/test_pop3.py -@@ -11,6 +11,7 @@ import hmac - import base64 - import itertools - -+from hashlib import md5 - from collections import OrderedDict - from io import BytesIO - -@@ -1097,7 +1098,8 @@ class SASLTests(unittest.TestCase): - p.lineReceived(b"AUTH CRAM-MD5") - chal = s.getvalue().splitlines()[-1][2:] - chal = base64.decodestring(chal) -- response = hmac.HMAC(b'testpassword', chal).hexdigest().encode("ascii") -+ response = hmac.HMAC(b'testpassword', chal, -+ digestmod=md5).hexdigest().encode("ascii") - - p.lineReceived( - base64.encodestring(b'testuser ' + response).rstrip(b'\n')) --- -2.26.2 - diff --git a/dev-python/twisted/files/twisted-20.3.0-py39-b64.patch b/dev-python/twisted/files/twisted-20.3.0-py39-b64.patch deleted file mode 100644 index f475614df408..000000000000 --- a/dev-python/twisted/files/twisted-20.3.0-py39-b64.patch +++ /dev/null @@ -1,158 +0,0 @@ -From f44c2ff111a8961d295409186cc07aaf414c76bc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 27 May 2020 13:23:37 +0200 -Subject: [PATCH 1/4] Replace base64.*string() functions to fix py3.9 support - -Replace base64.decodestring() and .encodestring() functions as they -were deprecated since Python 3.1 in favor of (equivalent) .decodebytes() -and .encodebytes(), and were eventually removed in Python 3.9. - -While at it, replace most of their uses with base64.b64encode() -and .b64decode() that are preferable to the former wrt ticket #6446, -and they do not introduce line breaks that the twisted code usually -discarded. - -Use .decodebytes() and .encodebytes() in DirDBM as it seems to rely -on the exact presence of newlines, and changing that would break -backwards compatibility. - -Fixes: ticket:6446 -Fixes: ticket:9831 ---- - src/twisted/conch/scripts/tkconch.py | 2 +- - src/twisted/conch/test/test_keys.py | 2 +- - src/twisted/mail/pop3.py | 4 ++-- - src/twisted/mail/test/test_pop3.py | 4 ++-- - src/twisted/persisted/dirdbm.py | 4 ++-- - src/twisted/web/http.py | 2 +- - src/twisted/web/test/test_http.py | 6 +++--- - 14 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/twisted/conch/scripts/tkconch.py b/src/twisted/conch/scripts/tkconch.py -index a662cabc8..744734343 100644 ---- a/src/twisted/conch/scripts/tkconch.py -+++ b/src/twisted/conch/scripts/tkconch.py -@@ -412,7 +412,7 @@ class SSHClientTransport(transport.SSHClientTransport): - "known hosts.\r\n" % - (khHost, {b'ssh-dss':'DSA', b'ssh-rsa':'RSA'}[keyType])) - with open(os.path.expanduser('~/.ssh/known_hosts'), 'a') as known_hosts: -- encodedKey = base64.encodestring(pubKey).replace(b'\n', b'') -+ encodedKey = base64.b64encode(pubKey) - known_hosts.write('\n%s %s %s' % (khHost, keyType, encodedKey)) - except: - log.deferr() -diff --git a/src/twisted/conch/test/test_keys.py b/src/twisted/conch/test/test_keys.py -index 650a19bfb..f76cbd1b4 100644 ---- a/src/twisted/conch/test/test_keys.py -+++ b/src/twisted/conch/test/test_keys.py -@@ -404,7 +404,7 @@ SUrCyZXsNh6VXwjs3gKQ - - self.assertRaises( - keys.BadKeyError, -- keys.Key.fromString, data=b'{' + base64.encodestring(sexp) + b'}', -+ keys.Key.fromString, data=b'{' + base64.b64encode(sexp) + b'}', - ) - - -diff --git a/src/twisted/mail/pop3.py b/src/twisted/mail/pop3.py -index ffe9714c9..057389e3a 100644 ---- a/src/twisted/mail/pop3.py -+++ b/src/twisted/mail/pop3.py -@@ -728,7 +728,7 @@ class POP3(basic.LineOnlyReceiver, policies.TimeoutMixin): - self._auth = auth() - chal = self._auth.getChallenge() - -- self.sendLine(b'+ ' + base64.encodestring(chal).rstrip(b'\n')) -+ self.sendLine(b'+ ' + base64.b64encode(chal)) - self.state = 'AUTH' - - -@@ -747,7 +747,7 @@ class POP3(basic.LineOnlyReceiver, policies.TimeoutMixin): - """ - self.state = "COMMAND" - try: -- parts = base64.decodestring(line).split(None, 1) -+ parts = base64.b64decode(line).split(None, 1) - except binascii.Error: - self.failResponse(b"Invalid BASE64 encoding") - else: -diff --git a/src/twisted/mail/test/test_pop3.py b/src/twisted/mail/test/test_pop3.py -index f7fbfaf1e..af335ab2d 100644 ---- a/src/twisted/mail/test/test_pop3.py -+++ b/src/twisted/mail/test/test_pop3.py -@@ -1096,12 +1096,12 @@ class SASLTests(unittest.TestCase): - - p.lineReceived(b"AUTH CRAM-MD5") - chal = s.getvalue().splitlines()[-1][2:] -- chal = base64.decodestring(chal) -+ chal = base64.b64decode(chal) - response = hmac.HMAC(b'testpassword', chal, - digestmod=md5).hexdigest().encode("ascii") - - p.lineReceived( -- base64.encodestring(b'testuser ' + response).rstrip(b'\n')) -+ base64.b64encode(b'testuser ' + response)) - self.assertTrue(p.mbox) - self.assertTrue(s.getvalue().splitlines()[-1].find(b"+OK") >= 0) - p.connectionLost(failure.Failure(Exception("Test harness disconnect"))) -diff --git a/src/twisted/persisted/dirdbm.py b/src/twisted/persisted/dirdbm.py -index 3ba7a59d4..7659ff765 100644 ---- a/src/twisted/persisted/dirdbm.py -+++ b/src/twisted/persisted/dirdbm.py -@@ -77,14 +77,14 @@ class DirDBM: - Encode a key so it can be used as a filename. - """ - # NOTE: '_' is NOT in the base64 alphabet! -- return base64.encodestring(k).replace(b'\n', b'_').replace(b"/", b"-") -+ return base64.encodebytes(k).replace(b'\n', b'_').replace(b"/", b"-") - - - def _decode(self, k): - """ - Decode a filename to get the key. - """ -- return base64.decodestring(k.replace(b'_', b'\n').replace(b"-", b"/")) -+ return base64.decodebytes(k.replace(b'_', b'\n').replace(b"-", b"/")) - - - def _readFile(self, path): -diff --git a/src/twisted/web/http.py b/src/twisted/web/http.py -index 0e115741e..e9a080d21 100644 ---- a/src/twisted/web/http.py -+++ b/src/twisted/web/http.py -@@ -1544,7 +1544,7 @@ class Request: - bas, upw = authh.split() - if bas.lower() != b"basic": - raise ValueError() -- upw = base64.decodestring(upw) -+ upw = base64.b64decode(upw) - self.user, self.password = upw.split(b':', 1) - except (binascii.Error, ValueError): - self.user = self.password = b'' -diff --git a/src/twisted/web/test/test_http.py b/src/twisted/web/test/test_http.py -index 112e56f46..02a4674a7 100644 ---- a/src/twisted/web/test/test_http.py -+++ b/src/twisted/web/test/test_http.py -@@ -1604,7 +1604,7 @@ class ParsingTests(unittest.TestCase): - requests.append(self) - - for u, p in [(b"foo", b"bar"), (b"hello", b"there:z")]: -- s = base64.encodestring(b":".join((u, p))).strip() -+ s = base64.b64encode(b":".join((u, p))) - f = b"GET / HTTP/1.0\nAuthorization: Basic " + s + b"\n\n" - self.runRequest(f, Request, 0) - req = requests.pop() -@@ -2209,9 +2209,9 @@ Hello, - - u = b"foo" - p = b"bar" -- s = base64.encodestring(b":".join((u, p))).strip() -+ s = base64.b64encode(b":".join((u, p))) - f = b"GET / HTTP/1.0\nAuthorization: Basic " + s + b"\n\n" -- self.patch(base64, 'decodestring', lambda x: []) -+ self.patch(base64, 'b64decode', lambda x: []) - self.runRequest(f, Request, 0) - req = requests.pop() - self.assertEqual((b'', b''), req.credentials) --- -2.26.2 diff --git a/dev-python/twisted/files/twisted-20.3.0-py39-combined.patch b/dev-python/twisted/files/twisted-20.3.0-py39-combined.patch deleted file mode 100644 index 0ed1f7b8d9c6..000000000000 --- a/dev-python/twisted/files/twisted-20.3.0-py39-combined.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 2d30860a8b71e90513ead9958f5dd312802b0d36 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 27 May 2020 14:40:53 +0200 -Subject: [PATCH 2/4] Fix imap4-utf-7 codec lookup function for Python 3.9 - -Python 3.9 normalizes the codec name into 'imap4_utf_7' rather than -'imap4-utf-7', and therefore the lookup function needs to account -for the former name. Transform the latter locally to preserve support -for all Python versions. - -Fixes: ticket: 9832 ---- - src/twisted/mail/imap4.py | 2 +- - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/twisted/mail/imap4.py b/src/twisted/mail/imap4.py -index 736ef111d..3f32982ca 100644 ---- a/src/twisted/mail/imap4.py -+++ b/src/twisted/mail/imap4.py -@@ -6369,7 +6369,7 @@ _codecInfo = codecs.CodecInfo(encoder, decoder, StreamReader, StreamWriter) - - - def imap4_utf_7(name): -- if name == 'imap4-utf-7': -+ if name.replace('-', '_') == 'imap4_utf_7': - return _codecInfo - - codecs.register(imap4_utf_7) --- -2.26.2 - -From daf928bf0f0371816dddbd4929948c4213d0cdcb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 27 May 2020 15:12:54 +0200 -Subject: [PATCH 3/4] Fix verifyCryptedPassword() for crypt.crypt() throwing in - py3.9 - -In Python 3.9, the crypt.crypt() function may throw an exception -if the underlying crypt() function fails. Update -verifyCryptedPassword() to account for that, and preserve the existing -behavior of returning False in that case. - -Fixes: ticket:9833 ---- - src/twisted/conch/checkers.py | 5 ++++- - src/twisted/plugins/cred_unix.py | 5 ++++- - 4 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/twisted/conch/checkers.py b/src/twisted/conch/checkers.py -index 917567a39..e4e327b16 100644 ---- a/src/twisted/conch/checkers.py -+++ b/src/twisted/conch/checkers.py -@@ -53,7 +53,10 @@ def verifyCryptedPassword(crypted, pw): - - @rtype: L{bool} - """ -- return crypt.crypt(pw, crypted) == crypted -+ try: -+ return crypt.crypt(pw, crypted) == crypted -+ except OSError: -+ return False - - - -diff --git a/src/twisted/plugins/cred_unix.py b/src/twisted/plugins/cred_unix.py -index 211b4ccbc..a662719b6 100644 ---- a/src/twisted/plugins/cred_unix.py -+++ b/src/twisted/plugins/cred_unix.py -@@ -43,7 +43,10 @@ def verifyCryptedPassword(crypted, pw): - pw = pw.decode('utf-8') - if not isinstance(crypted, StringType): - crypted = crypted.decode('utf-8') -- return crypt.crypt(pw, crypted) == crypted -+ try: -+ return crypt.crypt(pw, crypted) == crypted -+ except OSError: -+ return False - - - --- -2.26.2 - -From 4fc435df0d1eba3e5d6416a2b86d39d3404f82fe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 27 May 2020 15:37:10 +0200 -Subject: [PATCH 4/4] Use xml.etree.ElementTree instead of deprecated - cElementTree - -The xml.etree.cElementTree is deprecated, and has been removed in Python -3.9. At the same time, xml.etree.ElementTree has already been using -cElementTree implicitly since Python 3.3. Update test_flatten to use -the latter to provide compatibility with newer Python versions. - -Fixes: ticket:9834 ---- - src/twisted/web/test/test_flatten.py | 2 +- - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/twisted/web/test/test_flatten.py b/src/twisted/web/test/test_flatten.py -index 677401c55..61d50e20a 100644 ---- a/src/twisted/web/test/test_flatten.py -+++ b/src/twisted/web/test/test_flatten.py -@@ -9,7 +9,7 @@ L{twisted.web._flatten}. - import sys - import traceback - --from xml.etree.cElementTree import XML -+from xml.etree.ElementTree import XML - - from collections import OrderedDict - --- -2.26.2 - diff --git a/dev-python/twisted/twisted-19.10.0.ebuild b/dev-python/twisted/twisted-19.10.0.ebuild deleted file mode 100644 index 43ca32a4cac6..000000000000 --- a/dev-python/twisted/twisted-19.10.0.ebuild +++ /dev/null @@ -1,194 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8,9,10} ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 virtualx - -TWISTED_PN="Twisted" -TWISTED_P="${TWISTED_PN}-${PV}" -TWISTED_RELEASE=$(ver_cut 1-2) - -DESCRIPTION="An asynchronous networking framework written in Python" -HOMEPAGE="https://www.twistedmatrix.com/trac/" -SRC_URI="https://twistedmatrix.com/Releases/${TWISTED_PN}" -SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2 - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz" -S=${WORKDIR}/${TWISTED_P} - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" - -LICENSE="MIT" -SLOT="0" -IUSE="conch crypt http2 serial test" -RESTRICT="!test? ( test )" - -RDEPEND=" - >=dev-python/attrs-17.4.0[${PYTHON_USEDEP}] - >=dev-python/automat-0.3.0[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}] - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}] - >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] - >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}] - conch? ( - dev-python/pyasn1[${PYTHON_USEDEP}] - >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}] - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - ) - crypt? ( - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - >=dev-python/idna-0.6[${PYTHON_USEDEP}] - ) - serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] ) - http2? ( - >=dev-python/hyper-h2-3.0.0[${PYTHON_USEDEP}] - <dev-python/hyper-h2-4.0.0[${PYTHON_USEDEP}] - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] - <dev-python/priority-2.0[${PYTHON_USEDEP}] - ) - !dev-python/twisted-core - !dev-python/twisted-conch - !dev-python/twisted-lore - !dev-python/twisted-mail - !dev-python/twisted-names - !dev-python/twisted-news - !dev-python/twisted-pair - !dev-python/twisted-runner - !dev-python/twisted-words - !dev-python/twisted-web -" -DEPEND=" - dev-python/bcrypt - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}] - test? ( - dev-python/gmpy[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - net-misc/openssh - ) -" - -python_prepare_all() { - local PATCHES=( - "${FILESDIR}"/${P}-py38.patch - "${FILESDIR}"/twisted-19.10.0-py38-cgi.patch - "${FILESDIR}"/twisted-20.3.0-py38-hmac.patch - "${FILESDIR}"/twisted-19.10.0-py39-b64.patch - "${FILESDIR}"/twisted-20.3.0-py39-combined.patch - ) - - # upstream test for making releases; not very useful and requires - # sphinx (including on py2) - rm src/twisted/python/test/test_release.py || die - - # Conch doesn't work with latest >=OpenSSH 7.6 - # - https://twistedmatrix.com/trac/ticket/9311 - # - https://twistedmatrix.com/trac/ticket/9515 - rm src/twisted/conch/test/test_ckeygen.py || die - rm src/twisted/conch/test/test_conch.py || die - rm src/twisted/conch/test/test_cftp.py || die - - # puts system in EMFILE state, then the exception handler may fail - # trying to open more files due to some gi magic - sed -e '/SKIP_EMFILE/s:None:"Fails on non-pristine systems":' \ - -i src/twisted/internet/test/test_tcp.py || die - - # TODO: times out, i can't find where to increase the timeout - sed -e 's:test_manyProcesses:_&:' \ - -i src/twisted/test/test_process.py || die - - # multicast tests fail within network-sandbox - sed -e 's:test_joinLeave:_&:' \ - -e 's:test_loopback:_&:' \ - -e 's:test_multiListen:_&:' \ - -e 's:test_multicast:_&:' \ - -i src/twisted/test/test_udp.py || die - - # accesses /dev/net/tun - sed -e '/class RealDeviceTestsMixin/a\ - skip = "Requires extra permissions"' \ - -i src/twisted/pair/test/test_tuntap.py || die - - # TODO: figure it out, probably doesn't accept DST date here - sed -e 's:test_getTimezoneOffsetWithoutDaylightSavingTime:_&:' \ - -i src/twisted/test/test_log.py || die - - # TODO: failures specific to Python 2 - sed -e 's:testLookupProcNetTcp:_&:' \ - -i src/twisted/test/test_ident.py || die - sed -e 's:test_loggingFactoryOpensLogfileAutomatically:_&:' \ - -i src/twisted/test/test_policies.py || die - - distutils-r1_python_prepare_all -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - # TODO: upstream seems to override our build paths - distutils_install_for_testing - - "${EPYTHON}" -m twisted.trial twisted || - die "Tests failed with ${EPYTHON}" -} - -python_install() { - distutils-r1_python_install - - cd "${D}$(python_get_sitedir)" || die - - # own the dropin.cache so we don't leave orphans - touch twisted/plugins/dropin.cache || die - - python_doscript "${WORKDIR}"/twisted-regen-cache -} - -python_install_all() { - distutils-r1_python_install_all - - newconfd "${FILESDIR}/twistd.conf" twistd - newinitd "${FILESDIR}/twistd.init" twistd -} - -python_postinst() { - twisted-regen-cache || die -} - -pkg_postinst() { - python_foreach_impl python_postinst - - einfo "Install complete" - if use test ; then - einfo "" - einfo "Some tests have been disabled during testing due to" - einfo "known incompatibilities with the emerge sandboxes and/or" - einfo "not runnable as the root user." - einfo "For a complete test suite run on the code." - einfo "Run the tests as a normal user for each python it is installed to." - einfo " ie: $ python3.6 /usr/bin/trial twisted" - fi -} - -python_postrm() { - rm -f "${ROOT}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die -} - -pkg_postrm() { - # if we're removing the last version, remove the cache file - if [[ ! ${REPLACING_VERSIONS} ]]; then - python_foreach_impl python_postrm - fi -} diff --git a/dev-python/twisted/twisted-20.3.0.ebuild b/dev-python/twisted/twisted-20.3.0.ebuild deleted file mode 100644 index eee0b73cbb3a..000000000000 --- a/dev-python/twisted/twisted-20.3.0.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8,9,10} ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 virtualx - -TWISTED_PN="Twisted" -TWISTED_P="${TWISTED_PN}-${PV}" -TWISTED_RELEASE=$(ver_cut 1-2) - -DESCRIPTION="An asynchronous networking framework written in Python" -HOMEPAGE="https://www.twistedmatrix.com/trac/" -SRC_URI="https://twistedmatrix.com/Releases/${TWISTED_PN}" -SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2 - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz" - -KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" - -LICENSE="MIT" -SLOT="0" -IUSE="conch crypt http2 serial test" -RESTRICT="!test? ( test )" - -RDEPEND=" - >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] - >=dev-python/automat-0.3.0[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}] - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}] - >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] - >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}] - conch? ( - dev-python/pyasn1[${PYTHON_USEDEP}] - >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}] - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - ) - crypt? ( - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - >=dev-python/idna-0.6[${PYTHON_USEDEP}] - ) - serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] ) - http2? ( - >=dev-python/hyper-h2-3.0.0[${PYTHON_USEDEP}] - <dev-python/hyper-h2-4.0.0[${PYTHON_USEDEP}] - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] - <dev-python/priority-2.0[${PYTHON_USEDEP}] - ) - !dev-python/twisted-core - !dev-python/twisted-conch - !dev-python/twisted-lore - !dev-python/twisted-mail - !dev-python/twisted-names - !dev-python/twisted-news - !dev-python/twisted-pair - !dev-python/twisted-runner - !dev-python/twisted-words - !dev-python/twisted-web -" -DEPEND=" - dev-python/bcrypt - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}] - test? ( - dev-python/gmpy[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - net-misc/openssh - ) -" - -S=${WORKDIR}/${TWISTED_P} - -python_prepare_all() { - local PATCHES=( - "${FILESDIR}"/twisted-20.3.0-py38-cgi.patch - "${FILESDIR}"/twisted-20.3.0-py38-hmac.patch - "${FILESDIR}"/twisted-20.3.0-py39-b64.patch - "${FILESDIR}"/twisted-20.3.0-py39-combined.patch - ) - - # upstream test for making releases; not very useful and requires - # sphinx (including on py2) - rm src/twisted/python/test/test_release.py || die - - # Conch doesn't work with latest >=OpenSSH 7.6 - # - https://twistedmatrix.com/trac/ticket/9311 - # - https://twistedmatrix.com/trac/ticket/9515 - rm src/twisted/conch/test/test_ckeygen.py || die - rm src/twisted/conch/test/test_conch.py || die - rm src/twisted/conch/test/test_cftp.py || die - - # puts system in EMFILE state, then the exception handler may fail - # trying to open more files due to some gi magic - sed -e '/SKIP_EMFILE/s:None:"Fails on non-pristine systems":' \ - -i src/twisted/internet/test/test_tcp.py || die - - # multicast tests fail within network-sandbox - sed -e 's:test_joinLeave:_&:' \ - -e 's:test_loopback:_&:' \ - -e 's:test_multiListen:_&:' \ - -e 's:test_multicast:_&:' \ - -i src/twisted/test/test_udp.py || die - - # accesses /dev/net/tun - sed -e '/class RealDeviceTestsMixin/a\ - skip = "Requires extra permissions"' \ - -i src/twisted/pair/test/test_tuntap.py || die - - # TODO: figure it out, probably doesn't accept DST date here - sed -e 's:test_getTimezoneOffsetWithoutDaylightSavingTime:_&:' \ - -i src/twisted/test/test_log.py || die - - # TODO: failures specific to Python 2 - sed -e 's:testLookupProcNetTcp:_&:' \ - -i src/twisted/test/test_ident.py || die - sed -e 's:test_loggingFactoryOpensLogfileAutomatically:_&:' \ - -i src/twisted/test/test_policies.py || die - - distutils-r1_python_prepare_all -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - # TODO: upstream seems to override our build paths - distutils_install_for_testing - - "${EPYTHON}" -m twisted.trial twisted || - die "Tests failed with ${EPYTHON}" -} - -python_install() { - distutils-r1_python_install - - cd "${D}$(python_get_sitedir)" || die - - # own the dropin.cache so we don't leave orphans - touch twisted/plugins/dropin.cache || die - - python_doscript "${WORKDIR}"/twisted-regen-cache -} - -python_install_all() { - distutils-r1_python_install_all - - newconfd "${FILESDIR}/twistd.conf" twistd - newinitd "${FILESDIR}/twistd.init" twistd -} - -python_postinst() { - twisted-regen-cache || die -} - -pkg_postinst() { - python_foreach_impl python_postinst - - einfo "Install complete" - if use test ; then - einfo "" - einfo "Some tests have been disabled during testing due to" - einfo "known incompatibilities with the emerge sandboxes and/or" - einfo "not runnable as the root user." - einfo "For a complete test suite run on the code." - einfo "Run the tests as a normal user for each python it is installed to." - einfo " ie: $ python3.6 /usr/bin/trial twisted" - fi -} - -python_postrm() { - rm -f "${ROOT}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die -} - -pkg_postrm() { - # if we're removing the last version, remove the cache file - if [[ ! ${REPLACING_VERSIONS} ]]; then - python_foreach_impl python_postrm - fi -} diff --git a/dev-python/twisted/twisted-21.2.0-r1.ebuild b/dev-python/twisted/twisted-21.2.0-r1.ebuild index cfe3c8484e05..d16958b0fc47 100644 --- a/dev-python/twisted/twisted-21.2.0-r1.ebuild +++ b/dev-python/twisted/twisted-21.2.0-r1.ebuild @@ -17,7 +17,7 @@ S=${WORKDIR}/${PN}-${P} LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86" IUSE="conch crypt http2 serial test" RESTRICT="!test? ( test )" diff --git a/dev-python/wxpython/wxpython-4.0.7-r1.ebuild b/dev-python/wxpython/wxpython-4.0.7-r1.ebuild index a337b75f0d7f..956e122bccdd 100644 --- a/dev-python/wxpython/wxpython-4.0.7-r1.ebuild +++ b/dev-python/wxpython/wxpython-4.0.7-r1.ebuild @@ -18,7 +18,7 @@ SRC_URI="mirror://pypi/${P:0:1}/${MY_PN}/${MY_PN}-${MY_PV}.tar.gz" LICENSE="wxWinLL-3" SLOT="4.0" -KEYWORDS="~alpha amd64 arm ~arm64 ppc ~ppc64 ~riscv ~sparc x86" +KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 ~riscv ~sparc x86" IUSE="test webkit" # Tests broken: #726812, #722716 RESTRICT="test" |
