From 647c006714b285cdfd73e3c96bcf103a50c85c0c233fedddbe4c1eb773a5c296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 5 Jun 2019 06:30:04 +0000 Subject: [PATCH 1/2] Accepting request 707740 from home:pgajdos - run the testsuite OBS-URL: https://build.opensuse.org/request/show/707740 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-incremental?expand=0&rev=6 --- python-incremental.changes | 5 +++++ python-incremental.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-incremental.changes b/python-incremental.changes index 4e99f38..78378a0 100644 --- a/python-incremental.changes +++ b/python-incremental.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 5 06:14:13 UTC 2019 - pgajdos@suse.com + +- run the testsuite + ------------------------------------------------------------------- Tue Dec 4 12:49:17 UTC 2018 - Matej Cepl diff --git a/python-incremental.spec b/python-incremental.spec index 918619e..0144861 100644 --- a/python-incremental.spec +++ b/python-incremental.spec @@ -1,7 +1,7 @@ # # spec file for package python-incremental # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,10 +26,16 @@ Group: Development/Languages/Python URL: https://github.com/twisted/incremental Source: https://files.pythonhosted.org/packages/source/i/incremental/incremental-%{version}.tar.gz BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros Suggests: %{python_module Twisted >= 16.4.0} Suggests: %{python_module click >= 6.0} BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Twisted >= 16.4.0} +BuildRequires: %{python_module click >= 6.0} +BuildRequires: %{python_module pytest} +# /SECTION %python_subpackages %description @@ -39,11 +45,14 @@ Incremental is a small library that versions your Python projects. %setup -q -n incremental-%{version} %build - %python_build %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest %files %{python_files} %license LICENSE From db535937e6038c1b38cf305b131942c41ce9d6451538f81eac63da8b703e7f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 6 Jun 2019 15:39:43 +0000 Subject: [PATCH 2/2] - Switch to multibuild to avoid build cycle OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-incremental?expand=0&rev=7 --- _multibuild | 3 +++ python-incremental.changes | 5 +++++ python-incremental.spec | 20 +++++++++++++++++--- 3 files changed, 25 insertions(+), 3 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-incremental.changes b/python-incremental.changes index 78378a0..102483c 100644 --- a/python-incremental.changes +++ b/python-incremental.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 6 15:38:34 UTC 2019 - Tomáš Chvátal + +- Switch to multibuild to avoid build cycle + ------------------------------------------------------------------- Wed Jun 5 06:14:13 UTC 2019 - pgajdos@suse.com diff --git a/python-incremental.spec b/python-incremental.spec index 0144861..e12d01f 100644 --- a/python-incremental.spec +++ b/python-incremental.spec @@ -17,7 +17,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-incremental +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-incremental%{psuffix} Version: 17.5.0 Release: 0 Summary: Library that versions your Python projects @@ -31,11 +39,11 @@ BuildRequires: python-rpm-macros Suggests: %{python_module Twisted >= 16.4.0} Suggests: %{python_module click >= 6.0} BuildArch: noarch -# SECTION test requirements +%if %{with test} BuildRequires: %{python_module Twisted >= 16.4.0} BuildRequires: %{python_module click >= 6.0} BuildRequires: %{python_module pytest} -# /SECTION +%endif %python_subpackages %description @@ -48,15 +56,21 @@ Incremental is a small library that versions your Python projects. %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if %{with test} %check %pytest +%endif +%if !%{with test} %files %{python_files} %license LICENSE %doc NEWS.rst README.rst %{python_sitelib}/* +%endif %changelog