diff --git a/python-requests.changes b/python-requests.changes index 723b216..df8d991 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Feb 25 15:45:08 UTC 2019 - Tomáš Chvátal + +- Skip one more test that is flaky + +------------------------------------------------------------------- +Fri Feb 15 11:41:05 UTC 2019 - Tomáš Chvátal + +- Do not depend on python-py +- Update few of the requirements + ------------------------------------------------------------------- Tue Feb 5 13:17:10 UTC 2019 - John Paul Adrian Glaubitz diff --git a/python-requests.spec b/python-requests.spec index bc54344..b6c43f4 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -18,16 +18,14 @@ %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" +%define psuffix -test %bcond_without test %else +%define psuffix %{nil} %bcond_with test %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%if %{with test} -Name: python-requests-%{flavor} -%else -Name: python-requests -%endif +Name: python-requests%{psuffix} Version: 2.21.0 Release: 0 Summary: Python HTTP Library @@ -36,7 +34,6 @@ Group: Development/Languages/Python 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 py} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module urllib3 >= 1.21.1} BuildRequires: ca-certificates @@ -47,10 +44,10 @@ 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.21.1 +BuildArch: noarch %if 0%{?_no_weakdeps} Requires: ca-certificates-mozilla Requires: python-PySocks >= 1.5.6 @@ -62,16 +59,14 @@ Recommends: python-PySocks >= 1.5.6 Recommends: python-cryptography >= 1.3.4 Recommends: python-pyOpenSSL >= 0.14 %endif -BuildArch: noarch %if %{with test} BuildRequires: %{python_module PySocks >= 1.5.6} BuildRequires: %{python_module chardet >= 3.0.2} -BuildRequires: %{python_module idna < 2.8} BuildRequires: %{python_module idna >= 2.5} -BuildRequires: %{python_module pytest-httpbin} +BuildRequires: %{python_module pytest-httpbin >= 0.0.7} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} -Requires: this-is-only-for-build-envs +BuildRequires: %{python_module requests >= %{version}} %endif %python_subpackages @@ -107,12 +102,11 @@ sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py %python_build %install +%if !%{with test} %python_install # check that urllib3 is not installed test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3 -%python_expand %fdupes %{buildroot}%{$python_sitelib}/ -%if %{with test} -%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests* +%python_expand %fdupes %{buildroot}%{$python_sitelib} %endif # NOTE(aplanas) If we do not have the certificates, we some of the @@ -121,13 +115,11 @@ test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3 %check touch Pipfile # exclude tests connecting to TARPIT -%python_exec -m pytest tests -k "not (TestTimeout and connect)" +# exclude test_https_warnings as is flaky +%python_exec -m pytest tests -k "not (TestTimeout or connect or test_https_warnings)" %endif -%if %{with test} -%files %{python_files} -%license LICENSE -%else +%if !%{with test} %files %{python_files} %license LICENSE %doc HISTORY.md README.md