From c8d11dcc6bdba11149ccbf2e7db690905ae634c8e16a6749bf7a0c8d2bd092b0 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 6 Nov 2017 12:38:06 +0000 Subject: [PATCH] Accepting request 538180 from home:pluskalm:branches:devel:libraries:c_c++ - Build python2 and python3 bindings - Do not bundle python bindings with shared library OBS-URL: https://build.opensuse.org/request/show/538180 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tbb?expand=0&rev=35 --- tbb.changes | 6 ++++++ tbb.spec | 48 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/tbb.changes b/tbb.changes index ae1b4c8..314e7a1 100644 --- a/tbb.changes +++ b/tbb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 1 17:31:14 UTC 2017 - mpluskal@suse.com + +- Build python2 and python3 bindings +- Do not bundle python bindings with shared library + ------------------------------------------------------------------- Thu Sep 21 12:03:27 UTC 2017 - idonmez@suse.com diff --git a/tbb.spec b/tbb.spec index 5736755..13c42c7 100644 --- a/tbb.spec +++ b/tbb.spec @@ -18,7 +18,6 @@ %define rel_ver 2018 %define so_ver 2 - Name: tbb Version: 2018_20170726 Release: 0 @@ -32,9 +31,9 @@ Patch1: optflags.patch # PATCH-FIX-OPENSUSE reproducible.patch -- Do not compile build hostname+kernel into binary Patch2: reproducible.patch BuildRequires: gcc-c++ -BuildRequires: python-devel +BuildRequires: python2-devel +BuildRequires: python3-devel BuildRequires: swig >= 3.0.6 -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Threading Building Blocks (TBB) offers a rich and complete approach to @@ -71,6 +70,22 @@ templates, scalable_allocator and cache_aligned_allocator, address critical issues in parallel programming: scalability and false sharing. +%package -n python2-%{name} +Summary: Python 2 support for Threading Building Blocks (TBB) +Group: Development/Languages/Python + +%description -n python2-%{name} +This package contains python 2 bindings for Threading Building Blocks +(TBB). + +%package -n python3-%{name} +Summary: Python 3 support for Threading Building Blocks (TBB) +Group: Development/Languages/Python + +%description -n python3-%{name} +This package contains python 2 bindings for Threading Building Blocks +(TBB). + %package devel Summary: Development Files for Threading Building Blocks (TBB) Group: Development/Libraries/C and C++ @@ -100,9 +115,16 @@ mkdir lib; pushd lib ln -s ../build/obj_release/*.so* . popd +cp -r python python3 + export TBBROOT=$PWD +. build/obj_release/tbbvars.sh pushd python -make release +%python2_build +popd + +pushd python3 +%python3_build popd %install @@ -123,9 +145,11 @@ pushd build/obj_release popd pushd python - mkdir -p %{buildroot}%{python_sitelib} - install -m 0644 TBB.py %{buildroot}%{python_sitelib} - install -m 0755 _TBB.so %{buildroot}%{python_sitelib} +%python2_install +popd + +pushd python3 +%python3_install popd %post -n libtbb%{so_ver} -p /sbin/ldconfig @@ -134,17 +158,19 @@ popd %postun -n libtbbmalloc%{so_ver} -p /sbin/ldconfig %files -n libtbb%{so_ver} -%defattr(-,root,root) %{_libdir}/libtbb.so.%{so_ver}* -%{python_sitelib}/* + +%files -n python2-%{name} +%{python_sitearch}/* + +%files -n python3-%{name} +%{python3_sitearch}/* %files -n libtbbmalloc%{so_ver} -%defattr(-,root,root) %{_libdir}/libtbbmalloc.so.%{so_ver}* %{_libdir}/libtbbmalloc_proxy.so.%{so_ver}* %files devel -%defattr(-,root,root) %doc CHANGES LICENSE index.html %doc doc/Release_Notes.txt doc/html/ %{_includedir}/tbb/