summaryrefslogtreecommitdiffstats
path: root/rpm
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@eurephia.org>2020-07-29 15:29:12 +0200
committerDavid Sommerseth <dazo@eurephia.org>2020-07-30 17:03:42 +0200
commit421c0a73bc8e8cfed0f1188bd886e741dff1076a (patch)
tree710c4ac2ba8d150842ab65291d93563e5955c031 /rpm
parent11d95327f1ead107139c500734ef95f4ae05a6d2 (diff)
downloadlogactio-421c0a73bc8e8cfed0f1188bd886e741dff1076a.tar.gz
logactio-421c0a73bc8e8cfed0f1188bd886e741dff1076a.tar.xz
logactio-421c0a73bc8e8cfed0f1188bd886e741dff1076a.zip
Migrate to Python 3
Signed-off-by: David Sommerseth <dazo@eurephia.org>
Diffstat (limited to 'rpm')
-rw-r--r--rpm/SPECS/logactio.spec15
-rwxr-xr-xrpm/mk-rpm.sh2
2 files changed, 8 insertions, 9 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
diff --git a/rpm/mk-rpm.sh b/rpm/mk-rpm.sh
index 9e50672..2280d4f 100755
--- a/rpm/mk-rpm.sh
+++ b/rpm/mk-rpm.sh
@@ -11,7 +11,7 @@
exit 1
fi
- python2 setup.py sdist --formats=bztar
+ python3 setup.py sdist --formats=bztar
cp dist/logactio-*.tar.bz2 rpm/SOURCES
cp init/sysv/logactio rpm/SOURCES/logactio.sysv
cp init/systemd/logactio* rpm/SOURCES/