From 9d9be3e2c0d9f79569f57938f817edf389bd169dba259aeffd40eb20b11aea1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 11 Aug 2020 07:24:43 +0000 Subject: [PATCH] - Switch to multibuild to avoid cycles with matplotib OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sortedcontainers?expand=0&rev=20 --- _multibuild | 3 +++ python-sortedcontainers.changes | 5 +++++ python-sortedcontainers.spec | 24 ++++++++++++++++++------ 3 files changed, 26 insertions(+), 6 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-sortedcontainers.changes b/python-sortedcontainers.changes index 98a2e82..1434561 100644 --- a/python-sortedcontainers.changes +++ b/python-sortedcontainers.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 11 07:24:23 UTC 2020 - Tomáš Chvátal + +- Switch to multibuild to avoid cycles with matplotib + ------------------------------------------------------------------- Sun Jun 14 09:06:28 UTC 2020 - Dirk Mueller diff --git a/python-sortedcontainers.spec b/python-sortedcontainers.spec index aa70ce9..5971919 100644 --- a/python-sortedcontainers.spec +++ b/python-sortedcontainers.spec @@ -17,24 +17,31 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-sortedcontainers +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-sortedcontainers%{psuffix} Version: 2.2.2 Release: 0 Summary: Sorted container data types License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/grantjenks/python-sortedcontainers Source: https://github.com/grantjenks/python-sortedcontainers/archive/v%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -# SECTION test requirements +BuildArch: noarch +%if %{with test} BuildRequires: %{python_module matplotlib} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pytest} BuildRequires: %{python_module scipy} -# /SECTION -BuildArch: noarch +%endif %python_subpackages %description @@ -60,16 +67,21 @@ rm -rf sortedcontainers.egg-info %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check -export PYTHONDONTWRITEBYTECODE=1 +%if %{with test} %pytest tests +%endif +%if !%{with test} %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/* +%endif %changelog