Summary: A high performance, concurrent HTTP client library
Summary(pl.UTF-8): Biblioteka bardzo wydajnego, wielowątkowego klienta HTTP
Name: python-%{module}
-Version: 1.3.1
+# keep 1.x here for python2 support
+Version: 1.5.5
Release: 1
License: MIT
Group: Libraries/Python
-#Source0Download: https://pypi.python.org/simple/geventhttpclient
+#Source0Download: https://pypi.org/simple/geventhttpclient/
Source0: https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
-# Source0-md5: 9aaac96fa4856ac919869a261c8b3dcb
-URL: https://pypi.python.org/pypi/geventhttpclient
+# Source0-md5: 921c99dae79636616b4826423a870c9a
+URL: https://pypi.org/project/geventhttpclient/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
BuildRequires: python-modules >= 1:2.7.9
BuildRequires: python-setuptools
%if %{with tests}
+BuildRequires: python-brotli
BuildRequires: python-certifi
+BuildRequires: python-dpkt
BuildRequires: python-gevent >= 0.13
BuildRequires: python-pytest
BuildRequires: python-six
BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
%if %{with tests}
+BuildRequires: python3-brotli
BuildRequires: python3-certifi
+BuildRequires: python3-dpkt
BuildRequires: python3-gevent >= 0.13
BuildRequires: python3-pytest
BuildRequires: python3-six
%prep
%setup -q -n %{module}-%{version}
-%{__rm} -r src/geventhttpclient/tests/__pycache__ \
- src/geventhttpclient.egg-info
+%{__rm} -r src/geventhttpclient.egg-info
%build
%if %{with python2}
%py_build
-%{?with_tests:PYTHONPATH=$(pwd)/$(echo build-2/lib.*) %{__python} -m pytest src}
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/$(echo build-2/lib.*) \
+%{__python} -m pytest src
+%endif
%endif
%if %{with python3}
%py3_build
-%{?with_tests:PYTHONPATH=$(pwd)/$(echo build-3/lib.*) %{__python3} -m pytest src}
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \
+%{__python3} -m pytest src
+%endif
%endif
%install
%py_install
%py_postclean
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/geventhttpclient/tests
%endif
%if %{with python3}
%py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/geventhttpclient/tests
%endif
%clean
%if %{with python2}
%files
%defattr(644,root,root,755)
+%doc LICENSE.txt README.mdown
%dir %{py_sitedir}/geventhttpclient
%{py_sitedir}/geventhttpclient/*.py[co]
%attr(755,root,root) %{py_sitedir}/geventhttpclient/_parser.so
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
+%doc LICENSE.txt README.mdown
%dir %{py3_sitedir}/geventhttpclient
%{py3_sitedir}/geventhttpclient/*.py
%{py3_sitedir}/geventhttpclient/__pycache__