diff options
-rw-r--r-- | requirements.txt | 2 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | sos.spec | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/requirements.txt b/requirements.txt index b4d120c1..4f6cbb74 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ coverage>=4.0.3 Sphinx>=1.3.5 pexpect>=4.0.0 pyyaml -setuptools +packaging @@ -7,7 +7,9 @@ from sos import __version__ as VERSION setup( name='sos', version=VERSION, - install_requires=['pexpect', 'pyyaml'], + # to avoid a packaging dependency on older RHELs + # we only declare it on recent Python versions + install_requires=['pexpect', 'pyyaml', 'packaging;python_version>="3.11"'], description=( 'A set of tools to gather troubleshooting information from a system' ), @@ -10,7 +10,11 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-rpm Requires: python3-pexpect +%if 0%{?rhel} && 0%{?rhel} < 10 Requires: python3-setuptools +%else +Requires: python3-packaging +%endif Recommends: python3-magic # Mandatory just for uploading to a SFTP server: Recommends: python3-requests |