Skip to content

Commit 7a510c7

Browse files
committed
revert PR9; add --no-deps to pip wheel
+ Revert PR9; it was never actually needed in the first place it just fixed an issue by side effect + add --no-deps to avoid building wheels for dependencies and to fix pypa#11
1 parent c28e85d commit 7a510c7

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

cibuildwheel/linux.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
5757
PATH=$PYBIN:$PATH sh -c {before_build}
5858
fi
5959
60-
# install the package first to take care of dependencies
61-
"$PYBIN/pip" install .
62-
63-
"$PYBIN/pip" wheel --no-deps . -w /tmp/linux_wheels
60+
"$PYBIN/pip" wheel . -w /tmp/linux_wheels --no-deps
6461
done
6562
6663
for whl in /tmp/linux_wheels/*.whl; do
@@ -75,8 +72,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
7572
# Install packages and test
7673
for PYBIN in {pybin_paths}; do
7774
# Install the wheel we just built
78-
"$PYBIN/pip" install {package_name} \
79-
--upgrade --force-reinstall --no-deps --no-index -f /output
75+
"$PYBIN/pip" install {package_name} --no-index -f /output
8076
8177
# Install any requirements to run the tests
8278
if [ ! -z "{test_requires}" ]; then

cibuildwheel/macos.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ def shell(args, env=None, cwd=None):
5858
before_build_prepared = prepare_command(before_build, python=python, pip=pip)
5959
shell(shlex.split(before_build_prepared), env=env)
6060

61-
# install the package first to take care of dependencies
62-
shell([pip, 'install', project_dir], env=env)
63-
6461
# build the wheel to temp dir
6562
temp_wheel_dir = '/tmp/tmpwheel%s' % config.version
6663
shell([pip, 'wheel', project_dir, '-w', temp_wheel_dir, '--no-deps'], env=env)
@@ -75,9 +72,8 @@ def shell(args, env=None, cwd=None):
7572
# rebuild the wheel with shared libraries included and place in output dir
7673
shell(['delocate-wheel', '-w', output_dir, temp_wheel], env=env)
7774

78-
# now install the package from the generated wheel
79-
shell([pip, 'install', package_name, '--upgrade', '--force-reinstall',
80-
'--no-deps', '--no-index', '--find-links', output_dir], env=env)
75+
# install the wheel
76+
shell([pip, 'install', package_name, '--no-index', '--find-links', output_dir], env=env)
8177

8278
# test the wheel
8379
if test_requires:

cibuildwheel/windows.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,11 @@ def shell(args, env=None, cwd=None):
6666
before_build_prepared = prepare_command(before_build, python='python', pip='pip')
6767
shell([before_build_prepared], env=env)
6868

69-
# install the package first to take care of dependencies
70-
shell(['pip', 'install', project_dir], env=env)
71-
7269
# build the wheel
7370
shell(['pip', 'wheel', project_dir, '-w', output_dir, '--no-deps'], env=env)
7471

7572
# install the wheel
76-
shell(['pip', 'install', package_name, '--upgrade',
77-
'--force-reinstall', '--no-deps', '--no-index', '-f',
78-
output_dir], env=env)
73+
shell(['pip', 'install', package_name, '--no-index', '-f', output_dir], env=env)
7974

8075
# test the wheel
8176
if test_requires:

0 commit comments

Comments
 (0)