Don't ignore dependency wheels, copy them to output if pure wheels

This commit is contained in:
Joe Rickerby
2017-04-13 13:48:57 +01:00
parent bdbbf18e43
commit 083ece8bbc
2 changed files with 16 additions and 7 deletions
+7 -2
View File
@@ -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
+9 -5
View File
@@ -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)