X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=python-urllib3.spec;h=2b7d2c6e6ebc89472d58ce931b811dc1173bbdcf;hb=1cbae8fc66d2310fa3076fb02670525bf02c8ae6;hp=59684452167ebbe047a9531383f2973eb1db7c89;hpb=2a47d2809de856cf726719ce6932c79777ba04c4;p=packages%2Fpython-urllib3.git diff --git a/python-urllib3.spec b/python-urllib3.spec index 5968445..2b7d2c6 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -3,19 +3,19 @@ # Conditional build: %bcond_without python2 # CPython 2.x module %bcond_without python3 # CPython 3.x module +%bcond_without doc # Sphinx documentation %bcond_with tests # test target (uses network etc.) %define module urllib3 -%define pypi_name urllib3 Summary: HTTP library with thread-safe connection pooling, file post, and more Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd. Name: python-%{module} -Version: 1.22 -Release: 3 +Version: 1.23 +Release: 1 License: MIT Group: Development/Languages/Python -Source0: https://files.pythonhosted.org/packages/source/u/%{pypi_name}/%{pypi_name}-%{version}.tar.gz -# Source0-md5: 0da7bed3fe94bf7dc59ae37885cc72f7 +Source0: https://files.pythonhosted.org/packages/source/u/urllib3/%{module}-%{version}.tar.gz +# Source0-md5: 1ad43e4b5ab7a0794c89dc057e1d7179 URL: http://urllib3.readthedocs.org/ %if %{with python2} BuildRequires: python-modules >= 1:2.7 @@ -30,7 +30,7 @@ BuildRequires: uname(release) >= 3.9 %endif %endif %if %{with python3} -BuildRequires: python3-modules >= 1:3.2 +BuildRequires: python3-modules >= 1:3.4 %if %{with tests} BuildRequires: python3-PySocks >= 1.5.6 BuildRequires: python3-PySocks < 2.0 @@ -42,6 +42,9 @@ BuildRequires: uname(release) >= 3.9 %endif BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 +%if %{with doc} +BuildRequires: sphinx-pdg +%endif Requires: python-modules >= 1:2.7 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -70,7 +73,7 @@ plików metodą POST. Możliwości: Summary: HTTP library with thread-safe connection pooling, file post, and more Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd. Group: Development/Languages/Python -Requires: python3-modules >= 1:3.2 +Requires: python3-modules >= 1:3.4 %description -n python3-urllib3 Python 3 HTTP module with connection pooling and file POST abilities. @@ -92,6 +95,17 @@ plików metodą POST. Możliwości: - obsługa kodowań gzip i deflate - bezpieczeństwo względem wątków. +%package apidocs +Summary: API documentation for Python urllib3 module +Summary(pl.UTF-8): Dokumentacja API modułu Pythona urllib3 +Group: Documentation + +%description apidocs +API documentation for Python urllib3 module. + +%description apidocs -l pl.UTF-8 +Dokumentacja API modułu Pythona urllib3. + %prep %setup -q -n %{module}-%{version} @@ -104,6 +118,10 @@ plików metodą POST. Możliwości: %py3_build %{?with_tests:test} %endif +%if %{with doc} +%{__make} -C docs html +%endif + %install rm -rf $RPM_BUILD_ROOT @@ -134,3 +152,9 @@ rm -rf $RPM_BUILD_ROOT %{py3_sitescriptdir}/%{module} %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info %endif + +%if %{with doc} +%files apidocs +%defattr(644,root,root,755) +%doc docs/_build/html/{_static,reference,*.html,*.js} +%endif