Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4642 fix pipenv lock --pre doesn't include prerelease dependencies #4652

Merged
merged 5 commits into from
Apr 17, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/4642.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug preventing use of pipenv lock --pre
7 changes: 5 additions & 2 deletions pipenv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,24 +697,27 @@ def pip_command(self):
self._pip_command = self._get_pip_command()
return self._pip_command

def prepare_pip_args(self, use_pep517=False, build_isolation=True):
def prepare_pip_args(self, use_pep517=False, build_isolation=True, pre=False):
pip_args = []
if self.sources:
pip_args = prepare_pip_source_args(self.sources, pip_args)
if use_pep517 is False:
pip_args.append("--no-use-pep517")
if build_isolation is False:
pip_args.append("--no-build-isolation")
if self.pre:
pip_args.append("--pre")
pip_args.extend(["--cache-dir", environments.PIPENV_CACHE_DIR])
return pip_args

@property
def pip_args(self):
pre = self.pre
use_pep517 = environments.get_from_env("USE_PEP517", prefix="PIP")
build_isolation = environments.get_from_env("BUILD_ISOLATION", prefix="PIP")
if self._pip_args is None:
self._pip_args = self.prepare_pip_args(
use_pep517=use_pep517, build_isolation=build_isolation
use_pep517=use_pep517, build_isolation=build_isolation, pre=pre
)
return self._pip_args

Expand Down