forked from platypush/platypush
Exclude python-* system packages when installing in a venv.
This commit is contained in:
parent
cddf318fa7
commit
2bff4c9cf1
1 changed files with 9 additions and 1 deletions
|
@ -312,6 +312,7 @@ class Dependencies:
|
||||||
Generates the package manager commands required to install the given
|
Generates the package manager commands required to install the given
|
||||||
dependencies on the system.
|
dependencies on the system.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
wants_sudo = not (self._is_docker or os.getuid() == 0)
|
wants_sudo = not (self._is_docker or os.getuid() == 0)
|
||||||
pkg_manager = self.pkg_manager or PackageManagers.scan()
|
pkg_manager = self.pkg_manager or PackageManagers.scan()
|
||||||
if self.packages and pkg_manager:
|
if self.packages and pkg_manager:
|
||||||
|
@ -319,7 +320,14 @@ class Dependencies:
|
||||||
[
|
[
|
||||||
*(['sudo'] if wants_sudo else []),
|
*(['sudo'] if wants_sudo else []),
|
||||||
*pkg_manager.value.install,
|
*pkg_manager.value.install,
|
||||||
*sorted(self.packages), # type: ignore
|
*sorted(
|
||||||
|
pkg
|
||||||
|
for pkg in self.packages # type: ignore
|
||||||
|
if not (
|
||||||
|
self.install_context == InstallContext.VENV
|
||||||
|
and self._is_python_pkg(pkg)
|
||||||
|
)
|
||||||
|
),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue