[supybot-fedmsg] Modernize python macros. Fixes RHBZ#1165916.

Ralph Bean ralph at fedoraproject.org
Thu Nov 20 15:30:19 UTC 2014


commit 35165ab456a2cb0768b612594f100dd5ff7b6792
Author: Ralph Bean <rbean at redhat.com>
Date:   Thu Nov 20 10:30:05 2014 -0500

    Modernize python macros.  Fixes RHBZ#1165916.

 supybot-fedmsg.spec |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/supybot-fedmsg.spec b/supybot-fedmsg.spec
index 35ce540..379ee67 100644
--- a/supybot-fedmsg.spec
+++ b/supybot-fedmsg.spec
@@ -1,7 +1,12 @@
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2:        %global __python2 /usr/bin/python2}
+%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
 
 Name:           supybot-fedmsg
 Version:        0.0.7
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Plugin for supybot that enables meetbot with fedmsg output.
 
 Group:          Applications/Internet
@@ -10,6 +15,8 @@ URL:            http://github.com/ralphbean/supybot-fedmsg
 Source0:        http://pypi.python.org/packages/source/s/supybot-fedmsg/supybot-fedmsg-%{version}.tar.gz
 Patch0:         supybot-fedmsg-typofix.patch
 
+BuildRequires:  python2-devel
+
 Requires:       fedmsg
 Requires:       supybot-meetbot
 
@@ -17,8 +24,8 @@ BuildArch:      noarch
 
 %description
 A Supybot plugin for sending messages across the Fedora Infrastructure message
-bus.  This plugin modifies other installed plugins during runtime, instrumenting
-them to send messages on certain events.
+bus.  This plugin modifies other installed plugins during runtime,
+instrumenting them to send messages on certain events.
 
 Currently supported target plugins are:
 
@@ -31,14 +38,17 @@ Currently supported target plugins are:
 %build
 
 %install
-install -dm 755 %{buildroot}/%{python_sitelib}/supybot/plugins/Fedmsg
-install -pm 644 supybot-fedmsg/*.py %{buildroot}/%{python_sitelib}/supybot/plugins/Fedmsg/.
+install -dm 755 %{buildroot}/%{python2_sitelib}/supybot/plugins/Fedmsg
+install -pm 644 supybot-fedmsg/*.py %{buildroot}/%{python2_sitelib}/supybot/plugins/Fedmsg/.
 
 %files
 %doc README.rst LICENSE
-%{python_sitelib}/supybot/plugins/Fedmsg
+%{python2_sitelib}/supybot/plugins/Fedmsg
 
 %changelog
+* Thu Nov 20 2014 Ralph Bean <rbean at redhat.com> - 0.0.7-4
+- Modernize python macros.  Fixes RHBZ#1165916
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.7-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list