[python-txamqp] build thrift subpackage unconditionally

Dan Callaghan dcallagh at fedoraproject.org
Mon Mar 9 00:58:00 UTC 2015


commit d55345921f198655f1d102ffc396e162c09bcb45
Author: Dan Callaghan <dcallagh at redhat.com>
Date:   Mon Mar 9 10:49:05 2015 +1000

    build thrift subpackage unconditionally

 python-txamqp.spec | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/python-txamqp.spec b/python-txamqp.spec
index e4b5956..a0c3748 100644
--- a/python-txamqp.spec
+++ b/python-txamqp.spec
@@ -1,7 +1,5 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
-%global with_thrift %{?_with_thrift: 1} %{?!_with_thrift: 0}
-
 %global upstream_name txamqp
 
 Name:           python-%{upstream_name}
@@ -29,17 +27,16 @@ This project contains all the necessary code to connect, send and receive
 messages to/from an AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ)
 using Twisted.
 
-%if %{with_thrift}
 %package        thrift
 Summary:        Contributed Thrift libraries for Twisted
 Group:          Development/Languages
 
-Requires:       thrift-python
+Requires:       %{name} = %{version}-%{release}
+Requires:       python-thrift
 
 %description    thrift
 txAMQP also includes support for using Thrift RPC over AMQP in Twisted
 applications.
-%endif
 
 %prep
 %setup -q -n txAMQP-%{version}
@@ -52,10 +49,6 @@ sed -i '/^#!\/usr\/bin\/env python/,+1 d' src/txamqp/codec.py
 %install
 rm -rf %{buildroot}
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
-# Remove thrift if we're not including it
-%if !%{with_thrift}
-rm -rf %{buildroot}%{python_sitelib}/%{upstream_name}/contrib/thrift
-%endif
 
 %clean
 rm -rf %{buildroot}
@@ -70,11 +63,9 @@ rm -rf %{buildroot}
 %{python_sitelib}/%{upstream_name}/contrib/*.py*
 %{python_sitelib}/txAMQP-%{version}-*.egg-info
 
-%if %{with_thrift}
 %files thrift
 %defattr(-,root,root,-)
 %{python_sitelib}/%{upstream_name}/contrib/thrift
-%endif
 
 %changelog
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6.1-4


More information about the scm-commits mailing list