From 7e1268086731fec7c22f9adb49ba9b6223f7ffe8 Mon Sep 17 00:00:00 2001 From: "Stuart D. Gathman" Date: Tue, 20 Sep 2016 22:00:01 -0400 Subject: [PATCH] Builds on el6,el7,f24 --- py3milter.spec | 15 ++++++++++++--- pymilter.spec | 17 +++++++++++++---- setup.py | 2 +- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/py3milter.spec b/py3milter.spec index 546fed1..dabe3a3 100644 --- a/py3milter.spec +++ b/py3milter.spec @@ -1,4 +1,8 @@ +%if 0%{?rhel} == 7 +%define pythonbase python34 +%else %define pythonbase python3 +%endif %define __python python3 %define libdir %{_libdir}/pymilter @@ -6,7 +10,7 @@ Summary: Python interface to sendmail milter API Name: %{pythonbase}-pymilter -Version: 1.1 +Version: 1.0.1 Release: 1%{dist} Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz Source1: pymilter.te @@ -34,7 +38,12 @@ DSNs, and doing CBV. Summary: SELinux policy module for pymilter Group: System Environment/Base Requires: policycoreutils, selinux-policy, %{name} -BuildRequires: policycoreutils, checkpolicy, policycoreutils-python-utils +BuildRequires: policycoreutils, checkpolicy +%if 0%{?epel} >= 6 +BuildRequires: policycoreutils-python +%else +BuildRequires: policycoreutils-python-utils +%endif %description selinux SELinux policy module for using pymilter with sendmail with selinux enforcing @@ -85,7 +94,7 @@ if [ $1 -eq 0 ] ; then fi %changelog -* Tue Sep 20 2016 Stuart Gathman 1.1-1 +* Tue Sep 20 2016 Stuart Gathman 1.0.1-1 - Support python3 * Sat Mar 1 2014 Stuart Gathman 1.0-2 diff --git a/pymilter.spec b/pymilter.spec index 907f420..2a29674 100644 --- a/pymilter.spec +++ b/pymilter.spec @@ -1,12 +1,16 @@ -%define __python python2.6 +%define __python python2 +%if 0%{?rhel} == 6 %define pythonbase python +%else +%define pythonbase python2 +%endif %define libdir %{_libdir}/pymilter %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Summary: Python interface to sendmail milter API Name: %{pythonbase}-pymilter -Version: 1.1 +Version: 1.0.1 Release: 1%{dist} Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz Source1: pymilter.te @@ -34,7 +38,12 @@ DSNs, and doing CBV. Summary: SELinux policy module for pymilter Group: System Environment/Base Requires: policycoreutils, selinux-policy, %{name} -BuildRequires: policycoreutils, checkpolicy, policycoreutils-python-utils +BuildRequires: policycoreutils, checkpolicy +%if 0%{?epel} >= 6 +BuildRequires: policycoreutils-python +%else +BuildRequires: policycoreutils-python-utils +%endif %description selinux SELinux policy module for using pymilter with sendmail with selinux enforcing @@ -84,7 +93,7 @@ if [ $1 -eq 0 ] ; then fi %changelog -* Tue Sep 20 2016 Stuart Gathman 1.1-1 +* Tue Sep 20 2016 Stuart Gathman 1.0.1-1 - Support python3 * Sat Mar 1 2014 Stuart Gathman 1.0-2 diff --git a/setup.py b/setup.py index 1f16374..96e49ff 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ libs = ["milter"] libdirs = ["/usr/lib/libmilter"] # needed for Debian # NOTE: importing Milter to obtain version fails when milter.so not built -setup(name = "pymilter", version = '1.0', +setup(name = "pymilter", version = '1.0.1', description="Python interface to sendmail milter API", long_description="""\ This is a python extension module to enable python scripts to