14
0

Accepting request 827115 from home:jayvdb:py-submit

Replace nose with pytest

OBS-URL: https://build.opensuse.org/request/show/827115
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytimeparse?expand=0&rev=6
This commit is contained in:
Tomáš Chvátal
2020-08-17 06:16:11 +00:00
committed by Git OBS Bridge
parent 2b3c505eb5
commit 4384b29617
2 changed files with 13 additions and 12 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Aug 16 21:09:10 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Remove %bcond_without test
- Replace nose with pytest
- Tidy spec
-------------------------------------------------------------------
Tue Dec 4 12:53:15 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytimeparse
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,23 +17,19 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-pytimeparse
Version: 1.1.8
Release: 0
Summary: Time expression parser
License: MIT
Group: Development/Languages/Python
Url: https://github.com/wroberts/pytimeparse
URL: https://github.com/wroberts/pytimeparse
Source: https://files.pythonhosted.org/packages/source/p/pytimeparse/pytimeparse-%{version}.tar.gz
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module nose}
%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%description
@@ -60,6 +56,7 @@ datetime module in the standard library.
%prep
%setup -q -n pytimeparse-%{version}
sed -i '/nose/d' setup.py
%build
%python_build
@@ -68,13 +65,10 @@ datetime module in the standard library.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%pytest pytimeparse/tests/test*.py
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE.rst
%{python_sitelib}/*