From 083ece8bbc22b014bc766f4162dabbe765643b60 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Thu, 13 Apr 2017 13:48:57 +0100 Subject: [PATCH] Don't ignore dependency wheels, copy them to output if pure wheels --- cibuildwheel/linux.py | 9 +++++++-- cibuildwheel/macos.py | 14 +++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 9260c4e7..cab3148e 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -54,8 +54,13 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be "$PYBIN/pip" wheel . -w /tmp/linux_wheels done - for whl in /tmp/linux_wheels/{package_name}-*.whl; do - auditwheel repair "$whl" -w /output + for whl in /tmp/linux_wheels/*.whl; do + if [[ "$whl" == *none-any.whl ]]; then + # pure python wheel - just copy to the output + cp "$whl" /output + else + auditwheel repair "$whl" -w /output + fi done # Install packages and test diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index b3e67ef0..20a5844b 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -61,12 +61,16 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be # build the wheel to temp dir temp_wheel_dir = '/tmp/tmpwheel%s' % config.version shell([pip, 'wheel', project_dir, '-w', temp_wheel_dir], env=env) - temp_wheel = glob('%s/%s-*.whl' % (temp_wheel_dir, package_name))[0] + temp_wheel = glob(temp_wheel_dir+'/*.whl')[0] - # list the dependencies - shell(['delocate-listdeps', temp_wheel], env=env) - # rebuild the wheel with shared libraries included and place in output dir - shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env) + if temp_wheel.endswith('none-any.whl'): + # pure python wheel - just copy to output_dir + shell(['cp', temp_wheel, output_dir], env=env) + else: + # list the dependencies + shell(['delocate-listdeps', temp_wheel], env=env) + # rebuild the wheel with shared libraries included and place in output dir + shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env) # install the wheel shell([pip, 'install', package_name, '--no-index', '--find-links', output_dir], env=env)