Skip to content

Commit

Permalink
perf: Warnings that the correct version cannot be matched before the …
Browse files Browse the repository at this point in the history
…environment is finally created. (#2584)
  • Loading branch information
vvanglro authored Jan 24, 2024
1 parent 1c5bd6a commit 9ec9ba6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pdm/project/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ def note(message: str) -> None:
return python

if not self.root.joinpath("__pypackages__").exists():
self.core.ui.warn(
f"Project requires a python version of {self.python_requires}, "
f"The virtualenv is being created for you as it cannot be matched to the right version."
)
note("python.use_venv is on, creating a virtualenv for this project...")
venv_path = self._create_virtualenv()
self.python = PythonInfo.from_path(get_venv_python(venv_path))
Expand Down

0 comments on commit 9ec9ba6

Please sign in to comment.