From bcedc983d119764a011288740f576d49c8c9433c Mon Sep 17 00:00:00 2001 From: cs1867 Date: Tue, 9 Apr 2024 17:30:01 +0000 Subject: [PATCH] issue-1421 changes for oracle 8 support --- .../rpm/python-file-read-backwards.spec | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/python-file-read-backwards/unibuild-packaging/rpm/python-file-read-backwards.spec b/python-file-read-backwards/unibuild-packaging/rpm/python-file-read-backwards.spec index d05cab4a..ae9a7dcd 100644 --- a/python-file-read-backwards/unibuild-packaging/rpm/python-file-read-backwards.spec +++ b/python-file-read-backwards/unibuild-packaging/rpm/python-file-read-backwards.spec @@ -1,10 +1,31 @@ # # RPM Spec for Python file-read-backwards Module # +# +# Python +# + +# This is the version we like. +%define _python_version_major 3 + +%if 0%{?el7} +%error EL7 is no longer supported. Try something newer. +%endif + +%if 0%{?el8}%{?ol8} +# EL8 standardized on just the major version, as did EPEL. +%define _python python%{_python_version_major} + +%else + +# EL9+ has everyting as just plain python +%define _python python + +%endif %define short file-read-backwards -Name: python-%{short} +Name: %{_python}-%{short} Version: 3.0.0 Release: 1%{?dist} Summary: Memory efficient way of reading files line-by-line from the end of file @@ -19,10 +40,11 @@ Url: https://github.com/RobinNil/file_read_backwards Source: %{short}-%{version}.tar.gz -BuildRequires: python3 -BuildRequires: python3-setuptools -Requires: python3 +BuildRequires: %{_python} +BuildRequires: %{_python}-setuptools + +Requires: %{_python} %description @@ -39,11 +61,11 @@ Memory efficient way of reading files line-by-line from the end of file %build -%{python3} setup.py build +%{_python} setup.py build %install -%{python3} setup.py install \ +%{_python} setup.py install \ --root=$RPM_BUILD_ROOT \ --single-version-externally-managed -O1 \ --record=INSTALLED_FILES @@ -54,4 +76,4 @@ rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES -%defattr(-,root,root) \ No newline at end of file +%defattr(-,root,root)