forked from pool/python-marathon
Accepting request 958036 from home:pgajdos:python
- fix build, run tests
- added patches
fix https://github.com/thefactory/marathon-python/issues/284
+ python-marathon-no-2to3.patch
fix 1850734b5b.diff
+ python-marathon-use-collections.abc.patch
OBS-URL: https://build.opensuse.org/request/show/958036
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-marathon?expand=0&rev=14
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:73fd9104cb5778b4cb1bb24601704beec6931133edc196ab2d6f81934d3dde0b
|
||||
size 25846
|
||||
oid sha256:c0ac040a4b67cb649e52e897b47ba43e984c9ecff17727c9627f9dc4fb06ee0b
|
||||
size 50507
|
||||
|
||||
21
python-marathon-no-2to3.patch
Normal file
21
python-marathon-no-2to3.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Index: marathon-0.13.0/setup.py
|
||||
===================================================================
|
||||
--- marathon-0.13.0.orig/setup.py 2020-08-21 18:22:30.000000000 +0200
|
||||
+++ marathon-0.13.0/setup.py 2022-02-28 12:20:53.654551958 +0100
|
||||
@@ -2,10 +2,6 @@
|
||||
import sys
|
||||
from setuptools import setup
|
||||
|
||||
-extra = {}
|
||||
-if sys.version_info >= (3,):
|
||||
- extra['use_2to3'] = True
|
||||
-
|
||||
setup(
|
||||
name='marathon',
|
||||
version='0.13.0',
|
||||
@@ -30,5 +26,4 @@ setup(
|
||||
'Programming Language :: Python',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules'
|
||||
],
|
||||
- **extra
|
||||
)
|
||||
15
python-marathon-use-collections.abc.patch
Normal file
15
python-marathon-use-collections.abc.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/marathon/util.py b/marathon/util.py
|
||||
index d9f5664..af2932e 100644
|
||||
--- a/marathon/util.py
|
||||
+++ b/marathon/util.py
|
||||
@@ -1,4 +1,10 @@
|
||||
-import collections
|
||||
+# collections.abc new as of 3.3, and collections is deprecated. collections
|
||||
+# will be unavailable in 3.9
|
||||
+try:
|
||||
+ import collections.abc as collections
|
||||
+except ImportError:
|
||||
+ import collections
|
||||
+
|
||||
import datetime
|
||||
import logging
|
||||
@@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 28 11:36:47 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- fix build, run tests
|
||||
- added patches
|
||||
fix https://github.com/thefactory/marathon-python/issues/284
|
||||
+ python-marathon-no-2to3.patch
|
||||
fix https://github.com/thefactory/marathon-python/commit/1850734b5b916d1455416833f0aed239b308dd9f.diff
|
||||
+ python-marathon-use-collections.abc.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 16 11:16:02 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-marathon
|
||||
#
|
||||
# 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
|
||||
@@ -25,7 +25,15 @@ Summary: Marathon Client Library
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/thefactory/marathon-python
|
||||
Source: https://files.pythonhosted.org/packages/source/m/marathon/marathon-%{version}.tar.gz
|
||||
Source: https://github.com/thefactory/marathon-python/archive/refs/tags/%{version}.tar.gz#/marathon-%{version}.tar.gz
|
||||
# https://github.com/thefactory/marathon-python/issues/284
|
||||
Patch0: python-marathon-no-2to3.patch
|
||||
# https://github.com/thefactory/marathon-python/commit/1850734b5b916d1455416833f0aed239b308dd9f.diff
|
||||
Patch1: python-marathon-use-collections.abc.patch
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module requests-mock}
|
||||
BuildRequires: %{python_module requests-toolbelt}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-requests >= 2.4.0
|
||||
@@ -37,7 +45,9 @@ BuildArch: noarch
|
||||
Python interface to the Mesos Marathon REST API.
|
||||
|
||||
%prep
|
||||
%setup -q -n marathon-%{version}
|
||||
%setup -q -n marathon-python-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -46,7 +56,7 @@ Python interface to the Mesos Marathon REST API.
|
||||
%python_install
|
||||
|
||||
%check
|
||||
# requires Docker and Marathon server installed there
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
||||
Reference in New Issue
Block a user