Skip to content

Commit

Permalink
Update setup.py to cater for all RHEL 8 versions (Azure#2532)
Browse files Browse the repository at this point in the history
-  Testing for version.startswith("8.2") breaks on RHEL versions later than 8.2
-  RHEL 8.0, not 8.2, changed the default Python version to 3.x

Co-authored-by: Nageswara Nandigam <[email protected]>
  • Loading branch information
jabofh and nagworld9 authored Mar 18, 2022
1 parent eb0c056 commit f05ec2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
agent_bin_path = osutil.get_agent_bin_path()

if name in ('redhat', 'centos', 'almalinux', 'cloudlinux', 'rocky'):
if version.startswith("8.2"):
if version.startswith("8"):
# redhat8+ default to py3
set_bin_files(data_files, dest=agent_bin_path,
src=["bin/py3/waagent", "bin/waagent2.0"])
Expand All @@ -106,7 +106,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
set_conf_files(data_files)
set_logrotate_files(data_files)
set_udev_files(data_files)
if version.startswith("8.2"):
if version.startswith("8"):
# redhat 8+ uses systemd and python3
set_systemd_files(data_files, dest=systemd_dir_path,
src=["init/redhat/waagent.service",
Expand Down

0 comments on commit f05ec2e

Please sign in to comment.