From a86c3422a550f2e1b2de1ce16689d5fcceb7490a4d4658e811e8f4fb5ed81cc1 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 14 Jul 2023 10:04:47 +0000 Subject: [PATCH] Accepting request 1098647 from GNOME:Next - Be leaner with the build deps: + Do not buildrequire python-pip and -wheel: being part of ring0 we have to be extra careful. + Use python_build/python_install instead of pyproject_wheel/pyproject_install. OBS-URL: https://build.opensuse.org/request/show/1098647 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=252 --- meson.changes | 9 +++++++++ meson.spec | 14 ++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/meson.changes b/meson.changes index 74ecf67..754445a 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jul 14 10:01:09 UTC 2023 - Dominique Leuenberger + +- Be leaner with the build deps: + + Do not buildrequire python-pip and -wheel: being part of ring0 + we have to be extra careful. + + Use python_build/python_install instead of + pyproject_wheel/pyproject_install. + ------------------------------------------------------------------- Thu Jun 29 07:26:32 UTC 2023 - Andreas Schneider diff --git a/meson.spec b/meson.spec index 3d77504..12f8da0 100644 --- a/meson.spec +++ b/meson.spec @@ -50,8 +50,6 @@ Patch0: meson-test-installed-bin.patch Patch1: extend-test-timeout-on-qemu-builds.patch # PATCH-FIX-OPENSUSE meson-distutils.patch -- meson is ring0 and therefor setuptools is not available Patch2: meson-distutils.patch -BuildRequires: %{python_module pip} -BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with setuptools} @@ -198,7 +196,7 @@ rm -rf test\ cases/failing/85\ gtest\ dependency\ with\ version %build %if %{without test} -%pyproject_wheel +%python_build %else # Ensure we have no mesonbuild / meson in CWD, thus guaranteeing we use meson in $PATH rm -r meson.py mesonbuild @@ -207,8 +205,7 @@ rm -r meson.py mesonbuild %install # If this is the test suite, we don't need anything else but the meson package %if %{without test} -%pyproject_install -%fdupes %{buildroot}%{python_sitelib} +%python_install install -Dpm 0644 data/macros.meson \ %{buildroot}%{_rpmconfigdir}/macros.d/macros.meson @@ -230,7 +227,12 @@ import sys sys.exit(main()) """ > %{buildroot}%{_bindir}/%{name} chmod +x %{buildroot}%{_bindir}/%{name} -%{python_expand %{$python_fix_shebang}} +%{python_expand %{$python_fix_shebang} + +# ensure egg-info is a directory +rm %{buildroot}%{$python_sitelib}/*.egg-info +cp -r meson.egg-info %{buildroot}%{$python_sitelib}/meson-%{version}-py%{$python_version}.egg-info +} # Fix missing data files with distutils while read line; do