pw_env_setup: Use --find-links in pip install
Based on comment on pwrev/16341. I added lines shuffling the order of
packages and ran through this several times and everything worked every
time.
Change-Id: Ic0b135bc484a5a4db60da163e4bccb76fa6ebb15
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16561
Reviewed-by: Joe Ethier <jethier@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py b/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py
index f0e78c0..4cb947f 100644
--- a/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py
+++ b/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py
@@ -161,10 +161,12 @@
# Run through sorted so pw_cli (on which other packages depend) comes
# early in the list.
# TODO(mohrr) come up with a way better than just using sorted().
+ find_args = tuple('--find-links={}'.format(package(x))
+ for x in setup_py_files)
package_args = tuple('--editable={}'.format(package(path))
for path in sorted(setup_py_files))
pip_install('--log', os.path.join(venv_path, 'pip-packages.log'),
- *package_args)
+ *(find_args + package_args))
if env:
env.set('VIRTUAL_ENV', venv_path)