[veusz] Update to Veusz 1.20.1
Jeremy Sanders
jsanders at fedoraproject.org
Fri Feb 14 18:21:10 UTC 2014
commit d938d81b5f03c986e6dc59d4a84d001ce547f248
Author: Jeremy Sanders <jeremy at jeremysanders.net>
Date: Fri Feb 14 18:21:50 2014 +0000
Update to Veusz 1.20.1
- BuildRequires urw-fonts to fix self tests
- Patch self test failure on arm
arm-self-test-fix.patch | 32 ++++++++++++++++++++++++++++++++
veusz.spec | 3 +++
2 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/arm-self-test-fix.patch b/arm-self-test-fix.patch
new file mode 100644
index 0000000..d05da29
--- /dev/null
+++ b/arm-self-test-fix.patch
@@ -0,0 +1,32 @@
+diff --git a/tests/runselftest.py b/tests/runselftest.py
+index 1ec0944..870710c 100755
+--- a/tests/runselftest.py
++++ b/tests/runselftest.py
+@@ -233,12 +233,7 @@ def runTests():
+
+ oldflt = svg_export.fltStr
+ def fltStr(v, prec=1):
+- # this is to get consistent rounding to get the self test correct... yuck
+- # decimal would work, but that drags in loads of code
+- # convert float to string with prec decimal places
+-
+- v = round(v, prec+2)
+-
++ """Only output floats to 1 dp."""
+ return oldflt(v, prec=prec)
+
+ if __name__ == '__main__':
+diff --git a/veusz/document/svg_export.py b/veusz/document/svg_export.py
+index ae343ff..b90dde7 100644
+--- a/veusz/document/svg_export.py
++++ b/veusz/document/svg_export.py
+@@ -44,6 +44,9 @@ def fltStr(v, prec=2):
+ """Change a float to a string, using a maximum number of decimal places
+ but removing trailing zeros."""
+
++ # ensures consistent rounding behaviour on different platforms
++ v = round(v, prec+2)
++
+ val = ('% 20.10f' % v)[:10+prec]
+
+ # drop any trailing zeros
diff --git a/veusz.spec b/veusz.spec
index 13ebb05..3c54582 100644
--- a/veusz.spec
+++ b/veusz.spec
@@ -8,6 +8,7 @@ Group: Applications/Productivity
License: GPLv2+ and Python
URL: http://home.gna.org/veusz/
Source0: http://download.gna.org/veusz/veusz-%{version}.tar.gz
+Patch1: arm-self-test-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python2-devel
@@ -45,6 +46,7 @@ data.
%prep
%setup -q -n veusz-%{version}
+%patch1 -p1
find -name \*~ | xargs rm -f
# remove shebangs from scripts which aren't installed
@@ -157,6 +159,7 @@ rm -rf %{buildroot}
* Thu Feb 13 2014 Jeremy Sanders <jeremy at jeremysanders.net> 1.20.1-1
- Update to Veusz 1.20.1
- BuildRequires urw-fonts to fix self tests
+- Patch self test failure on arm
* Mon Jan 27 2014 Jeremy Sanders <jeremy at jeremysanders.net> 1.20-1
- Update to Veusz 1.20
More information about the scm-commits
mailing list