SHA256
6
0
forked from pool/tbb

Modernize building of the Python subpackage, don't generate *.egg.

This commit is contained in:
Matej Cepl 2025-01-08 18:41:37 +01:00
parent dd92ead7d3
commit f7a57bc661
Signed by untrusted user: mcepl
GPG Key ID: 79205802880BC9D8
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jan 8 17:41:12 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Modernize building of the Python subpackage, don't generate *.egg.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 31 13:57:21 UTC 2024 - Eyad Issa <eyadlorenzo@gmail.com> Tue Dec 31 13:57:21 UTC 2024 - Eyad Issa <eyadlorenzo@gmail.com>

View File

@ -34,7 +34,6 @@
%bcond_with test %bcond_with test
%if 0%{suse_version} >= 1500 %if 0%{suse_version} >= 1500
%{?!python_module:%define python_module() python3-%{**}}
%bcond_without python3 %bcond_without python3
%define skip_python2 1 %define skip_python2 1
%else %else
@ -59,6 +58,8 @@ BuildRequires: hwloc-devel
%if %{with python3} %if %{with python3}
BuildRequires: %{python_module devel >= 3.5} BuildRequires: %{python_module devel >= 3.5}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: swig >= 3.0.6 BuildRequires: swig >= 3.0.6
%endif %endif
@ -225,7 +226,7 @@ cd ..
# rebuild for every python flavor # rebuild for every python flavor
%if %{with python3} %if %{with python3}
pushd python pushd python
%python_build %pyproject_wheel
popd popd
%endif %endif
@ -238,8 +239,10 @@ source build/*/vars.sh
%if %{with python3} %if %{with python3}
pushd python pushd python
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch} %{python_expand %fdupes %{buildroot}%{$python_sitearch}
rm -rfv %{buildroot}%{$python_sitearch}/TBB-%{version}*.egg
}
popd popd
%endif %endif
@ -305,7 +308,6 @@ popd
%files %{python_files %{name}} %files %{python_files %{name}}
%{python_sitearch}/tbb %{python_sitearch}/tbb
%{python_sitearch}/TBB.py %{python_sitearch}/TBB.py
%{python_sitearch}/TBB-*py3*
%{python_sitearch}/TBB-%{version}*-info %{python_sitearch}/TBB-%{version}*-info
%pycache_only %{python_sitearch}/__pycache__/TBB* %pycache_only %{python_sitearch}/__pycache__/TBB*
%endif %endif