From f7a57bc661f3aff47dfa1fc55642925d5639a4e30086a4543ac94237c479195a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Wed, 8 Jan 2025 18:41:37 +0100 Subject: [PATCH] Modernize building of the Python subpackage, don't generate *.egg. --- tbb.changes | 5 +++++ tbb.spec | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tbb.changes b/tbb.changes index 75c43c9..be6141e 100644 --- a/tbb.changes +++ b/tbb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 8 17:41:12 UTC 2025 - Matej Cepl + +- Modernize building of the Python subpackage, don't generate *.egg. + ------------------------------------------------------------------- Tue Dec 31 13:57:21 UTC 2024 - Eyad Issa diff --git a/tbb.spec b/tbb.spec index 454fec4..052c9cd 100644 --- a/tbb.spec +++ b/tbb.spec @@ -34,7 +34,6 @@ %bcond_with test %if 0%{suse_version} >= 1500 -%{?!python_module:%define python_module() python3-%{**}} %bcond_without python3 %define skip_python2 1 %else @@ -59,6 +58,8 @@ BuildRequires: hwloc-devel %if %{with python3} BuildRequires: %{python_module devel >= 3.5} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros BuildRequires: swig >= 3.0.6 %endif @@ -225,7 +226,7 @@ cd .. # rebuild for every python flavor %if %{with python3} pushd python -%python_build +%pyproject_wheel popd %endif @@ -238,8 +239,10 @@ source build/*/vars.sh %if %{with python3} pushd python -%python_install -%python_expand %fdupes %{buildroot}%{$python_sitearch} +%pyproject_install +%{python_expand %fdupes %{buildroot}%{$python_sitearch} + rm -rfv %{buildroot}%{$python_sitearch}/TBB-%{version}*.egg +} popd %endif @@ -305,7 +308,6 @@ popd %files %{python_files %{name}} %{python_sitearch}/tbb %{python_sitearch}/TBB.py -%{python_sitearch}/TBB-*py3* %{python_sitearch}/TBB-%{version}*-info %pycache_only %{python_sitearch}/__pycache__/TBB* %endif