diff --git a/python-requests-test.changes b/python-requests-test.changes index 8e819eb..18c5381 100644 --- a/python-requests-test.changes +++ b/python-requests-test.changes @@ -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 diff --git a/python-requests.changes b/python-requests.changes index 8e819eb..18c5381 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -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 diff --git a/python-requests.spec b/python-requests.spec index 1dd56aa..fb72bec 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -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