From cf6c341e8ec26f9a0ad0e2022abc4a633d489c35 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Mon, 30 Oct 2023 18:47:12 +0000 Subject: Adding metadata --- dev-python/PyQt5-stubs/Manifest | 1 + dev-python/PyQt5-stubs/PyQt5-stubs-5.15.2.0.ebuild | 31 + dev-python/PyQt5-stubs/metadata.xml | 10 + dev-python/PyQt5/PyQt5-5.15.10.ebuild | 2 +- dev-python/PyQt6-WebEngine/Manifest | 1 + .../PyQt6-WebEngine-6.5.0-r1.ebuild | 68 ++ .../PyQt6-WebEngine/PyQt6-WebEngine-6.5.0.ebuild | 65 -- .../PyQt6-WebEngine/PyQt6-WebEngine-6.6.0.ebuild | 68 ++ dev-python/PyQt6/Manifest | 1 + dev-python/PyQt6/PyQt6-6.6.0.ebuild | 173 +++++ dev-python/gmpy/Manifest | 1 + dev-python/gmpy/gmpy-2.1.5-r1.ebuild | 44 ++ dev-python/langdetect/Manifest | 2 - dev-python/langdetect/metadata.xml | 10 +- dev-python/python-telegram-bot/Manifest | 1 + ...ython-telegram-bot-20.6-no-internet-tests.patch | 718 +++++++++++++++++++++ .../python-telegram-bot-20.6.ebuild | 57 ++ 17 files changed, 1177 insertions(+), 76 deletions(-) create mode 100644 dev-python/PyQt5-stubs/Manifest create mode 100644 dev-python/PyQt5-stubs/PyQt5-stubs-5.15.2.0.ebuild create mode 100644 dev-python/PyQt5-stubs/metadata.xml create mode 100644 dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0-r1.ebuild delete mode 100644 dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0.ebuild create mode 100644 dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.6.0.ebuild create mode 100644 dev-python/PyQt6/PyQt6-6.6.0.ebuild create mode 100644 dev-python/gmpy/gmpy-2.1.5-r1.ebuild create mode 100644 dev-python/python-telegram-bot/files/python-telegram-bot-20.6-no-internet-tests.patch create mode 100644 dev-python/python-telegram-bot/python-telegram-bot-20.6.ebuild (limited to 'dev-python') diff --git a/dev-python/PyQt5-stubs/Manifest b/dev-python/PyQt5-stubs/Manifest new file mode 100644 index 000000000000..c5ff5ea262e9 --- /dev/null +++ b/dev-python/PyQt5-stubs/Manifest @@ -0,0 +1 @@ +DIST PyQt5-stubs-5.15.2.0.gh.tar.gz 344714 BLAKE2B 67e07fd5851748fb0f3161f82ccf699a69399da004f16daae3a3bd28c0a5ef49c91d14dfccc9b49d2071a727e3b7cff9540ffdb3c9751a341ed628dbea295010 SHA512 9b33a8f999b12e6cf73277835f72f303b243e33638c4f751ce5f6d5c8c50e30326b505f4235ea2cb09e46004186b92bc3ab320f5143a9899d99767cc0f173314 diff --git a/dev-python/PyQt5-stubs/PyQt5-stubs-5.15.2.0.ebuild b/dev-python/PyQt5-stubs/PyQt5-stubs-5.15.2.0.ebuild new file mode 100644 index 000000000000..6b294ada5630 --- /dev/null +++ b/dev-python/PyQt5-stubs/PyQt5-stubs-5.15.2.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) + +inherit distutils-r1 + +DESCRIPTION="Stubs for PyQt5" +HOMEPAGE=" + https://pypi.org/project/PyQt5-stubs/ + https://github.com/python-qt-tools/PyQt5-stubs + +" + +# no tests on pypi +SRC_URI="https://github.com/python-qt-tools/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="test? ( + dev-python/mypy[${PYTHON_USEDEP}] + dev-python/PyQt5[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest diff --git a/dev-python/PyQt5-stubs/metadata.xml b/dev-python/PyQt5-stubs/metadata.xml new file mode 100644 index 000000000000..56988650ec34 --- /dev/null +++ b/dev-python/PyQt5-stubs/metadata.xml @@ -0,0 +1,10 @@ + + + + + davidroman96@gmail.com + David Roman + + + gentoo-guru-overlay + \ No newline at end of file diff --git a/dev-python/PyQt5/PyQt5-5.15.10.ebuild b/dev-python/PyQt5/PyQt5-5.15.10.ebuild index 21af9dd97c3c..95032fc1a5da 100644 --- a/dev-python/PyQt5/PyQt5-5.15.10.ebuild +++ b/dev-python/PyQt5/PyQt5-5.15.10.ebuild @@ -85,7 +85,7 @@ RDEPEND=" " BDEPEND=" >=dev-python/PyQt-builder-1.14.1[${PYTHON_USEDEP}] - >=dev-python/sip-6.6.2[${PYTHON_USEDEP}] + >=dev-python/sip-6.7.12[${PYTHON_USEDEP}] >=dev-qt/qtcore-${QT_PV} dbus? ( virtual/pkgconfig ) " diff --git a/dev-python/PyQt6-WebEngine/Manifest b/dev-python/PyQt6-WebEngine/Manifest index 01f4f15e455f..5a707b0ef9bc 100644 --- a/dev-python/PyQt6-WebEngine/Manifest +++ b/dev-python/PyQt6-WebEngine/Manifest @@ -1 +1,2 @@ DIST PyQt6_WebEngine-6.5.0.tar.gz 31349 BLAKE2B 80ab4ad292107e5ca57c5b27f2af3747f9c28ebf2c1afe0f32fe1fbd6897dd701d7f46bda8f08c5f0048d4efef4c3c0087854acbc58a319163e328f74177b05c SHA512 bafa26cc800ec031fe9bb1e309832df79b41c5f43a6cdc8ecc2bc4b09c59b60975a67ede6190726db887689305e7a6012f705eb9b83c3e0c82a23f3f1c3880ff +DIST PyQt6_WebEngine-6.6.0.tar.gz 31817 BLAKE2B 3e795bda50d1a5874e6caec7f69370840913cbbb33662ddc5624f0437c765e3318a2b4233d8e9963145dbeef8a4edc559112f114b850d9879eecb9e3e6b6fd2e SHA512 30927b7728d68cbeff6346234e131f96dfcd4b2af503d27d2f0a1eee584b5a928ac4fe1f66019c90aaf1ccd66fffe2edaf55de86d9aa0c83518c45669613bc0d diff --git a/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0-r1.ebuild b/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0-r1.ebuild new file mode 100644 index 000000000000..bb19754cdb35 --- /dev/null +++ b/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=sip +PYPI_NO_NORMALIZE=1 +PYPI_PN=${PN/-/_} +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) +inherit distutils-r1 flag-o-matic multiprocessing pypi qmake-utils + +QT_PV=$(ver_cut 1-2):6 + +DESCRIPTION="Python bindings for QtWebEngine" +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqtwebengine/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64" +IUSE="debug quick +widgets" + +RDEPEND=" + >=dev-python/PyQt6-${PV}[gui,ssl,${PYTHON_USEDEP}] + >=dev-qt/qtbase-${QT_PV}[gui,widgets?] + >=dev-qt/qtwebengine-${QT_PV}[widgets] + quick? ( + dev-python/PyQt6[qml] + >=dev-qt/qtwebengine-${QT_PV}[qml(+)] + ) + widgets? ( dev-python/PyQt6[network,printsupport,webchannel,widgets] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-python/PyQt-builder-1.15[${PYTHON_USEDEP}] + >=dev-qt/qtbase-${QT_PV} +" + +src_prepare() { + default + + # hack: qmake queries g++ or clang++ for info depending on which qtbase was + # built with, but ignores CHOST failing with -native-symlinks (bug #726112) + # and potentially using wrong information when cross-compiling + mkdir "${T}"/cxx || die + local cxx + ! cxx=$(type -P "${CHOST}"-g++) || ln -s -- "${cxx}" "${T}"/cxx/g++ || die + ! cxx=$(type -P "${CHOST}"-clang++) || ln -s -- "${cxx}" "${T}"/cxx/clang++ || die + PATH=${T}/cxx:${PATH} +} + +python_configure_all() { + append-cxxflags -std=c++17 # for old gcc / clang that use <17 (bug #892331) + append-cxxflags ${CPPFLAGS} # respect CPPFLAGS notably for DISTUTILS_EXT=1 + + DISTUTILS_ARGS=( + --jobs="$(makeopts_jobs)" + --qmake="$(qt6_get_bindir)"/qmake + --qmake-setting="$(qt6_get_qmake_args)" + --verbose + + --enable=QtWebEngineCore + $(usex quick --{enable,disable}=QtWebEngineQuick) + $(usex widgets --{enable,disable}=QtWebEngineWidgets) + + $(usev debug '--debug --qml-debug --tracing') + ) +} diff --git a/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0.ebuild b/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0.ebuild deleted file mode 100644 index 70987dcd853f..000000000000 --- a/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.5.0.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -DISTUTILS_USE_PEP517=sip -PYPI_NO_NORMALIZE=1 -PYPI_PN=${PN/-/_} -PYTHON_COMPAT=( python3_{8,9,10,11,12} ) -inherit distutils-r1 flag-o-matic multiprocessing pypi qmake-utils - -QT_PV=$(ver_cut 1-2):6 - -DESCRIPTION="Python bindings for QtWebEngine" -HOMEPAGE="https://www.riverbankcomputing.com/software/pyqtwebengine/" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64" -IUSE="debug quick +widgets" - -RDEPEND=" - >=dev-python/PyQt6-${PV}[gui,ssl,${PYTHON_USEDEP}] - >=dev-qt/qtbase-${QT_PV}[gui,widgets?] - >=dev-qt/qtwebengine-${QT_PV}[widgets] - quick? ( dev-python/PyQt6[qml] ) - widgets? ( dev-python/PyQt6[network,printsupport,webchannel,widgets] ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - >=dev-python/PyQt-builder-1.15[${PYTHON_USEDEP}] - >=dev-qt/qtbase-${QT_PV} -" - -src_prepare() { - default - - # hack: qmake queries g++ or clang++ for info depending on which qtbase was - # built with, but ignores CHOST failing with -native-symlinks (bug #726112) - # and potentially using wrong information when cross-compiling - mkdir "${T}"/cxx || die - local cxx - ! cxx=$(type -P "${CHOST}"-g++) || ln -s -- "${cxx}" "${T}"/cxx/g++ || die - ! cxx=$(type -P "${CHOST}"-clang++) || ln -s -- "${cxx}" "${T}"/cxx/clang++ || die - PATH=${T}/cxx:${PATH} -} - -python_configure_all() { - append-cxxflags -std=c++17 # for old gcc / clang that use <17 (bug #892331) - append-cxxflags ${CPPFLAGS} # respect CPPFLAGS notably for DISTUTILS_EXT=1 - - DISTUTILS_ARGS=( - --jobs="$(makeopts_jobs)" - --qmake="$(qt6_get_bindir)"/qmake - --qmake-setting="$(qt6_get_qmake_args)" - --verbose - - --enable=QtWebEngineCore - $(usex quick --{enable,disable}=QtWebEngineQuick) - $(usex widgets --{enable,disable}=QtWebEngineWidgets) - - $(usev debug '--debug --qml-debug --tracing') - ) -} diff --git a/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.6.0.ebuild b/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.6.0.ebuild new file mode 100644 index 000000000000..805a2c6f98d3 --- /dev/null +++ b/dev-python/PyQt6-WebEngine/PyQt6-WebEngine-6.6.0.ebuild @@ -0,0 +1,68 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=sip +PYPI_NO_NORMALIZE=1 +PYPI_PN=${PN/-/_} +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) +inherit distutils-r1 flag-o-matic multiprocessing pypi qmake-utils + +QT_PV=$(ver_cut 1-2):6 + +DESCRIPTION="Python bindings for QtWebEngine" +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqtwebengine/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug quick +widgets" + +RDEPEND=" + >=dev-python/PyQt6-${PV}[gui,ssl,${PYTHON_USEDEP}] + >=dev-qt/qtbase-${QT_PV}[gui,widgets?] + >=dev-qt/qtwebengine-${QT_PV}[widgets] + quick? ( + dev-python/PyQt6[qml] + >=dev-qt/qtwebengine-${QT_PV}[qml(+)] + ) + widgets? ( dev-python/PyQt6[network,printsupport,webchannel,widgets] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-python/PyQt-builder-1.15[${PYTHON_USEDEP}] + >=dev-qt/qtbase-${QT_PV} +" + +src_prepare() { + default + + # hack: qmake queries g++ or clang++ for info depending on which qtbase was + # built with, but ignores CHOST failing with -native-symlinks (bug #726112) + # and potentially using wrong information when cross-compiling + mkdir "${T}"/cxx || die + local cxx + ! cxx=$(type -P "${CHOST}"-g++) || ln -s -- "${cxx}" "${T}"/cxx/g++ || die + ! cxx=$(type -P "${CHOST}"-clang++) || ln -s -- "${cxx}" "${T}"/cxx/clang++ || die + PATH=${T}/cxx:${PATH} +} + +python_configure_all() { + append-cxxflags -std=c++17 # for old gcc / clang that use <17 (bug #892331) + append-cxxflags ${CPPFLAGS} # respect CPPFLAGS notably for DISTUTILS_EXT=1 + + DISTUTILS_ARGS=( + --jobs="$(makeopts_jobs)" + --qmake="$(qt6_get_bindir)"/qmake + --qmake-setting="$(qt6_get_qmake_args)" + --verbose + + --enable=QtWebEngineCore + $(usex quick --{enable,disable}=QtWebEngineQuick) + $(usex widgets --{enable,disable}=QtWebEngineWidgets) + + $(usev debug '--debug --qml-debug --tracing') + ) +} diff --git a/dev-python/PyQt6/Manifest b/dev-python/PyQt6/Manifest index 9b5cf68f0ef3..7a9708e044ea 100644 --- a/dev-python/PyQt6/Manifest +++ b/dev-python/PyQt6/Manifest @@ -1,2 +1,3 @@ DIST PyQt6-6.5.2.tar.gz 1037215 BLAKE2B dae331dc27975f3ad4fca10cedf093fecabf819d1fd97b873f9a793ce12168af9a72e2b119a4fc3ecf263e1ba42103f48d5198554248743a6289efc8aa3b7d70 SHA512 11da50ff8b914794e8044e136a3c8a79d16aa63ab33045f2807985c2fe2235c1a7682f7e955c9e8852093c34a671ec09d84afaa9d3d59945461797e81911721f DIST PyQt6-6.5.3.tar.gz 1039271 BLAKE2B 965efa73daa83e46fbb1428b27f8bfc8e5cbfd4cfa5481b50835fdcc58f475416207a670882d47a0cc724e4dc06e0a00a512c5f83c4918134c2f1303aecda20e SHA512 a502693cc9e1887011466132cd85e232ce653bfc38519aed99a77332413bdb65a01ecad4680b831eb76365b086e6a3b52fa69017b39d95933a6372d2e7e8e4bb +DIST PyQt6-6.6.0.tar.gz 1043298 BLAKE2B 1e0412e5f73734de625f5eb3f148d675c44909d56694e47e029a3ae91fd28f17e1edb2469f7af03baec52ad5636c3dba120d1328664f4f0557b7a9658b1e6cf1 SHA512 2fe8640b1dc82aa1da6064da2ef6c4ee81216ed34f28211b69d22c5ea00f782298f5a6a94d32ab00c3ee095abf15d2182a17324cd132458580f5659e789686e3 diff --git a/dev-python/PyQt6/PyQt6-6.6.0.ebuild b/dev-python/PyQt6/PyQt6-6.6.0.ebuild new file mode 100644 index 000000000000..7894bef07733 --- /dev/null +++ b/dev-python/PyQt6/PyQt6-6.6.0.ebuild @@ -0,0 +1,173 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=sip +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) +inherit distutils-r1 flag-o-matic multiprocessing pypi qmake-utils + +# 'can' work with older Qt depending on features, but keeping it simple +QT_PV=$(ver_cut 1-2):6 + +DESCRIPTION="Python bindings for the Qt framework" +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +# defaults match what is provided with qtbase by default (except testlib), +# reduces the need to set flags but does increase build time a fair amount +IUSE=" + bluetooth +dbus debug designer examples gles2-only +gui help + multimedia +network nfc opengl pdfium positioning +printsupport + qml quick quick3d serialport sensors spatialaudio speech +sql + +ssl svg testlib webchannel websockets +widgets +xml +" +# see `grep -r "%Import " sip` and `grep qmake_QT project.py` +REQUIRED_USE=" + designer? ( gui widgets ) + help? ( gui widgets ) + multimedia? ( gui network ) + opengl? ( gui ) + pdfium? ( gui ) + printsupport? ( gui widgets ) + qml? ( network ) + quick3d? ( gui qml ) + quick? ( gui qml ) + spatialaudio? ( multimedia ) + sql? ( widgets ) + svg? ( gui ) + testlib? ( gui widgets ) + webchannel? ( network ) + websockets? ( network ) + widgets? ( gui ) +" + +DEPEND=" + >=dev-qt/qtbase-${QT_PV}[dbus?,gles2-only=,gui?,network?,opengl?,sql?,ssl=,widgets?,xml?] + bluetooth? ( >=dev-qt/qtconnectivity-${QT_PV}[bluetooth] ) + dbus? ( + dev-python/dbus-python[${PYTHON_USEDEP}] + sys-apps/dbus + ) + designer? ( >=dev-qt/qttools-${QT_PV}[designer] ) + help? ( >=dev-qt/qttools-${QT_PV}[assistant] ) + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} ) + nfc? ( >=dev-qt/qtconnectivity-${QT_PV}[nfc] ) + opengl? ( + gles2-only? ( media-libs/libglvnd ) + ) + pdfium? ( >=dev-qt/qtwebengine-${QT_PV}[pdfium(-),widgets?] ) + positioning? ( >=dev-qt/qtpositioning-${QT_PV} ) + qml? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] ) + quick3d? ( >=dev-qt/qtquick3d-${QT_PV} ) + sensors? ( >=dev-qt/qtsensors-${QT_PV} ) + serialport? ( >=dev-qt/qtserialport-${QT_PV} ) + speech? ( >=dev-qt/qtspeech-${QT_PV} ) + svg? ( >=dev-qt/qtsvg-${QT_PV} ) + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} ) + websockets? ( >=dev-qt/qtwebsockets-${QT_PV} ) +" +RDEPEND=" + ${DEPEND} + >=dev-python/PyQt6-sip-13.6[${PYTHON_USEDEP}] +" +BDEPEND=" + >=dev-python/PyQt-builder-1.15[${PYTHON_USEDEP}] + >=dev-python/sip-6.7.12[${PYTHON_USEDEP}] + >=dev-qt/qtbase-${QT_PV} + dbus? ( virtual/pkgconfig ) +" + +src_prepare() { + default + + # hack: qmake queries g++ or clang++ for info depending on which qtbase was + # built with, but ignores CHOST failing with -native-symlinks (bug #726112) + # and potentially using wrong information when cross-compiling + mkdir "${T}"/cxx || die + local cxx + ! cxx=$(type -P "${CHOST}"-g++) || ln -s -- "${cxx}" "${T}"/cxx/g++ || die + ! cxx=$(type -P "${CHOST}"-clang++) || ln -s -- "${cxx}" "${T}"/cxx/clang++ || die + PATH=${T}/cxx:${PATH} +} + +python_configure_all() { + append-cxxflags -std=c++17 # for old gcc / clang that use <17 (bug #892331) + append-cxxflags ${CPPFLAGS} # respect CPPFLAGS notably for DISTUTILS_EXT=1 + + pyqt_use_enable() { + local state=$(usex ${1} --enable= --disable=) + shift + echo ${*/#/${state}} + } + + DISTUTILS_ARGS=( + --jobs="$(makeopts_jobs)" + --qmake="$(qt6_get_bindir)"/qmake + --qmake-setting="$(qt6_get_qmake_args)" + --verbose + --confirm-license + + --enable=QtCore + + $(pyqt_use_enable bluetooth QtBluetooth) + $(pyqt_use_enable dbus QtDBus) + $(pyqt_use_enable designer QtDesigner) + $(pyqt_use_enable help QtHelp) + $(pyqt_use_enable gui QtGui) + #--disable=QtLocation # force-disabled in project.py + $(pyqt_use_enable multimedia QtMultimedia \ + $(usev widgets QtMultimediaWidgets)) + $(pyqt_use_enable network QtNetwork) + $(pyqt_use_enable nfc QtNfc) + $(pyqt_use_enable opengl QtOpenGL \ + $(usev widgets QtOpenGLWidgets)) + $(pyqt_use_enable pdfium QtPdf \ + $(usev widgets QtPdfWidgets)) + $(pyqt_use_enable positioning QtPositioning) + $(pyqt_use_enable printsupport QtPrintSupport) + $(pyqt_use_enable qml QtQml) + $(pyqt_use_enable quick QtQuick \ + $(usev widgets QtQuickWidgets)) + $(pyqt_use_enable quick3d QtQuick3D) + --disable=QtRemoteObjects # not packaged + $(pyqt_use_enable sensors QtSensors) + $(pyqt_use_enable serialport QtSerialPort) + $(pyqt_use_enable spatialaudio QtSpatialAudio) + $(pyqt_use_enable sql QtSql) + $(pyqt_use_enable svg QtSvg \ + $(usev widgets QtSvgWidgets)) + $(pyqt_use_enable testlib QtTest) + $(pyqt_use_enable speech QtTextToSpeech) + $(pyqt_use_enable webchannel QtWebChannel) + $(pyqt_use_enable websockets QtWebSockets) + $(pyqt_use_enable widgets QtWidgets) + $(pyqt_use_enable xml QtXml) + + $(usev debug '--debug --qml-debug --tracing') + + $(usev !dbus --no-dbus-python) + # note: upstream currently intentionally skips installing these two + # plugins when using wheels w/ pep517 so, *if* something does need + # them, it will need to be handled manually + $(usev !designer --no-designer-plugin) + $(usev !qml --no-qml-plugin) + + $(usev !gles2-only --disabled-feature=PyQt_OpenGL_ES2) + $(usev !opengl --disabled-feature=PyQt_OpenGL) + $(usev !ssl --disabled-feature=PyQt_SSL) + + # intended for Windows / Android or others + --disable=QAxContainer + --disabled-feature=PyQt_Permissions + ) +} + +python_install_all() { + einstalldocs + use examples && dodoc -r examples +} diff --git a/dev-python/gmpy/Manifest b/dev-python/gmpy/Manifest index 460832e9d409..843d040fcdb5 100644 --- a/dev-python/gmpy/Manifest +++ b/dev-python/gmpy/Manifest @@ -1 +1,2 @@ +DIST gmpy-2.1.5-py3.12.patch.gz 1817 BLAKE2B cbea3a9c662d52c5bfddb82ab5e920474a52c1dd715b3b9fecf55e5ee097297168ddb7961b6156e4c1f902e911890c77252d119c3651f345f01cad144ed44127 SHA512 26195e8e9a87147a05fd07fa325f262c2004fcba2b8857dbc87ca7a1e9e5e64b4a47d35be77edc263829e5df1db6a0acda6904307d01529eba832feb4f0f3f71 DIST gmpy2-2.1.5.tar.gz 261709 BLAKE2B 50958868866fadc49c97534780fa491fadfaaea902f3fd4bd51f4e76a94602a6d030a1ee6685aac742e25b5fbe4865e1419307f7215c8fb553b166761d63607a SHA512 92e16359ee1df63faaeae4a3cbefe8cdbbc576d8eda377f08d59f12b70dfe9337a299686e85d1efee6c2f5b41fc4583643fecc68ea38a500c7f876c56fc169e7 diff --git a/dev-python/gmpy/gmpy-2.1.5-r1.ebuild b/dev-python/gmpy/gmpy-2.1.5-r1.ebuild new file mode 100644 index 000000000000..e5062bb386bb --- /dev/null +++ b/dev-python/gmpy/gmpy-2.1.5-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYPI_PN="gmpy2" +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python bindings for GMP, MPC, MPFR and MPIR libraries" +HOMEPAGE=" + https://github.com/aleaxit/gmpy/ + https://pypi.org/project/gmpy2/ +" +SRC_URI="${SRC_URI} + https://dev.gentoo.org/~grozin/${P}-py3.12.patch.gz" + +LICENSE="LGPL-3+" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" + +DEPEND=" + >=dev-libs/mpc-1.0.2:= + >=dev-libs/mpfr-3.1.2:= + dev-libs/gmp:0= +" +RDEPEND=" + ${DEPEND} +" + +distutils_enable_sphinx docs + +src_prepare() { + eapply "${WORKDIR}"/${P}-py3.12.patch + distutils-r1_src_prepare +} + +python_test() { + cd test || die + "${EPYTHON}" runtests.py || die "tests failed under ${EPYTHON}" +} diff --git a/dev-python/langdetect/Manifest b/dev-python/langdetect/Manifest index e9da2ac43cac..a11d7c268c91 100644 --- a/dev-python/langdetect/Manifest +++ b/dev-python/langdetect/Manifest @@ -1,3 +1 @@ DIST langdetect-1.0.9.tar.gz 981474 BLAKE2B ea8a9c3f16a2987c080742473bff4f2c1503f53fb3c2b40b0b1d6212bb6133ea22dce7864ffcfb8968c3a46b157d45cb3e2cf6f84bdbed0266cc716a853b032c SHA512 7558d674c47b080c79e43a00a25d2c7f77188cf60bea2cecb3bebb803d75e1aa42b43c74bd26ea1b541f4cb927421908882cbec01a91f0913984217e71ccc8db -EBUILD langdetect-1.0.9.ebuild 493 BLAKE2B 0df8bce19bc80f79f8e76bcef5a4c2caf333365fe0cb9a3c076b7858bceded5a3e58921474f866a2709dd657b7ed330c1ec4a7f9d7bab0fcf1bc92d77cabc32d SHA512 ea2a1adcb133ac5fc951ba1aa90ef1ce3dfcc424e59727591763d4875aa044a74188be2d15fd89c6b2e83ed6ea04ec3d9851ed584ae79d2c2c127bde7d994b48 -MISC metadata.xml 457 BLAKE2B 630128a3e982b6d60cc7b9f74c79fcb5ee47a71a02c73a50af9da8cedb6fad8e20a7f74b881e5b25c6483b92c9edbd56552cd38b2d9cbfa8b3eb4530facea969 SHA512 674f4f5cd809c6c77bc14e0f5687fa972bef14bdfa0b3343c5d66b7163eef1906eb87d060c8288732f825de71dce291ad0b841a5f2f0dd230f957b5687e45d45 diff --git a/dev-python/langdetect/metadata.xml b/dev-python/langdetect/metadata.xml index 020e07f2a3dd..736a1167c898 100644 --- a/dev-python/langdetect/metadata.xml +++ b/dev-python/langdetect/metadata.xml @@ -1,12 +1,6 @@ - - marcin.deranek@slonko.net - Marcin Deranek - - - https://github.com/Mimino666/langdetect/issues - - slonko-overlay + + gentoo-guru-overlay \ No newline at end of file diff --git a/dev-python/python-telegram-bot/Manifest b/dev-python/python-telegram-bot/Manifest index 4b5bd4db2fa6..067f127372f1 100644 --- a/dev-python/python-telegram-bot/Manifest +++ b/dev-python/python-telegram-bot/Manifest @@ -1,2 +1,3 @@ DIST python-telegram-bot-20.3.tar.gz 1957466 BLAKE2B 47e68846bb6c092648aa2bcd53289f7ac78d7335a8f84fd6a1c6440ee8b38c150f2e2df56f537e0de9e01af3c98a49fd0a8d8771c15ebd9be1658b0ee17a355b SHA512 6594eb991a14acdd247505b904ca2bd5022ef8abe4b45b57218508fa53de765a6a9e05c78997723a8385b45a0950e87dc102264ed3338eed9d569d1eb596e1f9 DIST python-telegram-bot-20.5.tar.gz 1950471 BLAKE2B b25440dd78d3a72242d371ec661027d2fea7c174a20a1c7482f0d1cab07aa6e5ffa886bb944c217e177732aabec676e5ea6003431a5e893a7171bb36642e3c53 SHA512 65f8d3de73bffcf56dd986091c34fa8f9cb60b4b8bbfc2b1c5c7392cf3a6314192a97013a2299a4d02977fd4f6ae73c487acc7a839b700d7304b02c0f5680671 +DIST python-telegram-bot-20.6.tar.gz 1958397 BLAKE2B f5f11a604ff1eb199b2b81571b86b69541faa1d98a5d12ac4f3a9f8c6789f722e924232244f211721986beba1380bc877f33251564a46086e4e33d8952e701e1 SHA512 87e42af8663d11f2e33783d40a28a1767f4f5e14203e53463a8f76be0f9a8f0601b3e34b297d1d1ed2f2111b48cbf22a22d28a4d7396b67defb1f0081b10bc38 diff --git a/dev-python/python-telegram-bot/files/python-telegram-bot-20.6-no-internet-tests.patch b/dev-python/python-telegram-bot/files/python-telegram-bot-20.6-no-internet-tests.patch new file mode 100644 index 000000000000..8718aaa03861 --- /dev/null +++ b/dev-python/python-telegram-bot/files/python-telegram-bot-20.6-no-internet-tests.patch @@ -0,0 +1,718 @@ +diff --git a/tests/_files/test_animation.py b/tests/_files/test_animation.py +index 23ec3b50..d5b3775d 100644 +--- a/tests/_files/test_animation.py ++++ b/tests/_files/test_animation.py +@@ -65,11 +65,13 @@ class TestAnimationBase: + + + class TestAnimationWithoutRequest(TestAnimationBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, animation): + for attr in animation.__slots__: + assert getattr(animation, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(animation)) == len(set(mro_slots(animation))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, animation): + assert isinstance(animation, Animation) + assert isinstance(animation.file_id, str) +@@ -77,11 +79,13 @@ class TestAnimationWithoutRequest(TestAnimationBase): + assert animation.file_id + assert animation.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, animation): + assert animation.mime_type == self.mime_type + assert animation.file_name.startswith("game.gif") == self.file_name.startswith("game.gif") + assert isinstance(animation.thumbnail, PhotoSize) + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, animation): + json_dict = { + "file_id": self.animation_file_id, +@@ -102,6 +106,7 @@ class TestAnimationWithoutRequest(TestAnimationBase): + assert animation.mime_type == self.mime_type + assert animation.file_size == self.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, animation): + animation_dict = animation.to_dict() + +@@ -171,6 +176,7 @@ class TestAnimationWithoutRequest(TestAnimationBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_animation(self, monkeypatch, bot, chat_id, animation): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["animation"] == animation.file_id +@@ -178,6 +184,7 @@ class TestAnimationWithoutRequest(TestAnimationBase): + monkeypatch.setattr(bot.request, "post", make_assertion) + assert await bot.send_animation(animation=animation, chat_id=chat_id) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, animation): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == animation.file_id +diff --git a/tests/_files/test_audio.py b/tests/_files/test_audio.py +index 3ea394d0..17a9388b 100644 +--- a/tests/_files/test_audio.py ++++ b/tests/_files/test_audio.py +@@ -66,11 +66,13 @@ class TestAudioBase: + + + class TestAudioWithoutRequest(TestAudioBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, audio): + for attr in audio.__slots__: + assert getattr(audio, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(audio)) == len(set(mro_slots(audio))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, audio): + # Make sure file has been uploaded. + assert isinstance(audio, Audio) +@@ -79,6 +81,7 @@ class TestAudioWithoutRequest(TestAudioBase): + assert audio.file_id + assert audio.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, audio): + assert audio.duration == self.duration + assert audio.performer is None +@@ -89,6 +92,7 @@ class TestAudioWithoutRequest(TestAudioBase): + assert audio.thumbnail.width == self.thumb_width + assert audio.thumbnail.height == self.thumb_height + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, audio): + json_dict = { + "file_id": self.audio_file_id, +@@ -114,6 +118,7 @@ class TestAudioWithoutRequest(TestAudioBase): + assert json_audio.file_size == self.file_size + assert json_audio.thumbnail == audio.thumbnail + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, audio): + audio_dict = audio.to_dict() + +@@ -125,6 +130,7 @@ class TestAudioWithoutRequest(TestAudioBase): + assert audio_dict["file_size"] == audio.file_size + assert audio_dict["file_name"] == audio.file_name + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, audio): + a = Audio(audio.file_id, audio.file_unique_id, audio.duration) + b = Audio("", audio.file_unique_id, audio.duration) +@@ -145,6 +151,7 @@ class TestAudioWithoutRequest(TestAudioBase): + assert a != e + assert hash(a) != hash(e) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_audio(self, monkeypatch, bot, chat_id, audio): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["audio"] == audio.file_id +@@ -183,6 +190,7 @@ class TestAudioWithoutRequest(TestAudioBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, audio): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == audio.file_id +diff --git a/tests/_files/test_chatphoto.py b/tests/_files/test_chatphoto.py +index d09876e2..f115ea9c 100644 +--- a/tests/_files/test_chatphoto.py ++++ b/tests/_files/test_chatphoto.py +@@ -61,11 +61,13 @@ class TestChatPhotoBase: + + + class TestChatPhotoWithoutRequest(TestChatPhotoBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, chat_photo): + for attr in chat_photo.__slots__: + assert getattr(chat_photo, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(chat_photo)) == len(set(mro_slots(chat_photo))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, chat_photo): + json_dict = { + "small_file_id": self.chatphoto_small_file_id, +@@ -80,6 +82,7 @@ class TestChatPhotoWithoutRequest(TestChatPhotoBase): + assert chat_photo.small_file_unique_id == self.chatphoto_small_file_unique_id + assert chat_photo.big_file_unique_id == self.chatphoto_big_file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_to_dict(self, chat_photo): + chat_photo_dict = chat_photo.to_dict() + +@@ -121,6 +124,7 @@ class TestChatPhotoWithoutRequest(TestChatPhotoBase): + assert a != e + assert hash(a) != hash(e) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_chat_photo(self, monkeypatch, bot, super_group_id, chat_photo): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.parameters["photo"] == chat_photo.to_dict() +@@ -129,6 +133,7 @@ class TestChatPhotoWithoutRequest(TestChatPhotoBase): + message = await bot.set_chat_photo(photo=chat_photo, chat_id=super_group_id) + assert message + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_small_file_instance_method(self, monkeypatch, chat_photo): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == chat_photo.small_file_id +@@ -142,6 +147,7 @@ class TestChatPhotoWithoutRequest(TestChatPhotoBase): + monkeypatch.setattr(chat_photo.get_bot(), "get_file", make_assertion) + assert await chat_photo.get_small_file() + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_big_file_instance_method(self, monkeypatch, chat_photo): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == chat_photo.big_file_id +diff --git a/tests/_files/test_document.py b/tests/_files/test_document.py +index f5ccdbeb..11d5825e 100644 +--- a/tests/_files/test_document.py ++++ b/tests/_files/test_document.py +@@ -61,11 +61,13 @@ class TestDocumentBase: + + + class TestDocumentWithoutRequest(TestDocumentBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, document): + for attr in document.__slots__: + assert getattr(document, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(document)) == len(set(mro_slots(document))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, document): + assert isinstance(document, Document) + assert isinstance(document.file_id, str) +@@ -73,6 +75,7 @@ class TestDocumentWithoutRequest(TestDocumentBase): + assert document.file_id + assert document.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, document): + assert document.file_size == self.file_size + assert document.mime_type == self.mime_type +@@ -81,6 +84,7 @@ class TestDocumentWithoutRequest(TestDocumentBase): + assert document.thumbnail.width == self.thumb_width + assert document.thumbnail.height == self.thumb_height + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, document): + json_dict = { + "file_id": self.document_file_id, +@@ -100,6 +104,7 @@ class TestDocumentWithoutRequest(TestDocumentBase): + assert test_document.mime_type == self.mime_type + assert test_document.file_size == self.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, document): + document_dict = document.to_dict() + +@@ -110,6 +115,7 @@ class TestDocumentWithoutRequest(TestDocumentBase): + assert document_dict["mime_type"] == document.mime_type + assert document_dict["file_size"] == document.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, document): + a = Document(document.file_id, document.file_unique_id) + b = Document("", document.file_unique_id) +@@ -131,6 +137,7 @@ class TestDocumentWithoutRequest(TestDocumentBase): + await bot.send_document(chat_id=chat_id) + + @pytest.mark.parametrize("disable_content_type_detection", [True, False, None]) ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_document( + self, monkeypatch, bot, chat_id, document, disable_content_type_detection + ): +@@ -177,6 +184,7 @@ class TestDocumentWithoutRequest(TestDocumentBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, document): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == document.file_id +diff --git a/tests/_files/test_inputmedia.py b/tests/_files/test_inputmedia.py +index f00dd165..1f99d302 100644 +--- a/tests/_files/test_inputmedia.py ++++ b/tests/_files/test_inputmedia.py +@@ -179,6 +179,7 @@ class TestInputMediaVideoWithoutRequest(TestInputMediaVideoBase): + assert input_media_video_dict["supports_streaming"] == input_media_video.supports_streaming + assert input_media_video_dict["has_spoiler"] == input_media_video.has_spoiler + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_with_video(self, video): # noqa: F811 + # fixture found in test_video + input_media_video = InputMediaVideo(video, caption="test 3") +@@ -243,6 +244,7 @@ class TestInputMediaPhotoWithoutRequest(TestInputMediaPhotoBase): + ] + assert input_media_photo_dict["has_spoiler"] == input_media_photo.has_spoiler + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_with_photo(self, photo): # noqa: F811 + # fixture found in test_photo + input_media_photo = InputMediaPhoto(photo, caption="test 2") +@@ -308,6 +310,7 @@ class TestInputMediaAnimationWithoutRequest(TestInputMediaAnimationBase): + assert input_media_animation_dict["duration"] == input_media_animation.duration + assert input_media_animation_dict["has_spoiler"] == input_media_animation.has_spoiler + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_with_animation(self, animation): # noqa: F811 + # fixture found in test_animation + input_media_animation = InputMediaAnimation(animation, caption="test 2") +@@ -376,6 +379,7 @@ class TestInputMediaAudioWithoutRequest(TestInputMediaAudioBase): + ce.to_dict() for ce in input_media_audio.caption_entities + ] + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_with_audio(self, audio): # noqa: F811 + # fixture found in test_audio + input_media_audio = InputMediaAudio(audio, caption="test 3") +@@ -447,6 +451,7 @@ class TestInputMediaDocumentWithoutRequest(TestInputMediaDocumentBase): + == input_media_document.disable_content_type_detection + ) + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_with_document(self, document): # noqa: F811 + # fixture found in test_document + input_media_document = InputMediaDocument(document, caption="test 3") +@@ -502,6 +507,7 @@ def media_group_no_caption_only_parse_mode(photo, thumb): # noqa: F811 + + + class TestSendMediaGroupWithoutRequest: ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_media_group_throws_error_with_group_caption_and_individual_captions( + self, + bot, +diff --git a/tests/_files/test_photo.py b/tests/_files/test_photo.py +index 9f85bec5..cd47e48f 100644 +--- a/tests/_files/test_photo.py ++++ b/tests/_files/test_photo.py +@@ -74,11 +74,13 @@ class TestPhotoBase: + + + class TestPhotoWithoutRequest(TestPhotoBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, photo): + for attr in photo.__slots__: + assert getattr(photo, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(photo)) == len(set(mro_slots(photo))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, thumb, photo): + # Make sure file has been uploaded. + assert isinstance(photo, PhotoSize) +@@ -93,6 +95,7 @@ class TestPhotoWithoutRequest(TestPhotoBase): + assert thumb.file_id + assert thumb.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, photo, thumb): + assert photo.width == self.width + assert photo.height == self.height +@@ -103,6 +106,7 @@ class TestPhotoWithoutRequest(TestPhotoBase): + # so far + assert thumb.file_size in [1475, 1477] + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, photo): + json_dict = { + "file_id": photo.file_id, +@@ -120,6 +124,7 @@ class TestPhotoWithoutRequest(TestPhotoBase): + assert json_photo.height == self.height + assert json_photo.file_size == self.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, photo): + photo_dict = photo.to_dict() + +@@ -130,6 +135,7 @@ class TestPhotoWithoutRequest(TestPhotoBase): + assert photo_dict["height"] == photo.height + assert photo_dict["file_size"] == photo.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, photo): + a = PhotoSize(photo.file_id, photo.file_unique_id, self.width, self.height) + b = PhotoSize("", photo.file_unique_id, self.width, self.height) +@@ -191,6 +197,7 @@ class TestPhotoWithoutRequest(TestPhotoBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_photosize(self, monkeypatch, bot, chat_id, photo): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["photo"] == photo.file_id +@@ -198,6 +205,7 @@ class TestPhotoWithoutRequest(TestPhotoBase): + monkeypatch.setattr(bot.request, "post", make_assertion) + assert await bot.send_photo(photo=photo, chat_id=chat_id) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, photo): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == photo.file_id +diff --git a/tests/_files/test_sticker.py b/tests/_files/test_sticker.py +index c8b9b02a..8d5ff664 100644 +--- a/tests/_files/test_sticker.py ++++ b/tests/_files/test_sticker.py +@@ -115,11 +115,13 @@ class TestStickerBase: + + + class TestStickerWithoutRequest(TestStickerBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, sticker): + for attr in sticker.__slots__: + assert getattr(sticker, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(sticker)) == len(set(mro_slots(sticker))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, sticker): + # Make sure file has been uploaded. + assert isinstance(sticker, Sticker) +@@ -134,6 +136,7 @@ class TestStickerWithoutRequest(TestStickerBase): + assert sticker.thumbnail.file_unique_id + assert isinstance(sticker.needs_repainting, bool) + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, sticker): + assert sticker.width == self.width + assert sticker.height == self.height +@@ -148,6 +151,7 @@ class TestStickerWithoutRequest(TestStickerBase): + # we need to be a premium TG user to send a premium sticker, so the below is not tested + # assert sticker.premium_animation == self.premium_animation + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, sticker): + sticker_dict = sticker.to_dict() + +@@ -163,6 +167,7 @@ class TestStickerWithoutRequest(TestStickerBase): + assert sticker_dict["type"] == sticker.type + assert sticker_dict["needs_repainting"] == sticker.needs_repainting + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, sticker): + json_dict = { + "file_id": self.sticker_file_id, +@@ -196,6 +201,7 @@ class TestStickerWithoutRequest(TestStickerBase): + assert json_sticker.custom_emoji_id == self.custom_emoji_id + assert json_sticker.needs_repainting == self.needs_repainting + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, sticker): + a = Sticker( + sticker.file_id, +@@ -258,6 +264,7 @@ class TestStickerWithoutRequest(TestStickerBase): + with pytest.raises(TypeError): + await bot.send_sticker(chat_id) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_sticker(self, monkeypatch, bot, chat_id, sticker): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["sticker"] == sticker.file_id +@@ -532,6 +539,7 @@ class TestStickerSetWithoutRequest(TestStickerSetBase): + assert getattr(inst, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(inst)) == len(set(mro_slots(inst))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, sticker): + name = f"test_by_{bot.username}" + json_dict = { +@@ -555,6 +563,7 @@ class TestStickerSetWithoutRequest(TestStickerSetBase): + assert sticker_set.sticker_type == self.sticker_type + assert sticker_set.api_kwargs == {"contains_masks": self.contains_masks} + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_sticker_set_to_dict(self, sticker_set): + sticker_set_dict = sticker_set.to_dict() + +@@ -726,6 +735,7 @@ class TestStickerSetWithoutRequest(TestStickerSetBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, sticker): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == sticker.file_id +diff --git a/tests/_files/test_video.py b/tests/_files/test_video.py +index b2ec1098..f6d4280f 100644 +--- a/tests/_files/test_video.py ++++ b/tests/_files/test_video.py +@@ -65,11 +65,13 @@ class TestVideoBase: + + + class TestVideoWithoutRequest(TestVideoBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, video): + for attr in video.__slots__: + assert getattr(video, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(video)) == len(set(mro_slots(video))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, video): + # Make sure file has been uploaded. + assert isinstance(video, Video) +@@ -84,6 +86,7 @@ class TestVideoWithoutRequest(TestVideoBase): + assert video.thumbnail.file_id + assert video.thumbnail.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, video): + assert video.width == self.width + assert video.height == self.height +@@ -114,6 +117,7 @@ class TestVideoWithoutRequest(TestVideoBase): + assert json_video.file_size == self.file_size + assert json_video.file_name == self.file_name + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, video): + video_dict = video.to_dict() + +@@ -127,6 +131,7 @@ class TestVideoWithoutRequest(TestVideoBase): + assert video_dict["file_size"] == video.file_size + assert video_dict["file_name"] == video.file_name + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, video): + a = Video(video.file_id, video.file_unique_id, self.width, self.height, self.duration) + b = Video("", video.file_unique_id, self.width, self.height, self.duration) +@@ -151,6 +156,7 @@ class TestVideoWithoutRequest(TestVideoBase): + with pytest.raises(TypeError): + await bot.send_video(chat_id=chat_id) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_video(self, monkeypatch, bot, chat_id, video): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["video"] == video.file_id +@@ -190,6 +196,7 @@ class TestVideoWithoutRequest(TestVideoBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, video): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == video.file_id +diff --git a/tests/_files/test_videonote.py b/tests/_files/test_videonote.py +index b931678d..717d86fb 100644 +--- a/tests/_files/test_videonote.py ++++ b/tests/_files/test_videonote.py +@@ -59,11 +59,13 @@ class TestVideoNoteBase: + + + class TestVideoNoteWithoutRequest(TestVideoNoteBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, video_note): + for attr in video_note.__slots__: + assert getattr(video_note, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(video_note)) == len(set(mro_slots(video_note))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_creation(self, video_note): + # Make sure file has been uploaded. + assert isinstance(video_note, VideoNote) +@@ -78,6 +80,7 @@ class TestVideoNoteWithoutRequest(TestVideoNoteBase): + assert video_note.thumbnail.file_id + assert video_note.thumbnail.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, video_note): + assert video_note.length == self.length + assert video_note.duration == self.duration +@@ -100,6 +103,7 @@ class TestVideoNoteWithoutRequest(TestVideoNoteBase): + assert json_video_note.duration == self.duration + assert json_video_note.file_size == self.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, video_note): + video_note_dict = video_note.to_dict() + +@@ -110,6 +114,7 @@ class TestVideoNoteWithoutRequest(TestVideoNoteBase): + assert video_note_dict["duration"] == video_note.duration + assert video_note_dict["file_size"] == video_note.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, video_note): + a = VideoNote(video_note.file_id, video_note.file_unique_id, self.length, self.duration) + b = VideoNote("", video_note.file_unique_id, self.length, self.duration) +@@ -134,6 +139,7 @@ class TestVideoNoteWithoutRequest(TestVideoNoteBase): + with pytest.raises(TypeError): + await bot.send_video_note(chat_id=chat_id) + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_video_note(self, monkeypatch, bot, chat_id, video_note): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["video_note"] == video_note.file_id +@@ -177,6 +183,7 @@ class TestVideoNoteWithoutRequest(TestVideoNoteBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, video_note): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == video_note.file_id +diff --git a/tests/_files/test_voice.py b/tests/_files/test_voice.py +index b29260d5..77d9f719 100644 +--- a/tests/_files/test_voice.py ++++ b/tests/_files/test_voice.py +@@ -58,11 +58,13 @@ class TestVoiceBase: + + + class TestVoiceWithoutRequest(TestVoiceBase): ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, voice): + for attr in voice.__slots__: + assert getattr(voice, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(voice)) == len(set(mro_slots(voice))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_creation(self, voice): + # Make sure file has been uploaded. + assert isinstance(voice, Voice) +@@ -71,6 +73,7 @@ class TestVoiceWithoutRequest(TestVoiceBase): + assert voice.file_id + assert voice.file_unique_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_expected_values(self, voice): + assert voice.duration == self.duration + assert voice.mime_type == self.mime_type +@@ -93,6 +96,7 @@ class TestVoiceWithoutRequest(TestVoiceBase): + assert json_voice.mime_type == self.mime_type + assert json_voice.file_size == self.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, voice): + voice_dict = voice.to_dict() + +@@ -103,6 +107,7 @@ class TestVoiceWithoutRequest(TestVoiceBase): + assert voice_dict["mime_type"] == voice.mime_type + assert voice_dict["file_size"] == voice.file_size + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, voice): + a = Voice(voice.file_id, voice.file_unique_id, self.duration) + b = Voice("", voice.file_unique_id, self.duration) +@@ -135,6 +140,7 @@ class TestVoiceWithoutRequest(TestVoiceBase): + + assert await bot.send_voice(chat_id, voice_file, filename="custom_filename") + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_send_with_voice(self, monkeypatch, bot, chat_id, voice): + async def make_assertion(url, request_data: RequestData, *args, **kwargs): + return request_data.json_parameters["voice"] == voice.file_id +@@ -164,6 +170,7 @@ class TestVoiceWithoutRequest(TestVoiceBase): + finally: + bot._local_mode = False + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_file_instance_method(self, monkeypatch, voice): + async def make_assertion(*_, **kwargs): + return kwargs["file_id"] == voice.file_id +diff --git a/tests/request/test_request.py b/tests/request/test_request.py +index 9334f7b7..80aef409 100644 +--- a/tests/request/test_request.py ++++ b/tests/request/test_request.py +@@ -422,6 +422,7 @@ class TestHTTPXRequestWithoutRequest: + assert self.test_flag["init"] == 1 + assert self.test_flag["shutdown"] == 1 + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_multiple_init_cycles(self): + # nothing really to assert - this should just not fail + httpx_request = HTTPXRequest() +@@ -434,6 +435,7 @@ class TestHTTPXRequestWithoutRequest: + with pytest.raises(ValueError, match="`http_version` must be either"): + HTTPXRequest(http_version="1.0") + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_http_1_response(self): + httpx_request = HTTPXRequest(http_version="1.1") + async with httpx_request: +diff --git a/tests/test_bot.py b/tests/test_bot.py +index ba3c82af..86970d73 100644 +--- a/tests/test_bot.py ++++ b/tests/test_bot.py +@@ -311,6 +311,7 @@ class TestBotWithoutRequest: + + assert self.test_flag == "stop" + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_equality(self): + async with make_bot(token=FALLBACKS[0]["token"]) as a, make_bot( + token=FALLBACKS[0]["token"] +@@ -352,6 +353,7 @@ class TestBotWithoutRequest: + finally: + await bot.shutdown() + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_get_me_and_properties(self, bot): + get_me_bot = await ExtBot(bot.token).get_me() + +@@ -389,6 +391,7 @@ class TestBotWithoutRequest: + @pytest.mark.parametrize( + ("cls", "logger_name"), [(Bot, "telegram.Bot"), (ExtBot, "telegram.ext.ExtBot")] + ) ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_log_decorator(self, bot: PytestExtBot, cls, logger_name, caplog): + # Second argument makes sure that we ignore logs from e.g. httpx + with caplog.at_level(logging.DEBUG, logger="telegram"): +@@ -1395,6 +1398,7 @@ class TestBotWithoutRequest: + + @pytest.mark.parametrize("json_keyboard", [True, False]) + @pytest.mark.parametrize("caption", ["Test", "", None]) ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_copy_message( + self, monkeypatch, bot, chat_id, media_message, json_keyboard, caption + ): +diff --git a/tests/test_forum.py b/tests/test_forum.py +index d367fc9c..a130a5cc 100644 +--- a/tests/test_forum.py ++++ b/tests/test_forum.py +@@ -74,18 +74,21 @@ async def real_topic(bot, emoji_id, forum_group_id): + + + class TestForumTopicWithoutRequest: ++ @pytest.mark.skip(reason="Requires internet connection") + def test_slot_behaviour(self, forum_topic_object): + inst = forum_topic_object + for attr in inst.__slots__: + assert getattr(inst, attr, "err") != "err", f"got extra slot '{attr}'" + assert len(mro_slots(inst)) == len(set(mro_slots(inst))), "duplicate slot" + ++ @pytest.mark.skip(reason="Requires internet connection") + async def test_expected_values(self, emoji_id, forum_group_id, forum_topic_object): + assert forum_topic_object.message_thread_id == forum_group_id + assert forum_topic_object.icon_color == TEST_TOPIC_ICON_COLOR + assert forum_topic_object.name == TEST_TOPIC_NAME + assert forum_topic_object.icon_custom_emoji_id == emoji_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_de_json(self, bot, emoji_id, forum_group_id): + assert ForumTopic.de_json(None, bot=bot) is None + +@@ -103,6 +106,7 @@ class TestForumTopicWithoutRequest: + assert topic.name == TEST_TOPIC_NAME + assert topic.icon_custom_emoji_id == emoji_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_to_dict(self, emoji_id, forum_group_id, forum_topic_object): + topic_dict = forum_topic_object.to_dict() + +@@ -112,6 +116,7 @@ class TestForumTopicWithoutRequest: + assert topic_dict["icon_color"] == TEST_TOPIC_ICON_COLOR + assert topic_dict["icon_custom_emoji_id"] == emoji_id + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, emoji_id, forum_group_id): + a = ForumTopic( + message_thread_id=forum_group_id, +@@ -350,6 +355,7 @@ class TestForumTopicCreatedWithoutRequest: + assert action_dict["name"] == TEST_TOPIC_NAME + assert action_dict["icon_color"] == TEST_TOPIC_ICON_COLOR + ++ @pytest.mark.skip(reason="Requires internet connection") + def test_equality(self, emoji_id): + a = ForumTopicCreated(name=TEST_TOPIC_NAME, icon_color=TEST_TOPIC_ICON_COLOR) + b = ForumTopicCreated( diff --git a/dev-python/python-telegram-bot/python-telegram-bot-20.6.ebuild b/dev-python/python-telegram-bot/python-telegram-bot-20.6.ebuild new file mode 100644 index 000000000000..366dcf7d0df9 --- /dev/null +++ b/dev-python/python-telegram-bot/python-telegram-bot-20.6.ebuild @@ -0,0 +1,57 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) +inherit distutils-r1 optfeature + +DESCRIPTION="Python wrapper of telegram bots API" +HOMEPAGE="https://docs.python-telegram-bot.org https://github.com/python-telegram-bot/python-telegram-bot" +SRC_URI="https://github.com/python-telegram-bot/python-telegram-bot/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + >=dev-python/cachetools-5.3.1[${PYTHON_USEDEP}] + >=dev-python/cryptography-39.0.1[${PYTHON_USEDEP}] + >=dev-python/httpx-0.25.0[${PYTHON_USEDEP}] + >=dev-python/tornado-6.3.3[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/beautifulsoup4[${PYTHON_USEDEP}] + dev-python/flaky[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + >=dev-python/tornado-6.3.3[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/${P}-no-internet-tests.patch" +) + +S="${WORKDIR}/${PN}-${PV}" + +distutils_enable_tests pytest + +# Run only the tests that don't require a connection +python_test() { + epytest -m no_req +} + +python_prepare_all() { + distutils-r1_python_prepare_all +} + +pkg_postinst() { + optfeature_header "Optional package dependencies:" + optfeature "using telegram.ext.JobQueue" dev-python/APScheduler +} -- cgit v1.3