A more corner-case-proof logic for wants_break_system_packages.

This commit is contained in:
Fabio Manganiello 2024-05-25 10:33:05 +02:00
parent 303b11613b
commit b1dd484704
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -459,11 +459,13 @@ class Dependencies:
# If we're generating a Docker image then we always need # If we're generating a Docker image then we always need
# --break-system-packages # --break-system-packages
or self._is_docker or self._is_docker
# If we're in a virtual environment then we don't need
# --break-system-packages
or not self._is_venv
) )
if self._is_venv and not self._is_docker:
# If we're in a virtual environment then we don't need
# --break-system-packages, unless we're generating a Docker image
wants_break_system_packages = False
if self.pip: if self.pip:
deps = sorted(self.pip) deps = sorted(self.pip)
if full_command: if full_command: