summaryrefslogtreecommitdiffstats
path: root/rpm/SPECS/logactio.spec
diff options
context:
space:
mode:
Diffstat (limited to 'rpm/SPECS/logactio.spec')
-rw-r--r--rpm/SPECS/logactio.spec15
1 files changed, 7 insertions, 8 deletions
diff --git a/rpm/SPECS/logactio.spec b/rpm/SPECS/logactio.spec
index ce848f5..1274385 100644
--- a/rpm/SPECS/logactio.spec
+++ b/rpm/SPECS/logactio.spec
@@ -1,6 +1,3 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
-
Summary: A simple log tracker which acts on certain events
Name: logactio
Version: 1.1
@@ -23,6 +20,8 @@ BuildArch: noarch
%define systemd_avail 1
%endif
+Requires: python(abi) >= 3.6
+
%if 0%{systemd_avail} == 1
Requires(post): systemd
Requires(preun): systemd
@@ -37,7 +36,7 @@ Requires(preun): initscripts
%if 0%{rhel} <= 6
BuildRequires: python-sphinx10
%else
-BuildRequires: python-sphinx
+BuildRequires: python3-sphinx
%endif
@@ -50,7 +49,7 @@ in Python and can easily be extended with specific actions.
%setup -q
%build
-%{__python} setup.py build
+%py3_build
pushd docs
%if 0%{rhel} > 6
make text man
@@ -64,7 +63,7 @@ popd
rm -rf %{buildroot}
# Install logactio code
-%{__python} setup.py install --root=%{buildroot}
+%py3_install
# Install man pages
mkdir -p %{buildroot}/%{_mandir}/man7
@@ -116,8 +115,8 @@ fi
%doc COPYING docs/build/text/configuration.txt docs/build/text/starting.txt
%{_mandir}/man7/*.gz
%{_bindir}/logactio
-%{python_sitelib}/LogActio
-%{python_sitelib}/*.egg-info
+%{python3_sitelib}/LogActio
+%{python3_sitelib}/*.egg-info
%config(noreplace) /etc/sysconfig/%{name}
%if 0%{systemd_avail} == 1
%{_unitdir}/%{name}.service