add a 'pip install' step before building wheels
This commit is contained in:
@@ -51,7 +51,10 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
|||||||
PATH=$PYBIN:$PATH sh -c {before_build}
|
PATH=$PYBIN:$PATH sh -c {before_build}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$PYBIN/pip" wheel . -w /tmp/linux_wheels
|
# install the package first to take care of dependencies
|
||||||
|
"$PYBIN/pip" install .
|
||||||
|
|
||||||
|
"$PYBIN/pip" wheel --no-deps . -w /tmp/linux_wheels
|
||||||
done
|
done
|
||||||
|
|
||||||
for whl in /tmp/linux_wheels/*.whl; do
|
for whl in /tmp/linux_wheels/*.whl; do
|
||||||
@@ -66,7 +69,8 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
|||||||
# Install packages and test
|
# Install packages and test
|
||||||
for PYBIN in {pybin_paths}; do
|
for PYBIN in {pybin_paths}; do
|
||||||
# Install the wheel we just built
|
# Install the wheel we just built
|
||||||
"$PYBIN/pip" install {package_name} --no-index -f /output
|
"$PYBIN/pip" install {package_name} \
|
||||||
|
--upgrade --force-reinstall --no-deps --no-index -f /output
|
||||||
|
|
||||||
# Install any requirements to run the tests
|
# Install any requirements to run the tests
|
||||||
if [ ! -z "{test_requires}" ]; then
|
if [ ! -z "{test_requires}" ]; then
|
||||||
|
|||||||
@@ -58,9 +58,12 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
|||||||
before_build_prepared = prepare_command(before_build, python=python, pip=pip)
|
before_build_prepared = prepare_command(before_build, python=python, pip=pip)
|
||||||
shell(shlex.split(before_build_prepared), env=env)
|
shell(shlex.split(before_build_prepared), env=env)
|
||||||
|
|
||||||
|
# install the package first to take care of dependencies
|
||||||
|
shell([pip, 'install', project_dir], env=env)
|
||||||
|
|
||||||
# build the wheel to temp dir
|
# build the wheel to temp dir
|
||||||
temp_wheel_dir = '/tmp/tmpwheel%s' % config.version
|
temp_wheel_dir = '/tmp/tmpwheel%s' % config.version
|
||||||
shell([pip, 'wheel', project_dir, '-w', temp_wheel_dir], env=env)
|
shell([pip, 'wheel', project_dir, '-w', temp_wheel_dir, '--no-deps'], env=env)
|
||||||
temp_wheel = glob(temp_wheel_dir+'/*.whl')[0]
|
temp_wheel = glob(temp_wheel_dir+'/*.whl')[0]
|
||||||
|
|
||||||
if temp_wheel.endswith('none-any.whl'):
|
if temp_wheel.endswith('none-any.whl'):
|
||||||
@@ -72,8 +75,9 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
|||||||
# rebuild the wheel with shared libraries included and place in output dir
|
# rebuild the wheel with shared libraries included and place in output dir
|
||||||
shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env)
|
shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env)
|
||||||
|
|
||||||
# install the wheel
|
# now install the package from the generated wheel
|
||||||
shell([pip, 'install', package_name, '--no-index', '--find-links', output_dir], env=env)
|
shell([pip, 'install', package_name, '--upgrade', '--force-reinstall',
|
||||||
|
'--no-deps', '--no-index', '--find-links', output_dir], env=env)
|
||||||
|
|
||||||
# test the wheel
|
# test the wheel
|
||||||
if test_requires:
|
if test_requires:
|
||||||
|
|||||||
@@ -66,11 +66,16 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
|||||||
before_build_prepared = prepare_command(before_build, python='python', pip='pip')
|
before_build_prepared = prepare_command(before_build, python='python', pip='pip')
|
||||||
shell([before_build_prepared], env=env)
|
shell([before_build_prepared], env=env)
|
||||||
|
|
||||||
|
# install the package first to take care of dependencies
|
||||||
|
shell(['pip', 'install', project_dir], env=env)
|
||||||
|
|
||||||
# build the wheel
|
# build the wheel
|
||||||
shell(['pip', 'wheel', project_dir, '-w', output_dir], env=env)
|
shell(['pip', 'wheel', project_dir, '-w', output_dir, '--no-deps'], env=env)
|
||||||
|
|
||||||
# install the wheel
|
# install the wheel
|
||||||
shell(['pip', 'install', package_name, '--no-index', '-f', output_dir], env=env)
|
shell(['pip', 'install', package_name, '--upgrade',
|
||||||
|
'--force-reinstall', '--no-deps', '--no-index', '-f',
|
||||||
|
output_dir], env=env)
|
||||||
|
|
||||||
# test the wheel
|
# test the wheel
|
||||||
if test_requires:
|
if test_requires:
|
||||||
|
|||||||
Reference in New Issue
Block a user