]> git.pld-linux.org Git - packages/python-slip.git/commitdiff
- new URLs, updated to 0.6.5 auto/th/python-slip-0.6.5-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 3 Jul 2021 18:01:54 +0000 (20:01 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 3 Jul 2021 18:01:54 +0000 (20:01 +0200)
- added collections_abc patch (fix for collections.Callable deprecated since 3.2, removed in python 3.9)

python-slip-collections_abc.patch [new file with mode: 0644]
python-slip.spec

diff --git a/python-slip-collections_abc.patch b/python-slip-collections_abc.patch
new file mode 100644 (file)
index 0000000..a295efd
--- /dev/null
@@ -0,0 +1,57 @@
+--- python-slip-0.6.5/slip/dbus/polkit.py.orig 2017-05-16 12:14:36.000000000 +0200
++++ python-slip-0.6.5/slip/dbus/polkit.py      2021-07-03 19:34:39.676622157 +0200
+@@ -26,7 +26,7 @@
+ from __future__ import absolute_import
+-import collections
++from six.moves import collections_abc
+ import dbus
+ from decorator import decorator
+ from functools import reduce
+@@ -103,14 +103,14 @@
+             def some_method(self, ...):
+                 ..."""
+-    assert(func is None or isinstance(func, collections.Callable))
++    assert(func is None or isinstance(func, collections_abc.Callable))
+     assert(
+         authfail_result in (None, AUTHFAIL_DONTCATCH) or
+         authfail_exception is None)
+     assert(
+         authfail_callback is None or
+-        isinstance(authfail_callback, collections.Callable))
++        isinstance(authfail_callback, collections_abc.Callable))
+     assert(
+         authfail_exception is None or
+         issubclass(authfail_exception, Exception))
+--- python-slip-0.6.5/slip/util/hookable.py.orig       2017-05-16 12:14:36.000000000 +0200
++++ python-slip-0.6.5/slip/util/hookable.py    2021-07-03 19:35:20.166402805 +0200
+@@ -23,7 +23,7 @@
+ """This module contains variants of certain base types which call registered
+ hooks on changes."""
+-import collections
++from six.moves import collections_abc
+ from six import with_metaclass
+ __all__ = ["Hookable", "HookableSet"]
+@@ -67,7 +67,7 @@
+     def __init__(self, hook, args, kwargs, hookable=None):
+-        assert(isinstance(hook, collections.Callable))
++        assert(isinstance(hook, collections_abc.Callable))
+         assert(isinstance(hookable, Hookable))
+         for n, x in enumerate(args):
+@@ -174,7 +174,7 @@
+         self.__add_hook(hook, self, *args, **kwargs)
+     def __add_hook(self, hook, _hookable, *args, **kwargs):
+-        assert isinstance(hook, collections.Callable)
++        assert isinstance(hook, collections_abc.Callable)
+         assert isinstance(_hookable, Hookable)
+         hookentry = _HookEntry(hook, args, kwargs, hookable=_hookable)
+         self.__hooks__.add(hookentry)
index 4b1cb7a179c66dc26073f953588bf6f78ed87603..9c9111eb89bb2831b651d675bd86de54b7098de8 100644 (file)
@@ -6,13 +6,15 @@
 Summary:       Miscellaneous convenience, extension and workaround code for Python 2
 Summary(pl.UTF-8):     Kod różnych udogodnień, rozszerzeń i obejść dla Pythona 2
 Name:          python-slip
-Version:       0.6.0
-Release:       10
+Version:       0.6.5
+Release:       1
 License:       GPL v2+
 Group:         Development/Languages/Python
-Source0:       https://fedorahosted.org/released/python-slip/%{name}-%{version}.tar.bz2
-# Source0-md5: fb3299d75af1a67ca6679d96ce839da6
-URL:           https://fedorahosted.org/python-slip/
+#Source0Download: https://github.com/nphilipp/python-slip/releases
+Source0:       https://github.com/nphilipp/python-slip/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5: 28ae5f93853466c44ec96706ba2a1eb4
+Patch0:                %{name}-collections_abc.patch
+URL:           https://github.com/nphilipp/python-slip
 %if %{with python2}
 BuildRequires: python >= 2
 BuildRequires: python-devel >= 2
@@ -21,9 +23,9 @@ BuildRequires:        python-devel >= 2
 BuildRequires: python3 >= 1:3.2
 BuildRequires: python3-modules >= 1:3.2
 %endif
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
 Requires:      python-selinux
-Requires:      python-six
+Requires:      python-six >= 1.13.0
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -49,7 +51,7 @@ Requires:     python-dbus >= 0.80
 Requires:      python-decorator
 # pygobject2 or pygobject3 actually (using slip._wrapper._gobject)
 Requires:      python-pygobject >= 2
-Requires:      python-six
+Requires:      python-six >= 1.13.0
 Suggests:      polkit >= 0.94
 Conflicts:     PolicyKit < 0.8-3
 Conflicts:     polkit < 0.94
@@ -122,7 +124,7 @@ Group:              Libraries
 Requires:      python3-dbus >= 0.80
 Requires:      python3-decorator
 Requires:      python3-pygobject3 >= 3
-Requires:      python3-six
+Requires:      python3-six >= 1.13.0
 Requires:      python3-slip = %{version}-%{release}
 Suggests:      polkit >= 0.94
 Conflicts:     PolicyKit < 0.8-3
@@ -150,6 +152,7 @@ PolicyKit.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__make} $(pwd)/setup.py
This page took 0.111373 seconds and 4 git commands to generate.