Skip to content

Commit

Permalink
simplify - also better compat with clones
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 15, 2022
1 parent 1b9faf3 commit f6844ed
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ def pkg_config_version(req_version, pkgname):
from distutils.version import LooseVersion
return LooseVersion(out)>=LooseVersion(req_version)

def is_RH():
try:
with open("/etc/redhat-release", mode='rb') as rel:
data = rel.read()
return data.startswith(b"CentOS") or data.startswith(b"RedHat")
except (FileNotFoundError, OSError):
pass
return False

DEFAULT = True
if "--minimal" in sys.argv:
Expand Down Expand Up @@ -941,7 +933,8 @@ def pretty_cmd(cmd):
#OSX doesn't have webcam support yet (no opencv builds on 10.5.x)
webcam = webcam_ENABLED and not (OSX or WIN32)
#no python-avahi on RH / CentOS, need dbus module on *nix:
mdns = mdns_ENABLED and (OSX or WIN32 or (not is_RH() and dbus_ENABLED))
is_RH = is_RedHat() or is_CentOS() or is_OracleLinux() or is_AlmaLinux() or is_RockyLinux()
mdns = mdns_ENABLED and (OSX or WIN32 or (not is_RH and dbus_ENABLED))
SUBS = {
'xvfb_command' : wrap_cmd_str(xvfb_command),
'xdummy_command' : wrap_cmd_str(xdummy_command).replace("\n", "\n#"),
Expand Down

0 comments on commit f6844ed

Please sign in to comment.