From faeb6e5cc54874f607f158f273c2e95b645ace36 Mon Sep 17 00:00:00 2001
From: Irina Boverman <iboverma(a)redhat.com>
Date: Dec 01 2017 00:02:44 +0000
Subject: 1.37.0-4
---
diff --git a/python-qpid.spec b/python-qpid.spec
index ca5fe36..025c906 100644
--- a/python-qpid.spec
+++ b/python-qpid.spec
@@ -1,3 +1,8 @@
+%{!?__python2:%global __python2 %{__python}}
+%{!?__python2:%global python2_sitelib %{python_sitelib}}
+%global pythonx python2
+%{!?__python2:%global pythonx python}
+
Name: python-qpid
Version: 1.37.0
Release: 3%{?dist}
@@ -10,14 +15,8 @@ Source0:
http://www.apache.org/dyn/closer.cgi/qpid/%{version}/qpid-python
#Patch0:
BuildArch: noarch
-
-%if 0%{?fedora}
-BuildRequires: python2-devel
-%else
-BuildRequires: python-devel
-%endif
-
-BuildRequires: python-setuptools
+BuildRequires: %{pythonx}-devel
+BuildRequires: %{pythonx}-setuptools
BuildRequires: epydoc
%global _description\
@@ -25,11 +24,8 @@ The Apache Qpid Python client library for AMQP.
%description %_description
-%if 0%{?fedora}
-%package -n python2-qpid
-%else
-%package -n python-qpid
-%endif
+
+%package -n %{pythonx}-qpid
Summary: %summary
Obsoletes: python-qpid-common
@@ -39,15 +35,9 @@ Requires: python-saslwrapper
%{?python_provide:%python_provide python2-qpid}
%endif
-%if 0%{?fedora}
-%description -n python2-qpid %_description
-%else
-%description -n python-qpid %_description
-%endif
-
-%if 0%{?fedora}
+%description -n %{pythonx}-qpid %_description
-%files -n python2-qpid
+%files -n %{pythonx}-qpid
%defattr(-,root,root,-)
%doc LICENSE.txt
%doc NOTICE.txt README.md examples
@@ -58,31 +48,9 @@ Requires: python-saslwrapper
%{python2_sitelib}/qpid/*.py*
%{python2_sitelib}/qpid/specs
%{python2_sitelib}/qpid/tests
-
%if "%{python_version}" >= "2.6"
%{python2_sitelib}/qpid_python-*.egg-info
%endif
-
-%else
-
-%files -n python-qpid
-%defattr(-,root,root,-)
-%doc LICENSE.txt
-%doc NOTICE.txt README.md examples
-%dir %{python_sitelib}/qpid
-%{python_sitelib}/qpid/messaging/
-%{python_sitelib}/qpid/saslmech/
-%{python_sitelib}/mllib
-%{python_sitelib}/qpid/*.py*
-%{python_sitelib}/qpid/specs
-%{python_sitelib}/qpid/tests
-
-%if "%{python_version}" >= "2.6"
-%{python_sitelib}/qpid_python-*.egg-info
-%endif
-
-%endif
-
%{_bindir}/qpid-python-test
@@ -97,24 +65,12 @@ Conformance tests for Apache Qpid.
%files -n qpid-tests
%defattr(-,root,root,-)
-
-%if 0%{?fedora}
%{python2_sitelib}/qpid_tests/
-%else
-%{python_sitelib}/qpid_tests/
-%endif
-
%doc NOTICE.txt
%license LICENSE.txt
%if "%{python_version}" >= "2.6"
-
-%if 0%{?fedora}
%{python2_sitelib}/qpid_python-*.egg-info
-%else
-%{python_sitelib}/qpid_python-*.egg-info
-%endif
-
%endif
%prep
@@ -129,15 +85,9 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf %{buildroot}
-%if 0%{?fedora}
%{__python2} setup.py install \
--install-purelib %{python2_sitelib} \
--root %{buildroot}
-%else
-%{__python} setup.py install \
- --install-purelib %{python_sitelib} \
- --root %{buildroot}
-%endif
rm %{buildroot}%{_bindir}/qpid-python-test.bat
https://src.fedoraproject.org/rpms/python-qpid/c/faeb6e5cc54874f607f158f2...