From 371a6931e6de45a31ab955d7f43fc40bdaa2e1a1f959bdaa5fec8ec32a74ef3b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 9 Jan 2018 08:02:08 +0000 Subject: [PATCH] Accepting request 562437 from openSUSE:Factory:Staging:O:DVD - Add conditions to build with py2 and py3 respectively in order to allow us disable one based on codestream OBS-URL: https://build.opensuse.org/request/show/562437 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tbb?expand=0&rev=43 --- tbb.changes | 6 ++++++ tbb.spec | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/tbb.changes b/tbb.changes index 811d88c..816e002 100644 --- a/tbb.changes +++ b/tbb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 8 09:41:48 UTC 2018 - tchvatal@suse.com + +- Add conditions to build with py2 and py3 respectively in order + to allow us disable one based on codestream + ------------------------------------------------------------------- Thu Dec 21 12:20:59 UTC 2017 - idonmez@suse.com diff --git a/tbb.spec b/tbb.spec index e65ccc9..22d42e1 100644 --- a/tbb.spec +++ b/tbb.spec @@ -1,7 +1,7 @@ # # spec file for package tbb # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,6 +18,8 @@ %define rel_ver 2018_U2 %define so_ver 2 +%bcond_without python2 +%bcond_without python3 Name: tbb Version: 2018_20171205 Release: 0 @@ -33,8 +35,12 @@ Patch2: reproducible.patch # PATCH-FIX-OPENSUSE disable-irml.patch -- Don't try to link to irml Patch3: disable-irml.patch BuildRequires: gcc-c++ +%if %{with python2} BuildRequires: python2-devel +%endif +%if %{with python3} BuildRequires: python3-devel +%endif BuildRequires: swig >= 3.0.6 %description @@ -122,13 +128,17 @@ cp -r python python3 export TBBROOT=$PWD . build/obj_release/tbbvars.sh +%if %{with python2} pushd python %python2_build popd +%endif +%if %{with python3} pushd python3 %python3_build popd +%endif %install mkdir -p %{buildroot}%{_includedir} @@ -147,13 +157,17 @@ pushd build/obj_release done popd +%if %{with python2} pushd python %python2_install popd +%endif +%if %{with python3} pushd python3 %python3_install popd +%endif %post -n libtbb%{so_ver} -p /sbin/ldconfig %postun -n libtbb%{so_ver} -p /sbin/ldconfig @@ -163,11 +177,15 @@ popd %files -n libtbb%{so_ver} %{_libdir}/libtbb.so.%{so_ver}* +%if %{with python2} %files -n python2-%{name} %{python_sitearch}/* +%endif +%if %{with python3} %files -n python3-%{name} %{python3_sitearch}/* +%endif %files -n libtbbmalloc%{so_ver} %{_libdir}/libtbbmalloc.so.%{so_ver}*