OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-mock?expand=0&rev=26
This commit is contained in:
parent
e49592d98d
commit
fa3140f8c1
@ -17,8 +17,9 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%bcond_without test
|
||||||
Name: python-requests-mock
|
Name: python-requests-mock
|
||||||
Version: 1.5.2
|
Version: 1.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Mock out responses from the requests package
|
Summary: Mock out responses from the requests package
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@ -31,18 +32,18 @@ BuildRequires: %{python_module fixtures}
|
|||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module pbr}
|
BuildRequires: %{python_module pbr}
|
||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module rpm-macros}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: %{python_module testrepository >= 0.0.18}
|
BuildRequires: %{python_module testrepository >= 0.0.18}
|
||||||
BuildRequires: %{python_module testtools}
|
BuildRequires: %{python_module testtools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
|
||||||
Requires: python-requests >= 1.1
|
Requires: python-requests >= 1.1
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
%ifpython3
|
%ifpython3
|
||||||
BuildRequires: python3-dbm
|
BuildRequires: python3-dbm
|
||||||
Requires: python3-dbm
|
Requires: python3-dbm
|
||||||
%endif
|
%endif
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@ -61,13 +62,20 @@ You should checkout the docs for more information.
|
|||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/mymodule
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/mymodule
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
%python_expand pytest-%{$python_bin_suffix} tests/pytest
|
mv .testr.conf .testr.conf.orig
|
||||||
%python_exec setup.py testr
|
%{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 %{python_files}
|
%files %{python_files}
|
||||||
%doc AUTHORS README.rst ChangeLog
|
%defattr(-,root,root,-)
|
||||||
%license LICENSE
|
%doc AUTHORS README.rst LICENSE ChangeLog
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user