back
This commit is contained in:
parent
cb4f11e7ab
commit
9826c84880
@ -1,77 +0,0 @@
|
|||||||
From 9ff79ffce3e528aadfae0d6dacd042594714f15e Mon Sep 17 00:00:00 2001
|
|
||||||
From: wu-leilei <wu18740459704@163.com>
|
|
||||||
Date: Wed, 19 Jan 2022 17:35:12 +0800
|
|
||||||
Subject: [PATCH] specify the python interpreter
|
|
||||||
|
|
||||||
---
|
|
||||||
python/TBB.py | 2 +-
|
|
||||||
python/setup.py | 2 +-
|
|
||||||
python/tbb/__init__.py | 2 +-
|
|
||||||
python/tbb/__main__.py | 2 +-
|
|
||||||
python/tbb/pool.py | 2 +-
|
|
||||||
python/tbb/test.py | 2 +-
|
|
||||||
6 files changed, 6 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/python/TBB.py b/python/TBB.py
|
|
||||||
index fbee4c2..d40363c 100644
|
|
||||||
--- a/python/TBB.py
|
|
||||||
+++ b/python/TBB.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python3
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016-2021 Intel Corporation
|
|
||||||
#
|
|
||||||
diff --git a/python/setup.py b/python/setup.py
|
|
||||||
index f084e70..c2439b0 100644
|
|
||||||
--- a/python/setup.py
|
|
||||||
+++ b/python/setup.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python3
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016-2021 Intel Corporation
|
|
||||||
#
|
|
||||||
diff --git a/python/tbb/__init__.py b/python/tbb/__init__.py
|
|
||||||
index 875667c..53d6034 100644
|
|
||||||
--- a/python/tbb/__init__.py
|
|
||||||
+++ b/python/tbb/__init__.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python3
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016-2021 Intel Corporation
|
|
||||||
#
|
|
||||||
diff --git a/python/tbb/__main__.py b/python/tbb/__main__.py
|
|
||||||
index 2c07101..61da5d4 100644
|
|
||||||
--- a/python/tbb/__main__.py
|
|
||||||
+++ b/python/tbb/__main__.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python3
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016-2021 Intel Corporation
|
|
||||||
#
|
|
||||||
diff --git a/python/tbb/pool.py b/python/tbb/pool.py
|
|
||||||
index 75c9016..127b487 100644
|
|
||||||
--- a/python/tbb/pool.py
|
|
||||||
+++ b/python/tbb/pool.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python3
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016-2021 Intel Corporation
|
|
||||||
#
|
|
||||||
diff --git a/python/tbb/test.py b/python/tbb/test.py
|
|
||||||
index 7e02d78..23e1276 100644
|
|
||||||
--- a/python/tbb/test.py
|
|
||||||
+++ b/python/tbb/test.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python3
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016-2021 Intel Corporation
|
|
||||||
#
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
BIN
tbb-2020.3.tar.gz
Normal file
BIN
tbb-2020.3.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
52
tbb.spec
52
tbb.spec
@ -1,6 +1,6 @@
|
|||||||
Name: tbb
|
Name: tbb
|
||||||
Version: 2021.4.0
|
Version: 2020.3
|
||||||
Release: 1
|
Release: 4
|
||||||
Summary: Threading Building Blocks lets you easily write parallel C++ programs
|
Summary: Threading Building Blocks lets you easily write parallel C++ programs
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://threadingbuildingblocks.org/
|
URL: http://threadingbuildingblocks.org/
|
||||||
@ -10,9 +10,8 @@ Source6: tbb.pc
|
|||||||
Source7: tbbmalloc.pc
|
Source7: tbbmalloc.pc
|
||||||
Source8: tbbmalloc_proxy.pc
|
Source8: tbbmalloc_proxy.pc
|
||||||
Patch9000: bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch
|
Patch9000: bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch
|
||||||
Patch9001: specify-the-python-interpreter.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc-c++ doxygen swig python3-devel cmake make
|
BuildRequires: gcc-c++ doxygen swig python3-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Threading Building Blocks (TBB) lets you easily write parallel C++ programs that
|
Threading Building Blocks (TBB) lets you easily write parallel C++ programs that
|
||||||
@ -47,14 +46,13 @@ TBB module of Python 3
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n oneTBB-%{version} -p1
|
%autosetup -n oneTBB-%{version} -p1
|
||||||
|
|
||||||
|
sed -i 's/"`hostname -s`" ("`uname -m`"/openEulerbuild (%{_arch}/' \
|
||||||
|
build/version_info_linux.sh
|
||||||
|
sed -i 's/-mrtm//' build/linux.gcc.inc
|
||||||
sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py
|
sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py
|
||||||
sed -i '/^#!/d' python/tbb/{pool,test}.py
|
sed -i '/^#!/d' python/tbb/{pool,test}.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
|
||||||
-DTBB_TEST:BOOL=OFF \
|
|
||||||
-DTBB4PY_BUILD:BOOL=ON
|
|
||||||
|
|
||||||
%make_build tbb_build_prefix=obj stdver=c++14 \
|
%make_build tbb_build_prefix=obj stdver=c++14 \
|
||||||
CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD -fstack-protector-strong" \
|
CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD -fstack-protector-strong" \
|
||||||
LDFLAGS="$RPM_LD_FLAGS -lpthread -fstack-protector-strong"
|
LDFLAGS="$RPM_LD_FLAGS -lpthread -fstack-protector-strong"
|
||||||
@ -65,7 +63,7 @@ for pcfile in %{pcsource}; do
|
|||||||
touch -r ${pcfile} ${base}
|
touch -r ${pcfile} ${base}
|
||||||
done
|
done
|
||||||
|
|
||||||
. */vars.sh
|
. build/obj_release/tbbvars.sh
|
||||||
pushd python
|
pushd python
|
||||||
%make_build -C rml stdver=c++14 \
|
%make_build -C rml stdver=c++14 \
|
||||||
CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD -fstack-protector-strong" \
|
CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD -fstack-protector-strong" \
|
||||||
@ -74,20 +72,26 @@ pushd python
|
|||||||
%else
|
%else
|
||||||
LDFLAGS="$RPM_LD_FLAGS -lpthread -fstack-protector-strong"
|
LDFLAGS="$RPM_LD_FLAGS -lpthread -fstack-protector-strong"
|
||||||
%endif
|
%endif
|
||||||
|
cp -p rml/libirml.so* .
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
make doxygen
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
|
make test %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p build/python/build
|
|
||||||
%make_install
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_libdir}
|
mkdir -p %{buildroot}/%{_libdir}
|
||||||
mkdir -p %{buildroot}/%{_includedir}
|
mkdir -p %{buildroot}/%{_includedir}
|
||||||
|
|
||||||
|
pushd build/obj_release
|
||||||
|
for file in libtbb{,malloc{,_proxy}}; do
|
||||||
|
install -p -D -m 755 ${file}.so.2 %{buildroot}/%{_libdir}
|
||||||
|
ln -s $file.so.2 %{buildroot}/%{_libdir}/$file.so
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
pushd include
|
pushd include
|
||||||
find tbb -type f ! -name \*.htm\* -exec install -p -D -m 644 {} \
|
find tbb -type f ! -name \*.htm\* -exec install -p -D -m 644 {} \
|
||||||
%{buildroot}/%{_includedir}/{} \;
|
%{buildroot}/%{_includedir}/{} \;
|
||||||
@ -99,48 +103,50 @@ for file in %{pcsource}; do
|
|||||||
%{buildroot}/%{_libdir}/pkgconfig/$(basename ${file})
|
%{buildroot}/%{_libdir}/pkgconfig/$(basename ${file})
|
||||||
done
|
done
|
||||||
|
|
||||||
. */vars.sh
|
# Install the rml headers
|
||||||
|
mkdir -p %{buildroot}%{_includedir}/rml
|
||||||
|
cp -p src/rml/include/*.h %{buildroot}%{_includedir}/rml
|
||||||
|
|
||||||
|
. build/obj_release/tbbvars.sh
|
||||||
pushd python
|
pushd python
|
||||||
%py3_install
|
%py3_install
|
||||||
chmod a+x %{buildroot}%{python3_sitearch}/TBB.py
|
chmod a+x %{buildroot}%{python3_sitearch}/TBB.py
|
||||||
chmod a+x %{buildroot}%{python3_sitearch}/tbb/__*.py
|
chmod a+x %{buildroot}%{python3_sitearch}/tbb/__*.py
|
||||||
|
cp -p libirml.so.1 %{buildroot}%{_libdir}
|
||||||
|
ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_libdir}/cmake
|
mkdir -p %{buildroot}%{_libdir}/cmake
|
||||||
cp -a cmake %{buildroot}%{_libdir}/cmake/tbb
|
cp -a cmake %{buildroot}%{_libdir}/cmake/tbb
|
||||||
|
rm %{buildroot}%{_libdir}/cmake/tbb/README.rst
|
||||||
|
|
||||||
%ldconfig_scriptlets libs
|
%ldconfig_scriptlets libs
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%license LICENSE.txt
|
%license LICENSE
|
||||||
%doc %{_docdir}/TBB/README.md
|
|
||||||
%{_prefix}/lib.*/*
|
|
||||||
%{_prefix}/temp.*/*
|
|
||||||
%{_libdir}/libirml.so.1
|
%{_libdir}/libirml.so.1
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.2
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
%{_includedir}/tbb
|
%{_includedir}/tbb
|
||||||
%{_includedir}/oneapi/
|
%{_includedir}/rml
|
||||||
%{_libdir}/cmake/
|
%{_libdir}/cmake/
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.md
|
%doc doc/Release_Notes.txt html README README.md cmake/README.rst CHANGES
|
||||||
|
|
||||||
%files -n python3-tbb
|
%files -n python3-tbb
|
||||||
|
%doc python/index.html
|
||||||
%{python3_sitearch}/TBB*
|
%{python3_sitearch}/TBB*
|
||||||
%{python3_sitearch}/tbb/
|
%{python3_sitearch}/tbb/
|
||||||
%{python3_sitearch}/__pycache__/TBB*
|
%{python3_sitearch}/__pycache__/TBB*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jan 19 2022 wulei <wulei80@huawei.com> - 2021.4.0-1
|
|
||||||
- Package update
|
|
||||||
|
|
||||||
* Fri Jul 2 2021 Hugel <genqihu1@huawei.com> - 2020.3-4
|
* Fri Jul 2 2021 Hugel <genqihu1@huawei.com> - 2020.3-4
|
||||||
- Add multiple threads to make test
|
- Add multiple threads to make test
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user