[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: python-tinycss2: Fix test failure.
From: |
guix-commits |
Subject: |
branch master updated: gnu: python-tinycss2: Fix test failure. |
Date: |
Wed, 15 Jul 2020 14:30:18 -0400 |
This is an automated email from the git hooks/post-receive script.
mbakke pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 1507636 gnu: python-tinycss2: Fix test failure.
1507636 is described below
commit 15076369062852c266bc697fc54b2ba157aceed0
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Wed Jul 15 20:29:26 2020 +0200
gnu: python-tinycss2: Fix test failure.
Fixes <https://bugs.gnu.org/42372>.
Reported by Michael Rohleder <mike@rohleder.de>.
* gnu/packages/patches/python-tinycss2-flake8-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/python-web.scm (python-tinycss2)[source](patches): New field.
---
gnu/local.mk | 1 +
.../patches/python-tinycss2-flake8-compat.patch | 36 ++++++++++++++++++++++
gnu/packages/python-web.scm | 1 +
3 files changed, 38 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 9b42160..2f59279 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1466,6 +1466,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \
%D%/packages/patches/python-slugify-depend-on-unidecode.patch \
%D%/packages/patches/python2-subprocess32-disable-input-test.patch \
+ %D%/packages/patches/python-tinycss2-flake8-compat.patch \
%D%/packages/patches/python-unittest2-python3-compat.patch \
%D%/packages/patches/python-unittest2-remove-argparse.patch \
%D%/packages/patches/python-waitress-fix-tests.patch \
diff --git a/gnu/packages/patches/python-tinycss2-flake8-compat.patch
b/gnu/packages/patches/python-tinycss2-flake8-compat.patch
new file mode 100644
index 0000000..a66eb42
--- /dev/null
+++ b/gnu/packages/patches/python-tinycss2-flake8-compat.patch
@@ -0,0 +1,36 @@
+Fix test failure that occurs with recent versions of Flake8.
+
+Taken from upstream:
+https://github.com/Kozea/tinycss2/commit/6556604fb98c2153412384d6f0f705db2da1aa60
+
+diff --git a/tinycss2/css-parsing-tests/make_color3_hsl.py
b/tinycss2/css-parsing-tests/make_color3_hsl.py
+index d1fd3a6..56fda0c 100644
+--- a/tinycss2/css-parsing-tests/make_color3_hsl.py
++++ b/tinycss2/css-parsing-tests/make_color3_hsl.py
+@@ -8,16 +8,17 @@ def trim(s):
+ print('[')
+ print(',\n'.join(
+ '"hsl%s(%s, %s%%, %s%%%s)", [%s, %s, %s, %s]' % (
+- ('a' if a is not None else '', h,
+- trim(str(s / 10.)), trim(str(l / 10.)),
+- ', %s' % a if a is not None else '') +
++ ('a' if alpha is not None else '', hue,
++ trim(str(saturation / 10.)), trim(str(light / 10.)),
++ ', %s' % alpha if alpha is not None else '') +
+ tuple(trim(str(round(v, 10)))
+- for v in colorsys.hls_to_rgb(h / 360., l / 1000., s / 1000.)) +
+- (a if a is not None else 1,)
++ for v in colorsys.hls_to_rgb(
++ hue / 360., light / 1000., saturation / 1000.)) +
++ (alpha if alpha is not None else 1,)
+ )
+- for a in [None, 1, .2, 0]
+- for l in range(0, 1001, 125)
+- for s in range(0, 1001, 125)
+- for h in range(0, 360, 30)
++ for alpha in [None, 1, .2, 0]
++ for light in range(0, 1001, 125)
++ for saturation in range(0, 1001, 125)
++ for hue in range(0, 360, 30)
+ ))
+ print(']')
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index a7e5e70..1d7cfd8 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3411,6 +3411,7 @@ library to create slugs from unicode strings while
keeping it DRY.")
(origin
(method url-fetch)
(uri (pypi-uri "tinycss2" version))
+ (patches (search-patches "python-tinycss2-flake8-compat.patch"))
(sha256
(base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
(build-system python-build-system)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: python-tinycss2: Fix test failure.,
guix-commits <=