2015-04-24 16:30:55 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-requests-mock
|
|
|
|
#
|
2018-02-23 14:54:29 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-04-24 16:30:55 +02: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 14:59:54 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-04-24 16:30:55 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-06-06 10:24:19 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-11-08 18:34:22 +01:00
|
|
|
%bcond_without test
|
2015-04-24 16:30:55 +02:00
|
|
|
Name: python-requests-mock
|
2018-11-08 18:34:22 +01:00
|
|
|
Version: 1.4.0
|
2015-04-24 16:30:55 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Mock out responses from the requests package
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: https://requests-mock.readthedocs.org/
|
2017-06-06 10:24:19 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module Sphinx >= 1.1.2}
|
|
|
|
BuildRequires: %{python_module fixtures}
|
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
BuildRequires: %{python_module pbr}
|
|
|
|
BuildRequires: %{python_module requests}
|
2018-11-08 18:34:22 +01:00
|
|
|
BuildRequires: %{python_module rpm-macros}
|
2017-06-06 10:24:19 +02:00
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
BuildRequires: %{python_module testrepository >= 0.0.18}
|
|
|
|
BuildRequires: %{python_module testtools}
|
|
|
|
BuildRequires: fdupes
|
2015-04-24 16:30:55 +02:00
|
|
|
Requires: python-requests >= 1.1
|
|
|
|
Requires: python-six
|
2017-06-06 10:24:19 +02:00
|
|
|
%ifpython3
|
2017-06-14 18:37:25 +02:00
|
|
|
BuildRequires: python3-dbm
|
2017-06-06 10:24:19 +02:00
|
|
|
Requires: python3-dbm
|
|
|
|
%endif
|
2018-11-08 18:34:22 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-04-24 16:30:55 +02:00
|
|
|
BuildArch: noarch
|
2017-06-06 10:24:19 +02:00
|
|
|
|
|
|
|
%python_subpackages
|
2015-04-24 16:30:55 +02:00
|
|
|
|
|
|
|
%description
|
2017-06-06 10:24:19 +02:00
|
|
|
requests-mock provides a building block to stub out the HTTP requests portions of your testing code.
|
|
|
|
You should checkout the docs for more information.
|
2015-04-24 16:30:55 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n requests-mock-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-06-06 10:24:19 +02:00
|
|
|
%python_build
|
2015-04-24 16:30:55 +02:00
|
|
|
|
|
|
|
%install
|
2017-06-06 10:24:19 +02:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/mymodule
|
2015-04-24 16:30:55 +02:00
|
|
|
|
2018-11-08 18:34:22 +01:00
|
|
|
%if %{with test}
|
2015-04-24 16:30:55 +02:00
|
|
|
%check
|
2018-11-08 18:34:22 +01:00
|
|
|
mv .testr.conf .testr.conf.orig
|
|
|
|
%{python_expand # first line can't be empty
|
|
|
|
rm -rf .testrepository
|
|
|
|
sed 's/python/$python/' .testr.conf.orig >| .testr.conf
|
|
|
|
testr init
|
|
|
|
testr run --parallel
|
|
|
|
}
|
|
|
|
%endif
|
2015-04-24 16:30:55 +02:00
|
|
|
|
2017-06-06 10:24:19 +02:00
|
|
|
%files %{python_files}
|
2018-11-08 18:34:22 +01:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS README.rst LICENSE ChangeLog
|
2015-04-24 16:30:55 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|