|
2 | 2 |
|
3 | 3 |
|
4 | 4 | NEVRS_STARTS = { |
5 | | - 2: (b'python(abi) = 2.',), |
6 | | - 3: (b'python(abi) = 3.',) |
| 5 | + 2: ('python(abi) = 2.',), |
| 6 | + 3: ('python(abi) = 3.',) |
7 | 7 | } |
8 | 8 |
|
9 | 9 | NAME_STARTS = { |
10 | 10 | 2: ( |
11 | | - b'python-', |
12 | | - b'python2', |
13 | | - b'/usr/bin/python2', |
14 | | - b'libpython2', |
15 | | - b'pygtk2', |
16 | | - b'pygobject2', |
17 | | - b'pycairo', |
18 | | - b'py-', |
| 11 | + 'python-', |
| 12 | + 'python2', |
| 13 | + '/usr/bin/python2', |
| 14 | + 'libpython2', |
| 15 | + 'pygtk2', |
| 16 | + 'pygobject2', |
| 17 | + 'pycairo', |
| 18 | + 'py-', |
19 | 19 | ), |
20 | 20 | 3: ( |
21 | | - b'python3', |
22 | | - b'/usr/bin/python3', |
23 | | - b'libpython3', |
24 | | - b'system-python' |
| 21 | + 'python3', |
| 22 | + '/usr/bin/python3', |
| 23 | + 'libpython3', |
| 24 | + 'system-python' |
25 | 25 | ) |
26 | 26 | } |
27 | 27 |
|
28 | 28 | NAME_EXACTS = { |
29 | 29 | 2: ( |
30 | | - b'/usr/bin/python', |
31 | | - b'python', |
| 30 | + '/usr/bin/python', |
| 31 | + 'python', |
32 | 32 | ) |
33 | 33 | } |
34 | 34 |
|
35 | 35 | NAME_NOTS = ( |
36 | | - b'python-rpm-macros', |
37 | | - b'python-srpm-macros', |
38 | | - b'python-sphinx-locale', |
39 | | - b'python-multilib-conf', |
40 | | - b'python-ldb-devel-common', |
41 | | - b'python-qt5-rpm-macros', |
42 | | - b'python-btchip-common', |
43 | | - b'python-matplotlib-data', |
44 | | - b'python-matplotlib-data-fonts', |
45 | | - b'python-cartopy-common', |
46 | | - b'python-django-bash-completion', |
47 | | - b'python-jupyter-filesystem', |
48 | | - b'python-pip-wheel', |
49 | | - b'python-setuptools-wheel', |
50 | | - b'python-wheel-wheel', |
| 36 | + 'python-rpm-macros', |
| 37 | + 'python-srpm-macros', |
| 38 | + 'python-sphinx-locale', |
| 39 | + 'python-multilib-conf', |
| 40 | + 'python-ldb-devel-common', |
| 41 | + 'python-qt5-rpm-macros', |
| 42 | + 'python-btchip-common', |
| 43 | + 'python-matplotlib-data', |
| 44 | + 'python-matplotlib-data-fonts', |
| 45 | + 'python-cartopy-common', |
| 46 | + 'python-django-bash-completion', |
| 47 | + 'python-jupyter-filesystem', |
| 48 | + 'python-pip-wheel', |
| 49 | + 'python-setuptools-wheel', |
| 50 | + 'python-wheel-wheel', |
51 | 51 | ) |
52 | 52 |
|
53 | 53 |
|
@@ -80,22 +80,22 @@ def check_two_three(package): |
80 | 80 | for nevr in package.require_nevrs: |
81 | 81 | for py_version, starts in NEVRS_STARTS.items(): |
82 | 82 | if nevr.startswith(starts): |
83 | | - log.debug('Found dependency {}'.format(nevr.decode())) |
| 83 | + log.debug('Found dependency {}'.format(nevr)) |
84 | 84 | log.debug('Requires Python {}'.format(py_version)) |
85 | 85 | py_versions[py_version] = nevr |
86 | 86 |
|
87 | 87 | for name in package.require_names: |
88 | 88 | for py_version, starts in NAME_STARTS.items(): |
89 | 89 | if py_version not in py_versions: |
90 | 90 | if name.startswith(starts) and name not in NAME_NOTS: |
91 | | - log.debug('Found dependency {}'.format(name.decode())) |
| 91 | + log.debug('Found dependency {}'.format(name)) |
92 | 92 | log.debug('Requires Python {}'.format(py_version)) |
93 | 93 | py_versions[py_version] = name |
94 | 94 |
|
95 | 95 | for py_version, exacts in NAME_EXACTS.items(): |
96 | 96 | if py_version not in py_versions: |
97 | 97 | if name in exacts: |
98 | | - log.debug('Found dependency {}'.format(name.decode())) |
| 98 | + log.debug('Found dependency {}'.format(name)) |
99 | 99 | log.debug('Requires Python {}'.format(py_version)) |
100 | 100 | py_versions[py_version] = name |
101 | 101 |
|
|
0 commit comments