Can now install on the opensuse distribution.
- Now using the distro module to determine the linux distro.
This commit is contained in:
parent
3eb2f71adb
commit
8b867bb333
4 changed files with 87 additions and 40 deletions
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
import platform
|
||||
import distro
|
||||
import subprocess
|
||||
import tools
|
||||
|
||||
|
||||
dist_id = platform.linux_distribution()[0].lower()
|
||||
dist_id = distro.id()
|
||||
pip_deps, pip3_deps, dist_deps = set(), set(), set()
|
||||
for dependency in tools.dependencies(dist_id):
|
||||
if "/" in dependency:
|
||||
|
|
@ -17,7 +17,8 @@ for dependency in tools.dependencies(dist_id):
|
|||
cmd_for_dist = {"ubuntu": ["apt-get", "-y", "install"],
|
||||
"debian": ["apt-get", "-y", "install"],
|
||||
"fedora": ["dnf", "-y", "install"],
|
||||
"arch": ["pacman", "-S", "--noconfirm", "--needed"]}
|
||||
"arch": ["pacman", "-S", "--noconfirm", "--needed"],
|
||||
"opensuse": ["zypper", "-n", "install"]}
|
||||
if pip_deps:
|
||||
dist_deps.add("python2-pip" if dist_id == "arch" else "python-pip")
|
||||
if pip3_deps:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue