Use pip and not pipenv for installing dependencies during testing
This matches what we tell our customers to do and makes some
downstream testing stuff for beta versions of our python packages
easier (since `pip` has a more straightforward package selection
algorithm than `pipenv`)
@@ -1435,8 +1435,11 @@ func (pt *programTester) preparePythonProject(projinfo *engine.Projinfo) error {
return err
}
- // Install the package's dependencies, which Pipenv infers from a requirements.txt file in the root of the project.
- if err = pt.runPipenvCommand("pipenv-install", []string{"install", "--skip-lock"}, cwd); err != nil {
+ // Install the package's dependencies. We do this by running `pip` inside the virtualenv that `pipenv` has created.
+ // We don't use `pipenv install` because we don't want a lock file and prefer the similar model of `pip install`
+ // which matches what our customers do
+ err = pt.runPipenvCommand("pipenv-install", []string{"run", "pip", "install", "-r", "requirements.txt"}, cwd)
+ if err != nil {
return err
}
@@ -1471,7 +1474,7 @@ func (pt *programTester) installPipPackageDeps(cwd string) error {
}
}
- err := pt.runPipenvCommand("pipenv-install-package", []string{"install", "--skip-lock", "-e", dep}, cwd)
+ err := pt.runPipenvCommand("pipenv-install-package", []string{"run", "pip", "install", "-e", dep}, cwd)
if err != nil {
return err
}
