environment: apply pwrev/16561 to recipes

Change-Id: I400ac33f8ff373fea839c15401e6ec3951f1d5fd
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/16581
Commit-Queue: Rob Mohr <mohrr@google.com>
Reviewed-by: Oliver Newman <olivernewman@google.com>
diff --git a/recipe_modules/environment/api.py b/recipe_modules/environment/api.py
index ec6b871..cfdf8a5 100644
--- a/recipe_modules/environment/api.py
+++ b/recipe_modules/environment/api.py
@@ -201,6 +201,8 @@
                 pip_install_prefix = (python, '-m', 'pip', 'install')
                 pw_cmd = list(pip_install_prefix)
                 for package in packages:
+                    pw_cmd.append('--find-links={}'.format(package))
+                for package in packages:
                     pw_cmd.append('--editable={}'.format(package))
                 self.m.step('pigweed tools', pw_cmd)
 
diff --git a/recipe_modules/environment/tests/full.expected/windows.json b/recipe_modules/environment/tests/full.expected/windows.json
index 0c8651e..8c2e777 100644
--- a/recipe_modules/environment/tests/full.expected/windows.json
+++ b/recipe_modules/environment/tests/full.expected/windows.json
@@ -228,6 +228,8 @@
       "-m",
       "pip",
       "install",
+      "--find-links=[START_DIR]\\python\\pw_cli/py",
+      "--find-links=[START_DIR]\\python\\pw_presubmit/py",
       "--editable=[START_DIR]\\python\\pw_cli/py",
       "--editable=[START_DIR]\\python\\pw_presubmit/py"
     ],
diff --git a/recipe_modules/environment/tests/full.expected/with_cargo.json b/recipe_modules/environment/tests/full.expected/with_cargo.json
index 59856b4..338fce7 100644
--- a/recipe_modules/environment/tests/full.expected/with_cargo.json
+++ b/recipe_modules/environment/tests/full.expected/with_cargo.json
@@ -400,6 +400,8 @@
       "-m",
       "pip",
       "install",
+      "--find-links=[START_DIR]/python/pw_cli/py",
+      "--find-links=[START_DIR]/python/pw_presubmit/py",
       "--editable=[START_DIR]/python/pw_cli/py",
       "--editable=[START_DIR]/python/pw_presubmit/py"
     ],