From 520a5338718d4f87ed5abce3b26d277e65a7dcee7f7a55f67ca9415e030f93e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Dec 2019 07:59:53 +0000 Subject: [PATCH 1/2] Accepting request 757123 from home:StefanBruens:branches:devel:languages:python - Use _multibuild for tests to reduce the build dependencies and simplify bootstrap for e.g. rpmlint. OBS-URL: https://build.opensuse.org/request/show/757123 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-arrow?expand=0&rev=28 --- _multibuild | 3 +++ python-arrow.changes | 6 ++++++ python-arrow.spec | 30 +++++++++++++++++++++++++----- 3 files changed, 34 insertions(+), 5 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-arrow.changes b/python-arrow.changes index 7ed6430..f3feeb5 100644 --- a/python-arrow.changes +++ b/python-arrow.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Dec 14 23:42:58 UTC 2019 - Stefan BrĂ¼ns + +- Use _multibuild for tests to reduce the build dependencies + and simplify bootstrap for e.g. rpmlint. + ------------------------------------------------------------------- Sat Nov 9 14:44:41 UTC 2019 - Arun Persaud diff --git a/python-arrow.spec b/python-arrow.spec index d5fe6bc..19cb982 100644 --- a/python-arrow.spec +++ b/python-arrow.spec @@ -1,7 +1,7 @@ # # spec file for package python-arrow # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,22 +18,34 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 -Name: python-arrow +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%bcond_without test +%define psuffix -test +%else +%bcond_with test +%endif +Name: python-arrow%{?psuffix} Version: 0.15.4 Release: 0 Summary: Better dates and times for Python License: Apache-2.0 URL: https://github.com/crsmithdev/arrow Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz +BuildRequires: %{python_module base} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if %{without test} +BuildRequires: %{python_module setuptools} +%else +BuildRequires: %{python_module arrow == %{version}} BuildRequires: %{python_module chai} BuildRequires: %{python_module dateparser} BuildRequires: %{python_module mock} BuildRequires: %{python_module nose} -BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module pytz} BuildRequires: %{python_module simplejson} -BuildRequires: fdupes -BuildRequires: python-rpm-macros +%endif Requires: python-python-dateutil BuildArch: noarch %if %{with python2} @@ -60,15 +72,22 @@ Arrow is heavily inspired by moment.js and requests. rm -rf arrow.egg-info %build +%if %{without test} %python_build +%endif %install +%if %{without test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%{$python_bin_suffix} -v +%endif +%if %{without test} %files %{python_files} %license LICENSE %doc README.rst @@ -76,5 +95,6 @@ rm -rf arrow.egg-info %{python_sitelib}/arrow/* %dir %{python_sitelib}/arrow-%{version}-py*.egg-info %{python_sitelib}/arrow-%{version}-py*.egg-info +%endif %changelog From fde041141feaef88bd7e5bad1dba81c4724945ad7ae7c9397b5a5d69362bb5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Dec 2019 08:01:47 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-arrow?expand=0&rev=29 --- python-arrow.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python-arrow.spec b/python-arrow.spec index 19cb982..eec3bc5 100644 --- a/python-arrow.spec +++ b/python-arrow.spec @@ -32,12 +32,10 @@ Summary: Better dates and times for Python License: Apache-2.0 URL: https://github.com/crsmithdev/arrow Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz -BuildRequires: %{python_module base} BuildRequires: fdupes BuildRequires: python-rpm-macros -%if %{without test} BuildRequires: %{python_module setuptools} -%else +%if %{with test} BuildRequires: %{python_module arrow == %{version}} BuildRequires: %{python_module chai} BuildRequires: %{python_module dateparser} @@ -72,9 +70,7 @@ Arrow is heavily inspired by moment.js and requests. rm -rf arrow.egg-info %build -%if %{without test} %python_build -%endif %install %if %{without test}