From a171b80a6e9cc3c615441b1b797b5f7c24c3f8f1b84c2304220d96c961b49ef8 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 26 Dec 2022 21:58:53 +0000 Subject: [PATCH 1/2] Accepting request 1045287 from home:bnavigator:branches:devel:languages:python:numeric - contourpy is a now a runtime requirement of matplotlib: avoid buildcycle by _multibuild OBS-URL: https://build.opensuse.org/request/show/1045287 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-contourpy?expand=0&rev=3 --- _multibuild | 3 +++ python-contourpy.changes | 6 ++++++ python-contourpy.spec | 25 +++++++++++++++++++++---- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-contourpy.changes b/python-contourpy.changes index e46b741..a26c97b 100644 --- a/python-contourpy.changes +++ b/python-contourpy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Dec 25 12:36:52 UTC 2022 - Ben Greiner + +- contourpy is a now a runtime requirement of matplotlib: avoid + buildcycle by _multibuild + ------------------------------------------------------------------- Mon Oct 31 11:40:43 UTC 2022 - Ben Greiner diff --git a/python-contourpy.spec b/python-contourpy.spec index 584b5ed..2dcfaa6 100644 --- a/python-contourpy.spec +++ b/python-contourpy.spec @@ -1,5 +1,5 @@ # -# spec file for package python-contourpy +# spec file # # Copyright (c) 2022 SUSE LLC # @@ -16,7 +16,16 @@ # -Name: python-contourpy +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + +Name: python-contourpy%{psuffix} Version: 1.0.6 Release: 0 Summary: Python library for calculating contours of 2D quadrilateral grids @@ -33,12 +42,12 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-numpy >= 1.16 Suggests: python-bokeh -# SECTION test requirements +%if %{with test} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module matplotlib} BuildRequires: %{python_module numpy >= 1.16} BuildRequires: %{python_module pytest} -# /SECTION +%endif %python_subpackages %description @@ -54,20 +63,28 @@ to include Matplotlib as a dependency. %setup -q -n contourpy-%{version} %build +%if !%{with test} export CFLAGS="%{optflags}" %pyproject_wheel +%endif %install +%if !%{with test} %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} +%endif +%if %{with test} %check %pytest_arch +%endif +%if !%{with test} %files %{python_files} %doc README.md %license LICENSE %{python_sitearch}/contourpy %{python_sitearch}/contourpy-%{version}*-info +%endif %changelog From f0da7929ea4d91a8142169bce8f46411dc1b704c81cf14ce0ea3352ace38e3bc Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 28 Dec 2022 10:21:03 +0000 Subject: [PATCH 2/2] Accepting request 1045571 from home:bnavigator:branches:devel:languages:python:numeric - explicitly require ourselves in :test flavor OBS-URL: https://build.opensuse.org/request/show/1045571 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-contourpy?expand=0&rev=4 --- python-contourpy.changes | 5 +++++ python-contourpy.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/python-contourpy.changes b/python-contourpy.changes index a26c97b..5f23235 100644 --- a/python-contourpy.changes +++ b/python-contourpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 27 23:10:39 UTC 2022 - Ben Greiner + +- explicitly require ourselves in :test flavor + ------------------------------------------------------------------- Sun Dec 25 12:36:52 UTC 2022 - Ben Greiner diff --git a/python-contourpy.spec b/python-contourpy.spec index 2dcfaa6..9b009c5 100644 --- a/python-contourpy.spec +++ b/python-contourpy.spec @@ -44,6 +44,7 @@ Requires: python-numpy >= 1.16 Suggests: python-bokeh %if %{with test} BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module contourpy = %{version}} BuildRequires: %{python_module matplotlib} BuildRequires: %{python_module numpy >= 1.16} BuildRequires: %{python_module pytest}