Accepting request 499458 from home:sebix:branches:devel:languages:python
singlespec required by Request#498334 OBS-URL: https://build.opensuse.org/request/show/499458 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-mock?expand=0&rev=12
This commit is contained in:
parent
e42438930b
commit
454fadbebe
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 25 15:22:58 UTC 2017 - sebix+novell.com@sebix.at
|
||||
|
||||
- convert to singlespec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 30 11:04:29 UTC 2017 - tbechtold@suse.com
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without test
|
||||
Name: python-requests-mock
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
@ -23,43 +25,55 @@ Summary: Mock out responses from the requests package
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://requests-mock.readthedocs.org/
|
||||
Source: https://pypi.io/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-fixtures
|
||||
BuildRequires: python-mock
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python-six
|
||||
BuildRequires: python-sphinx >= 1.1.2
|
||||
BuildRequires: python-testrepository >= 0.0.18
|
||||
BuildRequires: python-testtools
|
||||
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 devel}
|
||||
BuildRequires: %{python_module fixtures}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pbr}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module rpm-macros}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: %{python_module testrepository >= 0.0.18}
|
||||
BuildRequires: %{python_module testtools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python3-dbm
|
||||
Requires: python-requests >= 1.1
|
||||
Requires: python-six
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%ifpython3
|
||||
Requires: python3-dbm
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
`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.
|
||||
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.
|
||||
|
||||
%prep
|
||||
%setup -q -n requests-mock-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/mymodule
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
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
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS README.rst LICENSE ChangeLog
|
||||
%{python_sitelib}/*
|
||||
|
Loading…
Reference in New Issue
Block a user