Accepting request 624056 from home:mimi_vx:branches:devel:languages:python

- -test subpackage must be empty 

- -test subpackage must be empty

OBS-URL: https://build.opensuse.org/request/show/624056
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=110
This commit is contained in:
Ondřej Súkup 2018-07-19 14:15:21 +00:00 committed by Git OBS Bridge
parent df7ea9c472
commit 579757f76c
3 changed files with 34 additions and 20 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 19 10:27:24 UTC 2018 - mimi.vx@gmail.com
- -test subpackage must be empty
-------------------------------------------------------------------
Mon Jul 16 00:09:54 UTC 2018 - mimi.vx@gmail.com

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 19 10:27:24 UTC 2018 - mimi.vx@gmail.com
- -test subpackage must be empty
-------------------------------------------------------------------
Mon Jul 16 00:09:54 UTC 2018 - mimi.vx@gmail.com

View File

@ -21,7 +21,6 @@
%if "%{flavor}" == "test"
%define test 1
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%if %{test}
Name: python-requests-%{flavor}
@ -33,7 +32,7 @@ Release: 0
Summary: Awesome Python HTTP Library That's Actually Usable
License: Apache-2.0
Group: Development/Languages/Python
Url: http://python-requests.org/
URL: http://python-requests.org/
Source: https://files.pythonhosted.org/packages/source/r/requests/requests-%{version}.tar.gz
BuildRequires: %{python_module certifi}
BuildRequires: %{python_module devel}
@ -45,8 +44,21 @@ BuildRequires: ca-certificates
BuildRequires: fdupes
BuildRequires: python
BuildRequires: python-rpm-macros
Requires: ca-certificates
Requires: python
Requires: python-certifi >= 2017.4.17
Requires: python-chardet >= 3.0.2
Requires: python-idna < 2.8
Requires: python-idna >= 2.5
Requires: python-py
Requires: python-urllib3 < 1.24
Requires: python-urllib3 >= 1.21.1
Recommends: ca-certificates-mozilla
Recommends: python-PySocks >= 1.5.6
Recommends: python-cryptography >= 1.3.4
Recommends: python-pyOpenSSL >= 0.14
BuildArch: noarch
%if %{test}
# SECTION test requirements
BuildRequires: %{python_module PySocks >= 1.5.6}
BuildRequires: %{python_module chardet >= 3.0.2}
BuildRequires: %{python_module idna < 2.8}
@ -55,23 +67,7 @@ BuildRequires: %{python_module pytest-httpbin}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
Requires: this-is-only-for-build-envs
# /SECTION
%endif
Requires: ca-certificates
Requires: python
Recommends: ca-certificates-mozilla
Recommends: python-pyOpenSSL >= 0.14
Recommends: python-cryptography >= 1.3.4
Recommends: python-PySocks >= 1.5.6
Requires: python-certifi >= 2017.4.17
Requires: python-chardet >= 3.0.2
Requires: python-idna < 2.8
Requires: python-idna >= 2.5
Requires: python-py
Requires: python-urllib3 < 1.24
Requires: python-urllib3 >= 1.21.1
BuildArch: noarch
%python_subpackages
%description
@ -110,6 +106,10 @@ sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py
# check that urllib3 is not installed
test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3
%python_expand %fdupes %{buildroot}%{$python_sitelib}/requests
%if %{test}
%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests
%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests-*
%endif
# NOTE(aplanas) If we do not have the certificates, we some of the
# tests will fail, so for now we only run the tests in openSUSE
@ -120,11 +120,15 @@ touch Pipfile
%python_exec -m pytest tests -k "not (TestTimeout and connect)"
%endif
%if %{test}
%files %{python_files}
%license LICENSE
%else
%files %{python_files}
%defattr(-,root,root)
%license LICENSE
%doc HISTORY.rst README.rst
%{python_sitelib}/requests/
%{python_sitelib}/requests-*
%endif
%changelog