|
8 | 8 | from pipes import quote as shlex_quote
|
9 | 9 |
|
10 | 10 | from .util import prepare_command
|
| 11 | +from .filter_wheels import is_supported |
11 | 12 |
|
12 | 13 |
|
13 | 14 | def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, skip):
|
@@ -61,19 +62,19 @@ def shell(args, env=None, cwd=None):
|
61 | 62 | # build the wheel to temp dir
|
62 | 63 | temp_wheel_dir = '/tmp/tmpwheel%s' % config.version
|
63 | 64 | shell([pip, 'wheel', project_dir, '-w', temp_wheel_dir, '--no-deps'], env=env)
|
64 |
| - temp_wheel = glob(temp_wheel_dir+'/*.whl')[0] |
65 | 65 |
|
66 |
| - if temp_wheel.endswith('none-any.whl'): |
67 |
| - # pure python wheel - just copy to output_dir |
68 |
| - shell(['cp', temp_wheel, output_dir], env=env) |
69 |
| - else: |
70 |
| - # list the dependencies |
71 |
| - shell(['delocate-listdeps', temp_wheel], env=env) |
72 |
| - # rebuild the wheel with shared libraries included and place in output dir |
73 |
| - shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env) |
| 66 | + for temp_wheel in glob(temp_wheel_dir+'/*.whl'): |
| 67 | + if temp_wheel.endswith('none-any.whl'): |
| 68 | + # pure python wheel - just copy to output_dir |
| 69 | + shell(['cp', temp_wheel, output_dir], env=env) |
| 70 | + else: |
| 71 | + # list the dependencies |
| 72 | + shell(['delocate-listdeps', temp_wheel], env=env) |
| 73 | + # rebuild the wheel with shared libraries included and place in output dir |
| 74 | + shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env) |
74 | 75 |
|
75 | 76 | # install the wheel
|
76 |
| - shell([pip, 'install', package_name, '--no-index', '--find-links', output_dir], env=env) |
| 77 | + shell([pip, 'install'] + filter(is_supported, glob(output_dir + '/*.whl')), env=env) |
77 | 78 |
|
78 | 79 | # test the wheel
|
79 | 80 | if test_requires:
|
|
0 commit comments