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
This commit is contained in:
Marcus Meissner 2017-11-06 12:38:06 +00:00 committed by Git OBS Bridge
parent 8f95ea360c
commit c8d11dcc6b
2 changed files with 43 additions and 11 deletions

View File

@ -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

View File

@ -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<T> and cache_aligned_allocator<T>,
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/