From 8bbe6c65a7ed6d0f2c1092b7a1969212d3b16316 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: May 30 2019 11:30:20 +0000 Subject: Add conditions --- diff --git a/python-kombu.spec b/python-kombu.spec index 9e23b0a..2a2dab9 100644 --- a/python-kombu.spec +++ b/python-kombu.spec @@ -57,6 +57,7 @@ The aim of Kombu is to make messaging in Python as easy as possible by providing an idiomatic high-level interface for the AMQP protocol, and also provide proven and tested solutions to common messaging problems. +%if %{with python2} %package -n python2-%{srcname} Summary: %{summary} Requires: python2-amqp >= 2.1.4 @@ -81,6 +82,7 @@ One of the most popular implementations of AMQP is RabbitMQ. The aim of Kombu is to make messaging in Python as easy as possible by providing an idiomatic high-level interface for the AMQP protocol, and also provide proven and tested solutions to common messaging problems. +%endif %if %{with python3} %package -n python3-%{srcname} @@ -118,17 +120,12 @@ also provide proven and tested solutions to common messaging problems. %autosetup -n %{srcname}-%{version} -p1 %build -%py2_build -%if %{with python3} -%py3_build -%endif +%{?with_python2:%py2_build} +%{?with_python3:%py3_build} %install -%py2_install - -%if %{with python3} -%py3_install -%endif +%{?with_python3:%py3_install} +%{?with_python2:%py2_install} %check # test requires python-vine, which is not packaged yet