Hello community,
here is the log from the commit of package python-fontPens for openSUSE:Factory
checked in at 2020-06-12 21:45:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fontPens (Old)
and /work/SRC/openSUSE:Factory/.python-fontPens.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fontPens"
Fri Jun 12 21:45:36 2020 rev:2 rq:814148 version:0.2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fontPens/python-fontPens.changes
2020-05-29 21:36:14.278446429 +0200
+++
/work/SRC/openSUSE:Factory/.python-fontPens.new.3606/python-fontPens.changes
2020-06-12 21:46:36.180699433 +0200
@@ -1,0 +2,7 @@
+Fri Jun 12 11:47:01 UTC 2020 - Antonio Larrosa <[email protected]>
+
+- Add patch to fix floating point precission issue that made tests
+ fail depending on where the package is built
+ * fix-fp-issue.patch
+
+-------------------------------------------------------------------
New:
----
fix-fp-issue.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-fontPens.spec ++++++
--- /var/tmp/diff_new_pack.2sw5Ww/_old 2020-06-12 21:46:37.448706608 +0200
+++ /var/tmp/diff_new_pack.2sw5Ww/_new 2020-06-12 21:46:37.452706631 +0200
@@ -24,6 +24,7 @@
License: BSD-3-Clause
URL: https://github.com/robofab-developers/fontPens
Source:
https://files.pythonhosted.org/packages/source/f/fontPens/fontPens-%{version}.zip
+Patch0: fix-fp-issue.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -42,6 +43,7 @@
%prep
%setup -q -n fontPens-%{version}
+%patch0 -p1
%build
%python_build
++++++ fix-fp-issue.patch ++++++
Subject: Fix floating point precission issue in tests
Author: Antonio Larrosa <[email protected]>
Depending on the computer where the tests run, the result of
estimateQuadraticCurveLength((0, 0), (50, 20), (100, 40))
can be
107.70329614269009
or
107.70329614269008
so it's better to ignore the final digit
Index:
antonio/obs/home/alarrosa/branches/devel/languages/python/fonts/python-fontPens/fontPens-0.2.4/Lib/fontPens/penTools.py
===================================================================
--- fontPens-0.2.4/Lib/fontPens/penTools.py
+++ fontPens-0.2.4.new/Lib/fontPens/penTools.py
@@ -160,8 +160,8 @@ def estimateQuadraticCurveLength(pt0, pt
0.0
>>> estimateQuadraticCurveLength((0, 0), (50, 0), (80, 0)) # collinear
points
80.0
- >>> estimateQuadraticCurveLength((0, 0), (50, 20), (100, 40)) # collinear
points
- 107.70329614269009
+ >>> int(10000000000000 * estimateQuadraticCurveLength((0, 0), (50, 20),
(100, 40))) # collinear points
+ 1077032961426900
>>> estimateQuadraticCurveLength((0, 0), (0, 100), (100, 0))
153.6861437729263
>>> estimateQuadraticCurveLength((0, 0), (50, -10), (80, 50))