2018-05-16 17:36:42 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pyshould
|
|
|
|
#
|
2020-08-17 06:14:51 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2018-05-16 17:36:42 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-04 13:54:35 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-30 20:35:06 +00:00
|
|
|
#
|
2018-05-16 17:36:42 +00:00
|
|
|
|
|
|
|
|
2018-05-30 20:35:06 +00:00
|
|
|
%define modname pyshould
|
2018-05-16 17:36:42 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-05-30 20:35:06 +00:00
|
|
|
Name: python-%{modname}
|
2018-05-16 17:36:42 +00:00
|
|
|
Version: 0.7.1
|
|
|
|
Release: 0
|
|
|
|
Summary: Should style asserts
|
2018-05-30 20:35:06 +00:00
|
|
|
License: MIT
|
2018-05-16 17:36:42 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-05-30 20:35:06 +00:00
|
|
|
URL: https://github.com/drslump/%{modname}
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pyshould/%{modname}-%{version}.tar.gz
|
2018-05-16 17:36:42 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-05-30 20:35:06 +00:00
|
|
|
Requires: python-hamcrest
|
|
|
|
BuildArch: noarch
|
2018-05-16 17:36:42 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module hamcrest}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
PyShould is a Python DSL allowing to write expectations or assertions
|
|
|
|
in almost natural language. The goal is to offer an expressive yet
|
|
|
|
readable syntax to define the expectations in detail.
|
|
|
|
|
|
|
|
Under the hood it uses the PyHamcrest library of matchers to build
|
|
|
|
complex matching predicates and great explanations when there is a
|
|
|
|
mismatch.
|
|
|
|
|
|
|
|
Its primary use case is in unit testing, replacing the need for
|
|
|
|
Python's native assertX methods. Its use is completely transparent
|
|
|
|
to the unit testing runner used, since mismatches are reported using
|
|
|
|
the standard AssertionError.
|
|
|
|
|
|
|
|
%prep
|
2018-05-30 20:35:06 +00:00
|
|
|
%setup -q -n %{modname}-%{version}
|
2020-08-17 06:14:51 +00:00
|
|
|
sed -i '/nose/d' setup.py
|
2018-05-16 17:36:42 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2018-05-30 20:35:06 +00:00
|
|
|
# We shouldn't install tests
|
2020-08-17 06:14:51 +00:00
|
|
|
%{python_expand rm -rvf %{buildroot}%{$python_sitelib}/tests
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
}
|
2018-05-16 17:36:42 +00:00
|
|
|
|
|
|
|
%check
|
2020-08-18 22:33:25 +00:00
|
|
|
%pyunittest
|
2018-05-16 17:36:42 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2018-05-30 20:35:06 +00:00
|
|
|
%{python_sitelib}/%{modname}*
|
2018-05-16 17:36:42 +00:00
|
|
|
|
|
|
|
%changelog
|