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
This commit is contained in:
parent
2cb9d44b72
commit
520a533871
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 14 23:42:58 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- 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 <arun@gmx.de>
|
Sat Nov 9 14:44:41 UTC 2019 - Arun Persaud <arun@gmx.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-arrow
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -18,22 +18,34 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%bcond_without python2
|
%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
|
Version: 0.15.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Better dates and times for Python
|
Summary: Better dates and times for Python
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/crsmithdev/arrow
|
URL: https://github.com/crsmithdev/arrow
|
||||||
Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz
|
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 chai}
|
||||||
BuildRequires: %{python_module dateparser}
|
BuildRequires: %{python_module dateparser}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module nose}
|
BuildRequires: %{python_module nose}
|
||||||
BuildRequires: %{python_module python-dateutil}
|
|
||||||
BuildRequires: %{python_module pytz}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module simplejson}
|
BuildRequires: %{python_module simplejson}
|
||||||
BuildRequires: fdupes
|
%endif
|
||||||
BuildRequires: python-rpm-macros
|
|
||||||
Requires: python-python-dateutil
|
Requires: python-python-dateutil
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
@ -60,15 +72,22 @@ Arrow is heavily inspired by moment.js and requests.
|
|||||||
rm -rf arrow.egg-info
|
rm -rf arrow.egg-info
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{without test}
|
||||||
%python_build
|
%python_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without test}
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%{$python_bin_suffix} -v
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%{$python_bin_suffix} -v
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@ -76,5 +95,6 @@ rm -rf arrow.egg-info
|
|||||||
%{python_sitelib}/arrow/*
|
%{python_sitelib}/arrow/*
|
||||||
%dir %{python_sitelib}/arrow-%{version}-py*.egg-info
|
%dir %{python_sitelib}/arrow-%{version}-py*.egg-info
|
||||||
%{python_sitelib}/arrow-%{version}-py*.egg-info
|
%{python_sitelib}/arrow-%{version}-py*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user