|
8 | 8 | PACKAGE_NAME = "pylero" |
9 | 9 | CLI_NAME = "pylero-cmd" |
10 | 10 | RELEASE_FILE = "/etc/system-release-cpe" |
11 | | -SUDS_NAME_CHANGE = False |
12 | 11 |
|
13 | 12 | install_requires_ = [ |
14 | 13 | "click", |
15 | 14 | ] |
16 | 15 |
|
17 | | -# Update install_requires_ for feodra 36 and greater |
| 16 | +# Update install_requires_ for Fedora, CentOS Stream and RHEL |
18 | 17 | if os.path.exists(RELEASE_FILE): |
19 | 18 | with open(RELEASE_FILE) as version_file: |
20 | 19 | version_file_content = version_file.read().split(":") |
21 | 20 | if ( |
22 | | - (version_file_content[3] == "fedora") |
23 | | - and (int(version_file_content[4]) > 35) |
24 | | - ) or ( |
25 | | - (version_file_content[2] == "redhat") |
26 | | - and (version_file_content[3] == "enterprise_linux") |
27 | | - and (int(version_file_content[4].split(".")[0]) > 8) |
| 21 | + ( |
| 22 | + (version_file_content[3] == "fedora") |
| 23 | + and (int(version_file_content[4]) > 35) |
| 24 | + ) |
| 25 | + or ( |
| 26 | + (version_file_content[2] == "redhat") |
| 27 | + and (version_file_content[3] == "enterprise_linux") |
| 28 | + and (int(version_file_content[4].split(".")[0]) > 8) |
| 29 | + ) |
| 30 | + or ( |
| 31 | + (version_file_content[3] == "centos") |
| 32 | + and (int(version_file_content[4]) > 8) |
| 33 | + ) |
28 | 34 | ): |
29 | | - SUDS_NAME_CHANGE = True |
30 | | - |
31 | | -if SUDS_NAME_CHANGE: |
32 | | - install_requires_.append("suds") |
33 | | -else: |
34 | | - install_requires_.append("suds-community") |
| 35 | + install_requires_.append("suds") |
| 36 | + elif (version_file_content[3] == "centos") and ( |
| 37 | + int(version_file_content[4]) < 9 |
| 38 | + ): |
| 39 | + install_requires_.append("suds-jurko") |
| 40 | + else: |
| 41 | + install_requires_.append("suds-community") |
35 | 42 |
|
36 | 43 |
|
37 | 44 | if __name__ == "__main__": |
|
0 commit comments