File: fix-setup.py-to-work-with-python3.patch

package info (click to toggle)
python-requests-kerberos 0.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 184 kB
  • ctags: 129
  • sloc: python: 595; makefile: 27
file content (20 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fix setup.py to work as well in Python 3
 The filter function in Python 3 doesn't return a list anymore, so we use
 list() to convert it.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2014-06-17

Index: python-requests-kerberos/setup.py
===================================================================
--- python-requests-kerberos.orig/setup.py
+++ python-requests-kerberos/setup.py
@@ -35,7 +35,7 @@ def get_version():
     """
     reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
     with open('requests_kerberos/__init__.py') as fd:
-        matches = filter(lambda x: x, map(reg.match, fd))
+        matches = list(filter(lambda x: x, map(reg.match, fd)))
 
     if not matches:
         raise RuntimeError(