From bc789187a9d6e2cd83b1cd6d1df32cdba0f00962ed317d77626aa9f31ac5976b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 28 Jan 2022 11:09:53 +0000 Subject: [PATCH 1/3] Accepting request 949652 from home:pgajdos:python - fix for python 3.10 - added patches fix https://github.com/datacenter/acitoolkit/commit/629b84887dd0f0183b81efc8adb16817f985541a + python-acitoolkit-python-310.patch OBS-URL: https://build.opensuse.org/request/show/949652 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-acitoolkit?expand=0&rev=12 --- python-acitoolkit-python-310.patch | 20 ++++++++++++++++++++ python-acitoolkit.changes | 8 ++++++++ python-acitoolkit.spec | 7 +++++-- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 python-acitoolkit-python-310.patch diff --git a/python-acitoolkit-python-310.patch b/python-acitoolkit-python-310.patch new file mode 100644 index 0000000..5c99423 --- /dev/null +++ b/python-acitoolkit-python-310.patch @@ -0,0 +1,20 @@ +diff --git a/acitoolkit/acitoolkit.py b/acitoolkit/acitoolkit.py +index 3c4b0f61..495bf690 100755 +--- a/acitoolkit/acitoolkit.py ++++ b/acitoolkit/acitoolkit.py +@@ -30,7 +30,13 @@ + """ Main ACI Toolkit module + This is the main module that comprises the ACI Toolkit. + """ +-from collections import Sequence ++try: ++ # Python <=3.9 ++ from collections import Sequence ++except ImportError: ++ # Python > 3.8 ++ from collections.abc import Sequence ++ + import logging + from operator import attrgetter, itemgetter + import re + diff --git a/python-acitoolkit.changes b/python-acitoolkit.changes index 8e5d3ae..633f51c 100644 --- a/python-acitoolkit.changes +++ b/python-acitoolkit.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jan 28 10:10:09 UTC 2022 - pgajdos@suse.com + +- fix for python 3.10 +- added patches + fix https://github.com/datacenter/acitoolkit/commit/629b84887dd0f0183b81efc8adb16817f985541a + + python-acitoolkit-python-310.patch + ------------------------------------------------------------------- Thu Mar 28 10:10:24 UTC 2019 - Tomáš Chvátal diff --git a/python-acitoolkit.spec b/python-acitoolkit.spec index ec76651..1f8e4e7 100644 --- a/python-acitoolkit.spec +++ b/python-acitoolkit.spec @@ -1,7 +1,7 @@ # # spec file for package python-acitoolkit # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -26,6 +26,8 @@ Group: Development/Languages/Python URL: http://github.com/datacenter/acitoolkit Source: https://github.com/datacenter/acitoolkit/archive/v%{version}.tar.gz Patch0: remove-app-dependency.patch +# https://github.com/datacenter/acitoolkit/commit/629b84887dd0f0183b81efc8adb16817f985541a +Patch1: python-acitoolkit-python-310.patch BuildRequires: %{python_module graphviz} BuildRequires: %{python_module jsonschema} BuildRequires: %{python_module mock} @@ -89,10 +91,11 @@ Python samples for using acitoolkit for programming ACI. %setup -q -n acitoolkit-%{version} # Remove dependencies of applications/ and samples/ from the library %patch0 -p1 +%patch1 -p1 chmod -x LICENSE NOTICE -sed -i '1{/^#!.*env python/d}' acitoolkit/*.py samples/*.py samples/switch-commands/*.py +sed -i '1{/^#!.*env python/d}' acitoolkit/*.py samples/*.py samples/switch-commands/*.py rm applications/cableplan/.coverage applications/eventfeeds/.gitignore From e907e1655539fe6d07115fd735e2794e2d60cbddc5f8a67dc689e7b4820c9cf4 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 1 Feb 2022 08:02:10 +0000 Subject: [PATCH 2/3] Accepting request 950358 from home:pgajdos:python - use spec cleaner, remove redundant Provides OBS-URL: https://build.opensuse.org/request/show/950358 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-acitoolkit?expand=0&rev=13 --- python-acitoolkit.changes | 5 +++++ python-acitoolkit.spec | 27 ++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/python-acitoolkit.changes b/python-acitoolkit.changes index 633f51c..368b7c1 100644 --- a/python-acitoolkit.changes +++ b/python-acitoolkit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 1 07:10:38 UTC 2022 - pgajdos@suse.com + +- use spec cleaner, remove redundant Provides + ------------------------------------------------------------------- Fri Jan 28 10:10:09 UTC 2022 - pgajdos@suse.com diff --git a/python-acitoolkit.spec b/python-acitoolkit.spec index 1f8e4e7..e2ff071 100644 --- a/python-acitoolkit.spec +++ b/python-acitoolkit.spec @@ -23,7 +23,7 @@ Release: 0 Summary: Python library for programming ACI License: Apache-2.0 Group: Development/Languages/Python -URL: http://github.com/datacenter/acitoolkit +URL: https://github.com/datacenter/acitoolkit Source: https://github.com/datacenter/acitoolkit/archive/v%{version}.tar.gz Patch0: remove-app-dependency.patch # https://github.com/datacenter/acitoolkit/commit/629b84887dd0f0183b81efc8adb16817f985541a @@ -54,15 +54,13 @@ Infrastructure Controller. %package -n %{name}-doc Summary: Documentation for the Python acitoolkit library Group: Documentation/Other -Provides: %{python_module acitoolkit-doc = %{version}} %description -n %{name}-doc -Documentation for %name. +Documentation for %{name}. %package -n %{name}-doc-applications Summary: Applications for the Python acitoolkit library Group: Development/Languages/Python -Provides: %{python_module acitoolkit-doc-applications = %{version}} Requires: %{name}-doc Requires: python-Flask Requires: python-Flask-Admin @@ -80,7 +78,6 @@ Python applications using acitoolkit for programming ACI. %package -n %{name}-doc-samples Summary: Sample code for the Python acitoolkit library Group: Development/Languages/Python -Provides: %{python_module acitoolkit-doc-samples = %{version}} Requires: %{name}-doc Requires: python-PyMySQL @@ -114,27 +111,27 @@ dos2unix \ %python_expand %fdupes %{buildroot}%{$python_sitelib} # Install docs, samples and applications into a common doc area -install -d %{buildroot}%_defaultdocdir/%{name} -cp -rp docs/source/*.rst docs/source/*.png docs/source/stats/ samples/ applications/ %{buildroot}%_defaultdocdir/%{name}/ -find %{buildroot}%_defaultdocdir/%{name}/ -type f -exec chmod a-x \{\} \; +install -d %{buildroot}%{_defaultdocdir}/%{name} +cp -rp docs/source/*.rst docs/source/*.png docs/source/stats/ samples/ applications/ %{buildroot}%{_defaultdocdir}/%{name}/ +find %{buildroot}%{_defaultdocdir}/%{name}/ -type f -exec chmod a-x \{\} \; -%fdupes %{buildroot}%_defaultdocdir/%{name}/ +%fdupes %{buildroot}%{_defaultdocdir}/%{name}/ %check %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests/acitoolkit_test.py offline %files -n %{name}-doc %license LICENSE NOTICE -%dir %_defaultdocdir/%{name} -%_defaultdocdir/%{name}/*.rst -%_defaultdocdir/%{name}/*.png -%_defaultdocdir/%{name}/stats/ +%dir %{_defaultdocdir}/%{name} +%{_defaultdocdir}/%{name}/*.rst +%{_defaultdocdir}/%{name}/*.png +%{_defaultdocdir}/%{name}/stats/ %files -n %{name}-doc-samples -%_defaultdocdir/%{name}/samples/ +%{_defaultdocdir}/%{name}/samples/ %files -n %{name}-doc-applications -%_defaultdocdir/%{name}/applications/ +%{_defaultdocdir}/%{name}/applications/ %files %{python_files} %doc README.md From c6c392920c1e9223a80ed9c4f36856509100df93665401a70bc100efbaee928b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 3 Feb 2022 16:16:29 +0000 Subject: [PATCH 3/3] Accepting request 951328 from home:dimstar:Factory I hope, having touched this now, I'm not magically turning into a maintainer OBS-URL: https://build.opensuse.org/request/show/951328 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-acitoolkit?expand=0&rev=14 --- python-acitoolkit.changes | 6 ++++++ python-acitoolkit.spec | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/python-acitoolkit.changes b/python-acitoolkit.changes index 368b7c1..d4cb66e 100644 --- a/python-acitoolkit.changes +++ b/python-acitoolkit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 3 14:07:10 UTC 2022 - Dominique Leuenberger + +- Fix install dependencies of -doc-applications and -doc-samples: + make them rely on the primary python interpreter version. + ------------------------------------------------------------------- Tue Feb 1 07:10:38 UTC 2022 - pgajdos@suse.com diff --git a/python-acitoolkit.spec b/python-acitoolkit.spec index e2ff071..5c5b7c4 100644 --- a/python-acitoolkit.spec +++ b/python-acitoolkit.spec @@ -61,16 +61,16 @@ Documentation for %{name}. %package -n %{name}-doc-applications Summary: Applications for the Python acitoolkit library Group: Development/Languages/Python -Requires: %{name}-doc -Requires: python-Flask -Requires: python-Flask-Admin -Requires: python-Flask-Bootstrap -Requires: python-Flask-Cors -Requires: python-Flask-HTTPAuth -Requires: python-Flask-SQLAlchemy -Requires: python-Flask-WTF -Requires: python-GitPython -Requires: python-py-radix +Requires: python-acitoolkit-doc +Requires: python3-Flask +Requires: python3-Flask-Admin +Requires: python3-Flask-Bootstrap +Requires: python3-Flask-Cors +Requires: python3-Flask-HTTPAuth +Requires: python3-Flask-SQLAlchemy +Requires: python3-Flask-WTF +Requires: python3-GitPython +Requires: python3-py-radix %description -n %{name}-doc-applications Python applications using acitoolkit for programming ACI. @@ -79,7 +79,7 @@ Python applications using acitoolkit for programming ACI. Summary: Sample code for the Python acitoolkit library Group: Development/Languages/Python Requires: %{name}-doc -Requires: python-PyMySQL +Requires: python3-PyMySQL %description -n %{name}-doc-samples Python samples for using acitoolkit for programming ACI.