From 20d0e1516d8efe60bba1288d1eff42ede714352740a4f19b8c3724bf8f4298b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 25 Jul 2024 10:13:30 +0000 Subject: [PATCH] Accepting request 1189465 from home:azouhr:branches:devel:languages:python - Add field_parser.patch to ensure that fields are parsed with little endian. Created pull request at gh#olemb/dbfread#71. OBS-URL: https://build.opensuse.org/request/show/1189465 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dbfread?expand=0&rev=12 --- field_parser.patch | 13 +++++++++++++ python-dbfread.changes | 6 ++++++ python-dbfread.spec | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 field_parser.patch diff --git a/field_parser.patch b/field_parser.patch new file mode 100644 index 0000000..ca484bb --- /dev/null +++ b/field_parser.patch @@ -0,0 +1,13 @@ +Index: dbfread-2.0.7/dbfread/field_parser.py +=================================================================== +--- dbfread-2.0.7.orig/dbfread/field_parser.py ++++ dbfread-2.0.7/dbfread/field_parser.py +@@ -175,7 +175,7 @@ class FieldParser: + + def parseO(self, field, data): + """Parse long field (O) and return float.""" +- return struct.unpack('d', data)[0] ++ return struct.unpack(' + +- Add field_parser.patch to ensure that fields are parsed with + little endian. Created pull request at gh#olemb/dbfread#71. + ------------------------------------------------------------------- Fri Nov 1 13:49:17 CET 2019 - Matej Cepl diff --git a/python-dbfread.spec b/python-dbfread.spec index 5b2af33..e1b1a2b 100644 --- a/python-dbfread.spec +++ b/python-dbfread.spec @@ -1,7 +1,7 @@ # # spec file for package python-dbfread # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,7 @@ URL: https://github.com/olemb/dbfread Source: https://files.pythonhosted.org/packages/source/d/dbfread/dbfread-%{version}.tar.gz # gh#olemb/dbfread#33 Patch0: pytest4.patch +Patch1: field_parser.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes