From 168f66e3acc533710bfbb546b7f9f959b6494e3aa3a71c73eae76924068dfad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 14 Oct 2022 09:21:07 +0000 Subject: [PATCH 1/2] Accepting request 1010640 from home:mcalabkova:branches:devel:languages:python - Add meson-subdir-fix.patch to fix the failure with new meson OBS-URL: https://build.opensuse.org/request/show/1010640 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-meson-python?expand=0&rev=5 --- meson-subdir-fix.patch | 25 +++++++++++++++++++++++++ python-meson-python.changes | 5 +++++ python-meson-python.spec | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 meson-subdir-fix.patch diff --git a/meson-subdir-fix.patch b/meson-subdir-fix.patch new file mode 100644 index 0000000..e9689d0 --- /dev/null +++ b/meson-subdir-fix.patch @@ -0,0 +1,25 @@ +From f51fcafb20e20a8a724a2b65f49670a74fe7d8f2 Mon Sep 17 00:00:00 2001 +From: Ralf Gommers +Date: Thu, 6 Oct 2022 20:18:43 +0200 +Subject: [PATCH] TST: update the test for `install_subdir` for fix in meson + 0.63.3 + +We weren't sure if the fix we needed was getting backported, +but it has been. +--- + tests/test_wheel.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_wheel.py b/tests/test_wheel.py +index 818367f..aab0523 100644 +--- a/tests/test_wheel.py ++++ b/tests/test_wheel.py +@@ -107,7 +107,7 @@ def test_scipy_like(wheel_scipy_like): + # 0.63.2: https://github.com/mesonbuild/meson/pull/10765 + # A backport of the fix may land in 0.63.3, if so then remove the version + # check here and add the two expected files unconditionally. +- if meson_version and meson_version >= '0.63.99': ++ if meson_version and meson_version >= '0.63.3': + expecting |= { + 'mypkg/submod/__init__.py', + 'mypkg/submod/unknown_filetype.npq', diff --git a/python-meson-python.changes b/python-meson-python.changes index 2a83efa..4112d86 100644 --- a/python-meson-python.changes +++ b/python-meson-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 14 08:49:00 UTC 2022 - Markéta Machová + +- Add meson-subdir-fix.patch to fix the failure with new meson + ------------------------------------------------------------------- Tue Oct 11 09:01:00 UTC 2022 - Ben Greiner diff --git a/python-meson-python.spec b/python-meson-python.spec index a64ba03..7db7851 100644 --- a/python-meson-python.spec +++ b/python-meson-python.spec @@ -25,6 +25,8 @@ URL: https://github.com/FFY00/meson-python Source: https://files.pythonhosted.org/packages/source/m/meson_python/meson_python-%{version}.tar.gz # PATCH-FEATURE-OPENSUSE mesonpy-trim-deps.patch code@bnavigator.de Patch1: mesonpy-trim-deps.patch +# PATCH-FIX-UPSTREAM https://github.com/FFY00/meson-python/commit/f51fcafb20e20a8a724a2b65f49670a74fe7d8f2 TST: update the test for install_subdir for fix in meson 0.63.3 +Patch2: meson-subdir-fix.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module pyproject-metadata >= 0.6.1} From 4bbb6f876ec19190e416220c2ac04df1ffe5162f70904b4515f80e59d988f88c Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Fri, 14 Oct 2022 12:46:01 +0000 Subject: [PATCH 2/2] - Update meson-subdir-fix.patch to fix the failure for python3.8 and python3.9 because the meson package is only available for python3.10 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-meson-python?expand=0&rev=6 --- meson-subdir-fix.patch | 25 +++++++++++++++++++++---- python-meson-python.changes | 6 ++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/meson-subdir-fix.patch b/meson-subdir-fix.patch index e9689d0..3d7f5e8 100644 --- a/meson-subdir-fix.patch +++ b/meson-subdir-fix.patch @@ -10,10 +10,10 @@ but it has been. tests/test_wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/tests/test_wheel.py b/tests/test_wheel.py -index 818367f..aab0523 100644 ---- a/tests/test_wheel.py -+++ b/tests/test_wheel.py +Index: meson_python-0.10.0/tests/test_wheel.py +=================================================================== +--- meson_python-0.10.0.orig/tests/test_wheel.py ++++ meson_python-0.10.0/tests/test_wheel.py @@ -107,7 +107,7 @@ def test_scipy_like(wheel_scipy_like): # 0.63.2: https://github.com/mesonbuild/meson/pull/10765 # A backport of the fix may land in 0.63.3, if so then remove the version @@ -23,3 +23,20 @@ index 818367f..aab0523 100644 expecting |= { 'mypkg/submod/__init__.py', 'mypkg/submod/unknown_filetype.npq', +@@ -120,7 +120,15 @@ def test_scipy_like(wheel_scipy_like): + for item in expecting: + assert item in actual_files + else: +- assert wheel_contents(artifact) == expecting ++ # meson_version is None for python3.8 and python3.9 but the real ++ # version installed is > 0.63.3, so it's possible that these two ++ # files exists in the wheel_contents but not in the expecting: ++ # 'mypkg/submod/__init__.py', ++ # 'mypkg/submod/unknown_filetype.npq', ++ # So we need to compare just the expecting ++ actual_files = wheel_contents(artifact) ++ for item in expecting: ++ assert item in actual_files + + name = artifact.parsed_filename + assert name.group('pyver') == PYTHON_TAG diff --git a/python-meson-python.changes b/python-meson-python.changes index 4112d86..6a87988 100644 --- a/python-meson-python.changes +++ b/python-meson-python.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 14 12:44:56 UTC 2022 - Daniel Garcia + +- Update meson-subdir-fix.patch to fix the failure for python3.8 and python3.9 + because the meson package is only available for python3.10 + ------------------------------------------------------------------- Fri Oct 14 08:49:00 UTC 2022 - Markéta Machová