summaryrefslogtreecommitdiff
path: root/dev-python/tqdm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /dev-python/tqdm
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'dev-python/tqdm')
-rw-r--r--dev-python/tqdm/Manifest3
-rw-r--r--dev-python/tqdm/files/tqdm-4.46.0-py39.patch42
-rw-r--r--dev-python/tqdm/tqdm-4.46.0.ebuild62
3 files changed, 107 insertions, 0 deletions
diff --git a/dev-python/tqdm/Manifest b/dev-python/tqdm/Manifest
index 0f3aca00ed6f..08a30a61171e 100644
--- a/dev-python/tqdm/Manifest
+++ b/dev-python/tqdm/Manifest
@@ -1,10 +1,13 @@
+AUX tqdm-4.46.0-py39.patch 1637 BLAKE2B de3dbafba500055cd292b2e24d16e089febf518881fc46369526fd641290489941199260c3018e266fb2fa91e4909947d11a23d1a0e29633fc5d2bd67fcb24c9 SHA512 0278d09ca22d97e5d2ceebc97ed4bf3500e8474910990cc9aebb46c9f1ab158d157a73847a041951863cae3fb36d1a32800e49ccd671a874486c3ee74da3cf62
DIST tqdm-4.23.3.tar.gz 75941 BLAKE2B 9e5810765e8f7ea4f54b0f93f453d278d5ad4b1710f1476a6f00ff2e513789585e97dcd5a8331fe69d3593b18affd50bf9bf51cbaed29ecd68d4efad9318aa31 SHA512 40c853b7cf7611ba2ef7652417c0d42ea4392f5ea9cbe319dbb9e3dd063594e5c637fb5d13f77935fb9a034d395b28fa9480fec1c6cca1852644add4ac18cce8
DIST tqdm-4.33.0.tar.gz 121571 BLAKE2B f4ee73cfa710462e148f6034ac69144d845d216bd97e16a78bc1f1ed5d658b6cd695d07aa1ea6ec93e2e747ab8fc52263a580c01516d1f111dcb5766b019925d SHA512 de86a2dc2c5f887b9671ee01e7c05820375b0ef83dec92f17da4d944dd02cbf96a133fd9d349ba5f9c75af70e7b87110a9a7ad3293c7eb81e49ed6ea288ba73c
DIST tqdm-4.40.0.tar.gz 129225 BLAKE2B 85030c11bdba6c1d6da461e3c648bae6ae173577fb18986e3153badd73a28352f807782759aa52ed082d7ee0c13dc5f850c1da563ee5892f6bf5e8f49c48c7ee SHA512 1c326d98130c79f614cea502723e4202baa57b7b4639e208133cb464785e4a8d4eaa9d262ea484246d45e5eb8f21994e7ecf3fd6ef0f4966f9049fc8013d7442
DIST tqdm-4.45.0.tar.gz 140990 BLAKE2B 8699b3a820859406e9bbafaaa48ba1b418e3083898d2b6c3401078996dd03431db259d5ad8a377226a50b80513ef0fc55bdaf2b67fc4a2bdd490bc5fdc04d681 SHA512 7b35f86205c6581ede9bdb0788e7f55be525c3f0f77952803046661c6a7a6cd3c15ed0323376ecedb5cddace1b32a41fee1932033dcaa49f9096dc3b9b674f10
+DIST tqdm-4.46.0.tar.gz 144312 BLAKE2B 93b902d9a362e658f244f3c1b15a3496425cb3e401adf291dc0a9c7c0bd551baa1171a753be8d1c3b877d2cd3ab25e81dddbd8492668d0b0f6ca3cb47d13be1c SHA512 ccdfce4d273e78ced172fc3edb24ac038465169f7b765e7bf779831ef3d0dc72c648c5fb165aba02e0c6dc86c5d0ea3d93d5530b642ddd84e3d284c7354739cf
EBUILD tqdm-4.23.3.ebuild 673 BLAKE2B b49a8fdad4ee136a4b5149ab39a852d748c0a9f357587490fd272d37743ce530ed2b69fa8cd87a8ed657d26c0669c2e038d484afb7279ec3460562d281b0063c SHA512 2eb6fa8f796289073d92c07b6e7af8e7441d83bd32a01ac2a0d3dc8b530d1c796777ead4502cc6734b81adae01d8c0a496bff147cde268fe2d5223c4a8ad448a
EBUILD tqdm-4.33.0.ebuild 1233 BLAKE2B 06c019bae07709c13627ec3b47c00c2745041b604d15a1f84445ab82cd82990506a61ce6c2d44cf9d84c4b1b2c5772ee6b03a4252af7035ac33fc4e6816d5ca1 SHA512 007d81a3e948d9b02e57a501d96ee8bfe8763bdbe5fa89d21332880873dc459cf184f3ffc3a9edf6b2b8b46933ae45d1e07b32b649c8d5ba15cfadf374bf2814
EBUILD tqdm-4.40.0.ebuild 1350 BLAKE2B 27dc08ff9bdfdb52222d625e442202eed0f2673a3e4c7e2640f6ab113fb5da118616bb08b69f5050eca5c17dcd6bfd1389c4dd17b7c8b20fd137e69c22b6e5c4 SHA512 b81e0ea43e76d9d3ae9440328d69c6998a3f76f788ac68be9d4ca81051ae9b15d0ba6b3cd4af4c02144ed781e52cb28de009bf03445f6a9810039380c480dc1b
EBUILD tqdm-4.45.0.ebuild 1352 BLAKE2B 252d0d5584770fddd243dba8750b8fd1208f006082ca320f4c9ec778712a9a55b5d77f0a1169557b8cbf848bdd28d4f05d40979d260f5cffa145c2995f685800 SHA512 e507e23c4a6bd7484db91648443e805f3a1cf0c0a1ea3e427fe348284ac2880a0a3bedd0c0e2f3bd28a556b4cced1daea717e14a864c2667ffe4ac50a8758558
+EBUILD tqdm-4.46.0.ebuild 1359 BLAKE2B 7d2c0fb8e03c2517569bd649ae76ded9d49a966bb5c992101c22bdfb01b2f0afdea0f5495940b336186f39a6623570e157b63119e82690f6572ef99faa7ac39f SHA512 a109333199cfeb659f9e1c8cbf3eab9748c032b98d487c9695691a292550cf17a10576169ae1a2f43502ce4c0a41890e5493f3c6892f3ffca543340fd4389549
EBUILD tqdm-9999.ebuild 1332 BLAKE2B c372057e509aec0113bf1fb8c8fefc3280f569e543c4f4d524bfdd1d6e52e78d5127edd3ba41d4e773e864f81da752d36d231a9ba909581c8f03f49128d882ec SHA512 560ccebe59bc49c9fcc04d9982e245a70d8d90cd3a571201f9a91c2a3fc91e2a096aaa55947646fc62e0fd2796df187de58647a39d0a9baa780a41fb69860836
MISC metadata.xml 702 BLAKE2B 9e1bee8f377d18a7fddbf5a7f061b4682e28d726c4e18fb79d243bc280f01fb04d4c7743ccb380142479c0f387892358dcb76d13f659809b508160bb31096d57 SHA512 1fec7bd9cfdfe79f99141c0af20bd5da2d2d36f90a159227f48cf8b3bc8c87940339274531d62fa9dd42da54162693e6a4c74fcbe267c25a32da9cba7745c6ba
diff --git a/dev-python/tqdm/files/tqdm-4.46.0-py39.patch b/dev-python/tqdm/files/tqdm-4.46.0-py39.patch
new file mode 100644
index 000000000000..0734aa83b96f
--- /dev/null
+++ b/dev-python/tqdm/files/tqdm-4.46.0-py39.patch
@@ -0,0 +1,42 @@
+From aeb52044ca29f37f1f98ee5a4f9ad774d557771e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 26 May 2020 21:43:05 +0200
+Subject: [PATCH] Fix error due to missing sys.setcheckinterval in py3.9
+
+Python 3.9 finally removed sys.setcheckinterval(). While the package
+apparently tried to account for that, the logic is flawed and the second
+getattr() raises an AttributeError even if its result is never used.
+This caused tests to fail:
+
+ File "/tmp/tqdm/tqdm/tests/tests_tqdm.py", line 126, in pretest
+ getattr(sys, 'setswitchinterval', getattr(sys, 'setcheckinterval'))(100)
+ AttributeError: module 'sys' has no attribute 'setcheckinterval'
+
+Refactor the code into a try/except construct that does not execute
+the setcheckinterval() branch unless setswitchinterval() is actually
+missing. While at it, scale the arguments a bit -- the current version
+used either 100 instructions or 100 seconds that were rather of very
+different magnitudes.
+---
+ tqdm/tests/tests_tqdm.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tqdm/tests/tests_tqdm.py b/tqdm/tests/tests_tqdm.py
+index a2dac52..5f322e6 100644
+--- a/tqdm/tests/tests_tqdm.py
++++ b/tqdm/tests/tests_tqdm.py
+@@ -123,7 +123,10 @@ def cpu_timify(t, timer=None):
+
+ def pretest():
+ # setcheckinterval is deprecated
+- getattr(sys, 'setswitchinterval', getattr(sys, 'setcheckinterval'))(100)
++ try:
++ sys.setswitchinterval(1)
++ except AttributeError:
++ sys.setcheckinterval(100)
+
+ if getattr(tqdm, "_instances", False):
+ n = len(tqdm._instances)
+--
+2.26.2
+
diff --git a/dev-python/tqdm/tqdm-4.46.0.ebuild b/dev-python/tqdm/tqdm-4.46.0.ebuild
new file mode 100644
index 000000000000..2273ba0de862
--- /dev/null
+++ b/dev-python/tqdm/tqdm-4.46.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( pypy3 python{2_7,3_{6,7,8,9}} )
+
+inherit distutils-r1
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/tqdm/tqdm"
+else
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~sparc ~x86"
+fi
+
+DESCRIPTION="Add a progress meter to your loops in a second"
+HOMEPAGE="https://github.com/tqdm/tqdm"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="examples"
+
+distutils_enable_tests nose
+
+PATCHES=(
+ "${FILESDIR}"/${P}-py39.patch
+)
+
+python_prepare_all() {
+ sed -r \
+ -e "s:'nose'(,[[:space:]]*|)::" \
+ -e "s:'flake8'(,[[:space:]]*|)::" \
+ -e "s:'coverage'(,[[:space:]]*|)::" \
+ -i setup.py
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # tests_main.py requires the package to be installed
+ distutils_install_for_testing
+ # Skip unpredictable performance tests
+ nosetests tqdm -v --ignore 'tests_perf.py' \
+ || die "tests failed with ${EPYTHON}"
+}
+
+python_install() {
+ doman "${BUILD_DIR}"/lib/tqdm/tqdm.1
+ rm "${BUILD_DIR}"/lib/tqdm/tqdm.1 || die
+ distutils-r1_python_install --skip-build
+}
+
+python_install_all() {
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ distutils-r1_python_install_all
+}