|
12 | 12 | from urllib.request import urlretrieve |
13 | 13 | from os import listdir, unlink, environ, curdir, walk |
14 | 14 | from sys import stdout |
15 | | -from wheel.wheelfile import WheelFile |
16 | | -from wheel.cli.tags import tags as wheel_tags |
17 | 15 | import time |
18 | 16 | try: |
19 | 17 | from urlparse import urlparse |
|
26 | 24 | logger, info, warning, debug, shprint, info_main, error) |
27 | 25 | from pythonforandroid.util import ( |
28 | 26 | current_directory, ensure_dir, BuildInterruptingException, rmdir, move, |
29 | | - touch) |
| 27 | + touch, patch_wheel_setuptools_logging) |
30 | 28 | from pythonforandroid.util import load_source as import_recipe |
31 | 29 |
|
32 | 30 |
|
@@ -469,8 +467,7 @@ def unpack(self, arch): |
469 | 467 | elif extraction_filename.endswith( |
470 | 468 | ('.tar.gz', '.tgz', '.tar.bz2', '.tbz2', '.tar.xz', '.txz')): |
471 | 469 | sh.tar('xf', extraction_filename) |
472 | | - root_directory = sh.tar('tf', extraction_filename).stdout.decode( |
473 | | - 'utf-8').split('\n')[0].split('/')[0] |
| 470 | + root_directory = sh.tar('tf', extraction_filename).split('\n')[0].split('/')[0] |
474 | 471 | if root_directory != basename(directory_name): |
475 | 472 | move(root_directory, directory_name) |
476 | 473 | else: |
@@ -1205,6 +1202,9 @@ def get_wheel_platform_tag(self, arch): |
1205 | 1202 | }[arch.arch] |
1206 | 1203 |
|
1207 | 1204 | def install_wheel(self, arch, built_wheels): |
| 1205 | + with patch_wheel_setuptools_logging(): |
| 1206 | + from wheel.cli.tags import tags as wheel_tags |
| 1207 | + from wheel.wheelfile import WheelFile |
1208 | 1208 | _wheel = built_wheels[0] |
1209 | 1209 | built_wheel_dir = dirname(_wheel) |
1210 | 1210 | # Fix wheel platform tag |
|
0 commit comments