Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/python-tqdm
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-05-22 20:18:50 +0200
committerErich Eckner <git@eckner.net>2023-05-22 20:18:50 +0200
commite74cde76c104df82b120a7b13964cb786da8f565 (patch)
tree39967e24037929c04aaf79922aa260b437a60a5e /extra/python-tqdm
parent73e1d3b448cc583ab38cae4d61a26f313fad946b (diff)
community -> extra
Diffstat (limited to 'extra/python-tqdm')
-rw-r--r--extra/python-tqdm/PKGBUILD11
-rw-r--r--extra/python-tqdm/tqdm-4.22.0-sleep-test-workaround.patch12
2 files changed, 23 insertions, 0 deletions
diff --git a/extra/python-tqdm/PKGBUILD b/extra/python-tqdm/PKGBUILD
new file mode 100644
index 00000000..b7329924
--- /dev/null
+++ b/extra/python-tqdm/PKGBUILD
@@ -0,0 +1,11 @@
+# https://github.com/tqdm/tqdm/issues/538
+
+source+=('tqdm-4.22.0-sleep-test-workaround.patch')
+sha512sums+=('ac09e7578ad380f55f9371a067061bd1f23be6a799ec82c3abf2471d7d780bd435b423d0ab1f989cf7039b467d5adfa38e324cb887b0b27f52218fa3753956fa')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /cp/ i pushd ${srcdir}/tqdm-$pkgver && patch -Np1 -i "${srcdir}"/tqdm-4.22.0-sleep-test-workaround.patch && popd
+ '
+)"
diff --git a/extra/python-tqdm/tqdm-4.22.0-sleep-test-workaround.patch b/extra/python-tqdm/tqdm-4.22.0-sleep-test-workaround.patch
new file mode 100644
index 00000000..ac9caae3
--- /dev/null
+++ b/extra/python-tqdm/tqdm-4.22.0-sleep-test-workaround.patch
@@ -0,0 +1,12 @@
+diff -rauN tqdm-4.22.0/tqdm/tests/tests_synchronisation.py tqdm-4.22.0-sleep-test-workaround-patch/tqdm/tests/tests_synchronisation.py
+--- tqdm-4.22.0/tqdm/tests/tests_synchronisation.py 2018-04-12 01:27:25.000000000 +0200
++++ tqdm-4.22.0-sleep-test-workaround-patch/tqdm/tests/tests_synchronisation.py 2018-05-03 08:42:28.204036417 +0200
+@@ -155,7 +155,7 @@
+ timeend = timer.time()
+ while not (t1.monitor.woken >= timeend and t1.miniters == 1):
+ timer.sleep(1)
+- sleep(0.000001)
++ sleep(0.001)
+ assert t1.miniters == 1 # check that monitor corrected miniters
+ assert t2.miniters == 500 # check that t2 was not adjusted
+