- Add missing dependency on brotlipy

- Fix the tests to pass again

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=60
This commit is contained in:
Tomáš Chvátal 2019-04-23 10:39:55 +00:00 committed by Git OBS Bridge
parent 3c7026ea2d
commit 895bd350a6
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 23 10:27:36 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add missing dependency on brotlipy
- Fix the tests to pass again
-------------------------------------------------------------------
Tue Apr 23 04:04:50 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>

View File

@ -49,9 +49,12 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module brotlipy}
BuildRequires: %{python_module idna}
BuildRequires: %{python_module mock >= 1.3.0}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module tornado >= 4.2.1}
BuildRequires: %{python_module urllib3 >= %{version}}
%endif
#!BuildIgnore: python-requests
BuildArch: noarch
@ -61,6 +64,7 @@ Recommends: python-cryptography
Recommends: python-idna
Recommends: python-ndg-httpsclient
Recommends: python-pyOpenSSL
Recommends: python-brotlipy
%endif
# for SSL module on older distros
BuildRequires: %{oldpython}
@ -91,17 +95,20 @@ Highlights
%patch2 -p1
%patch4 -p1
find . -type f -exec chmod a-x '{}' \;
find . -name __pycache__ -type d -exec rm -fr {} +
%build
%python_build
%install
%if !%{with test}
%python_install
%{python_expand \
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/
%fdupes %{buildroot}%{$python_sitelib}
}
%endif
%check
%if %{with test}
@ -113,20 +120,19 @@ esac
rm -rf build
# pretend to be TRAVIS (this triggers timing tolerance)
export TRAVIS=1
%{python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" py.test-%$python_bin_suffix \
export PYTHONDONTWRITEBYTECODE=1
%{python_expand PYTHONPATH="%{$python_sitelib}" py.test-%{$python_bin_suffix} -v \
--ignore=test/appengine \
--ignore=test/with_dummyserver/test_proxy_poolmanager.py \
--ignore=test/with_dummyserver/test_poolmanager.py \
-k "${skiplist}" \
src/urllib3 test}
rm -rf %{buildroot}%{_libexecdir}/python*
%endif
%if ! %{with test}
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.rst CONTRIBUTORS.txt README.rst
%if ! %{with test}
%{python_sitelib}/urllib3
%{python_sitelib}/urllib3-%{version}-py*.egg-info
%endif