From 2f1bfb0310895a14ab2bba528195cb3715dd98c3824b7b6fa7a46868f8fcf278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 6 Dec 2019 07:43:35 +0000 Subject: [PATCH] - Add patch to fix building with python 3.8 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymarc?expand=0&rev=6 --- python-pymarc.changes | 5 +++++ python-pymarc.spec | 4 +++- python38.patch | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 python38.patch diff --git a/python-pymarc.changes b/python-pymarc.changes index 16523c4..72b14b9 100644 --- a/python-pymarc.changes +++ b/python-pymarc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 6 07:42:48 UTC 2019 - Tomáš Chvátal + +- Add patch to fix building with python 3.8 + ------------------------------------------------------------------- Sat Aug 24 14:18:04 UTC 2019 - Jan Engelhardt diff --git a/python-pymarc.spec b/python-pymarc.spec index 6170b63..51628b7 100644 --- a/python-pymarc.spec +++ b/python-pymarc.spec @@ -1,7 +1,7 @@ # # spec file for package python-pymarc # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ Group: Development/Languages/Python URL: https://github.com/edsu/pymarc Source: https://files.pythonhosted.org/packages/source/p/pymarc/pymarc-%{version}.tar.gz Source1: https://raw.githubusercontent.com/edsu/pymarc/master/LICENSE +Patch0: python38.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -45,6 +46,7 @@ saner representation. %prep %setup -q -n pymarc-%{version} +%patch0 -p1 cp %{SOURCE1} . %build diff --git a/python38.patch b/python38.patch new file mode 100644 index 0000000..79463f5 --- /dev/null +++ b/python38.patch @@ -0,0 +1,24 @@ +From 44d37f6aef231e1b874f2c12e002007d686da28e Mon Sep 17 00:00:00 2001 +From: Geoffrey Spear +Date: Mon, 7 Oct 2019 08:33:07 -0400 +Subject: [PATCH 1/2] test on 3.8-dev + +--- + pymarc/marcxml.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pymarc/marcxml.py b/pymarc/marcxml.py +index 7d87905..f351a8b 100644 +--- a/pymarc/marcxml.py ++++ b/pymarc/marcxml.py +@@ -160,9 +160,9 @@ def translate(data): + control_field.text = translate(field.data) + else: + data_field = ET.SubElement(root, 'datafield') +- data_field.set('tag', field.tag) + data_field.set('ind1', field.indicators[0]) + data_field.set('ind2', field.indicators[1]) ++ data_field.set('tag', field.tag) + for subfield in field: + data_subfield = ET.SubElement(data_field, 'subfield') + data_subfield.set('code', subfield[0])