forked from pool/python-flexmock
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flexmock?expand=0&rev=5
70 lines
2.2 KiB
RPMSpec
70 lines
2.2 KiB
RPMSpec
#
|
|
# spec file for package python-flexmock
|
|
#
|
|
# Copyright (c) 2018 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
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%bcond_without test
|
|
Name: python-flexmock
|
|
Version: 0.10.2
|
|
Release: 0
|
|
Summary: Testing library that makes it easy to create mocks, stubs and fakes
|
|
License: BSD-2-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/bkabrda/flexmock
|
|
Source: https://files.pythonhosted.org/packages/source/f/flexmock/flexmock-%{version}.tar.gz
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module nose}
|
|
BuildRequires: %{python_module pytest}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Flexmock is a testing library for Python that makes it easy to create mocks,
|
|
stubs and fakes. The API is inspired by a Ruby library of the same name, but
|
|
Python flexmock is not a clone of the Ruby version. It omits a number of
|
|
redundancies in the Ruby flexmock API, alters some defaults, and introduces
|
|
a number of Python-only features.
|
|
|
|
%prep
|
|
%setup -q -n flexmock-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%if %{with test}
|
|
%check
|
|
export PYTHONPATH="."
|
|
%python_exec tests/flexmock_unittest_test.py
|
|
%endif
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst CHANGELOG
|
|
%{python_sitelib}/flexmock.py*
|
|
%pycache_only %{python_sitelib}/__pycache__/flexmock*.py*
|
|
%{python_sitelib}/flexmock-%{version}-py*.egg-info
|
|
|
|
%changelog
|