diff --git a/.python-marathon.metadata b/.python-marathon.metadata new file mode 100644 index 0000000..f54d29b --- /dev/null +++ b/.python-marathon.metadata @@ -0,0 +1 @@ +3fd478e2975ede6e18639165bee0c2c266b8f839 SOURCES/marathon-python-0.13.0.tar.gz diff --git a/SOURCES/iterable-import-from-collections.abc.patch b/SOURCES/iterable-import-from-collections.abc.patch new file mode 100644 index 0000000..38389d0 --- /dev/null +++ b/SOURCES/iterable-import-from-collections.abc.patch @@ -0,0 +1,27 @@ +Description: Iterable import from collections.abc + Iterable has moved to collections.abc a long time ago. +Author: Thomas Goirand +Bug-Debian: https://bugs.debian.org/1009460 +Forwarded: no +Last-Update: 2022-05-01 + +--- python-marathon-0.13.0.orig/marathon/util.py ++++ python-marathon-0.13.0/marathon/util.py +@@ -24,7 +24,7 @@ class MarathonJsonEncoder(json.JSONEncod + if isinstance(obj, datetime.datetime): + return obj.strftime('%Y-%m-%dT%H:%M:%S.%fZ') + +- if isinstance(obj, collections.Iterable) and not isinstance(obj, str): ++ if isinstance(obj, collections.abc.Iterable) and not isinstance(obj, str): + try: + return {k: self.default(v) for k, v in obj.items()} + except AttributeError: +@@ -44,7 +44,7 @@ class MarathonMinimalJsonEncoder(json.JS + if isinstance(obj, datetime.datetime): + return obj.strftime('%Y-%m-%dT%H:%M:%S.%fZ') + +- if isinstance(obj, collections.Iterable) and not isinstance(obj, str): ++ if isinstance(obj, collections.abc.Iterable) and not isinstance(obj, str): + try: + return {k: self.default(v) for k, v in obj.items() if (v or v in (False, 0))} + except AttributeError: diff --git a/SOURCES/marathon-dont-use-2to3.patch b/SOURCES/marathon-dont-use-2to3.patch new file mode 100644 index 0000000..c587df4 --- /dev/null +++ b/SOURCES/marathon-dont-use-2to3.patch @@ -0,0 +1,11 @@ +--- a/setup.py 2022-06-27 22:09:54.656351306 +0300 ++++ b/setup.py 2022-06-27 22:10:01.098329096 +0300 +@@ -3,8 +3,6 @@ + from setuptools import setup + + extra = {} +-if sys.version_info >= (3,): +- extra['use_2to3'] = True + + setup( + name='marathon', diff --git a/SPECS/python-marathon.spec b/SPECS/python-marathon.spec new file mode 100644 index 0000000..185de3f --- /dev/null +++ b/SPECS/python-marathon.spec @@ -0,0 +1,133 @@ +%global srcname marathon + +Name: python-marathon +Version: 0.13.0 +Release: 2%{?dist} +Summary: Python client library/interface to the Mesos Marathon REST API + +License: MIT +URL: https://github.com/thefactory/marathon-python +Source0: %url/archive/%{version}/marathon-python-%{version}.tar.gz + +Patch0: marathon-dont-use-2to3.patch +Patch1: iterable-import-from-collections.abc.patch + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: python3-requests-mock +BuildRequires: pyproject-rpm-macros +%py_provides python3-%{srcname} + +%description +%{summary}. + +%package -n python3-%{srcname} +Summary: %{summary} + +%description -n python3-%{srcname} +%{summary}. + +%prep +%autosetup -p1 -n marathon-python-%{version} + +# DeprecationWarning: Please use assertEqual instead +for f in tests/test_model_app.py tests/test_model_deployment.py +do + sed -i 's/assertEquals/assertEqual/' $f +done + +%generate_buildrequires +%pyproject_buildrequires -r + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{srcname} + +%check +%pytest + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc README.md +%license LICENSE + +%changelog +* Fri Jul 22 2022 Fedora Release Engineering - 0.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 27 2022 Ali Erdinc Koroglu - 0.13.0-1 +- Update to 0.13.0 (RHBZ #1426591 and #2019072) + +* Mon Jun 13 2022 Python Maint - 0.8.8-20 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.8.8-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.8.8-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.8.8-17 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.8.8-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.8.8-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.8.8-14 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.8.8-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 0.8.8-12 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.8.8-11 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.8.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 0.8.8-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek - 0.8.8-8 +- Subpackage python2-marathon has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Jul 14 2018 Fedora Release Engineering - 0.8.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 0.8.8-6 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.8.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 25 2018 Iryna Shcherbina - 0.8.8-4 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Thu Jul 27 2017 Fedora Release Engineering - 0.8.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.8.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jan 4 2017 David Moreau Simard - 0.8.8-1 +- Update to upstream 0.8.8 +- Include license in package (fixed by upstream issue #156) + +* Mon Dec 19 2016 Miro Hrončok - 0.8.7-2 +- Rebuild for Python 3.6 + +* Fri Oct 14 2016 David Moreau Simard - 0.8.6-1 +- First version +