From 6834e0f6e7d422f8a8c3a4cfad21675358efcd2c6d21be733a82bda1521bdb37 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 26 Jan 2022 13:23:21 +0000 Subject: [PATCH] Accepting request 949219 from home:pgajdos:python - fix build with newer pythons - added patches https://github.com/jrbourbeau/pycondor/commit/b41b17546c898d5cc2368b92fda86473c605e923 + python-PyCondor-collections.abc-Iterable.patch OBS-URL: https://build.opensuse.org/request/show/949219 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyCondor?expand=0&rev=3 --- ...on-PyCondor-collections.abc-Iterable.patch | 27 +++++++++++++++++++ python-PyCondor.changes | 8 ++++++ python-PyCondor.spec | 7 +++-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 python-PyCondor-collections.abc-Iterable.patch diff --git a/python-PyCondor-collections.abc-Iterable.patch b/python-PyCondor-collections.abc-Iterable.patch new file mode 100644 index 0000000..12fb370 --- /dev/null +++ b/python-PyCondor-collections.abc-Iterable.patch @@ -0,0 +1,27 @@ +From b41b17546c898d5cc2368b92fda86473c605e923 Mon Sep 17 00:00:00 2001 +From: Duncan Macleod +Date: Thu, 18 Apr 2019 16:06:08 +0100 +Subject: [PATCH] updated import for python3.8 (#140) + +--- + pycondor/job.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/pycondor/job.py b/pycondor/job.py +index ef6f1bf..47762b6 100644 +--- a/pycondor/job.py ++++ b/pycondor/job.py +@@ -1,7 +1,11 @@ + + import os + import subprocess +-from collections import namedtuple, Iterable ++from collections import namedtuple ++try: ++ from collections.abc import Iterable ++except ImportError: # python < 3.3 ++ from collections import Iterable + + from .utils import (checkdir, string_rep, requires_command, + split_command_string, decode_string) + diff --git a/python-PyCondor.changes b/python-PyCondor.changes index 0abe52f..1813fa1 100644 --- a/python-PyCondor.changes +++ b/python-PyCondor.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jan 26 10:22:01 UTC 2022 - pgajdos@suse.com + +- fix build with newer pythons +- added patches + https://github.com/jrbourbeau/pycondor/commit/b41b17546c898d5cc2368b92fda86473c605e923 + + python-PyCondor-collections.abc-Iterable.patch + ------------------------------------------------------------------- Tue Aug 4 14:55:54 UTC 2020 - Atri Bhattacharya diff --git a/python-PyCondor.spec b/python-PyCondor.spec index 3eacc05..58961a9 100644 --- a/python-PyCondor.spec +++ b/python-PyCondor.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyCondor # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,12 +24,14 @@ Summary: Python utility for HTCondor License: MIT URL: https://github.com/jrbourbeau/pycondor Source: https://files.pythonhosted.org/packages/source/P/PyCondor/PyCondor-%{version}.tar.gz +# https://github.com/jrbourbeau/pycondor/commit/b41b17546c898d5cc2368b92fda86473c605e923 +Patch0: python-PyCondor-collections.abc-Iterable.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch # SECTION For tests BuildRequires: %{python_module click >= 7.0} @@ -42,6 +44,7 @@ PyCondor (Python HTCondor) is a tool to help build and submit workflows to HTCon %prep %setup -q -n PyCondor-%{version} +%patch0 -p1 sed -Ei "1{/^#!\/usr\/bin\/env python/d}" pycondor/tests/example_script.py %build