[packages/python3-httplib2] Up to 0.31.0
arekm
arekm at pld-linux.org
Wed Sep 17 15:53:30 CEST 2025
commit 11f234ccdb588a010da42e393340ba20b7f818ff
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Sep 17 15:53:16 2025 +0200
Up to 0.31.0
python-httplib2-0.9-proxy-http.patch | 14 ----
python-httplib2.certfile.patch | 17 +----
python-httplib2.spec => python3-httplib2.spec | 97 ++-------------------------
3 files changed, 7 insertions(+), 121 deletions(-)
---
diff --git a/python-httplib2.spec b/python3-httplib2.spec
similarity index 52%
rename from python-httplib2.spec
rename to python3-httplib2.spec
index 5e0fe00..841c9e3 100644
--- a/python-httplib2.spec
+++ b/python3-httplib2.spec
@@ -1,41 +1,20 @@
#
# Conditional build:
-%bcond_without python2 # Python 2.x module
-%bcond_without python3 # Python 3.x module
%bcond_without doc # Sphinx documentation
%bcond_without tests # unit tests
Summary: A comprehensive HTTP client library
Summary(pl.UTF-8): Obszerna biblioteka klienta HTTP
-Name: python-httplib2
-Version: 0.22.0
-Release: 3
+Name: python3-httplib2
+Version: 0.31.0
+Release: 1
License: MIT
Group: Development/Languages/Python
#Source0Download: https://github.com/httplib2/httplib2/releases
Source0: https://github.com/httplib2/httplib2/archive/v%{version}/httplib2-%{version}.tar.gz
-# Source0-md5: e1ea1cd44c908a78112b6007af0f5917
-Patch0: %{name}.certfile.patch
-Patch1: %{name}-0.9-proxy-http.patch
+# Source0-md5: 360cdbcdc8bbec3ce24c7bfff0d81e63
+Patch0: python-httplib2.certfile.patch
URL: https://github.com/httplib2/httplib2
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-future >= 0.16.0
-BuildRequires: python-mock >= 2.0.0
-BuildRequires: python-pyparsing >= 2.4.2
-BuildRequires: python-pyparsing < 3
-BuildRequires: python-pytest >= 4.6.11
-BuildRequires: python-pytest-cov >= 2.5.1
-BuildRequires: python-pytest-forked >= 1.3.0
-# >= 2.12.1
-BuildRequires: python-pytest-randomly >= 1.2.3
-BuildRequires: python-pytest-timeout >= 1.4.2
-BuildRequires: python-six >= 1.10.0
-%endif
-%endif
-%if %{with python3}
BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
%if %{with tests}
@@ -49,7 +28,6 @@ BuildRequires: python3-pytest-randomly >= 1.2.3
BuildRequires: python3-pytest-timeout >= 1.4.2
BuildRequires: python3-six >= 1.10.0
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.710
%if %{with doc}
@@ -85,56 +63,11 @@ cech pomijanych przez inne biblioteki. Obsługuje:
- Lost update
- podlega testom jednostkowym.
-%package -n python3-httplib2
-Summary: A comprehensive HTTP client library
-Summary(pl.UTF-8): Obszerna biblioteka klienta HTTP
-Group: Development/Languages/Python
-Requires: ca-certificates
-
-%description -n python3-httplib2
-A comprehensive HTTP client library, httplib2.py supports many
-features left out of other HTTP libraries. Supports:
-- HTTP and HTTPS
-- Keep-Alive
-- Authentication
-- Caching
-- All Methods
-- Redirects
-- Compression
-- Lost update support
-- Unit Tested
-
-%description -n python3-httplib2 -l pl.UTF-8
-httplib2.py to obszerna biblioteka klienta HTTP, obsługująca wiele
-cech pomijanych przez inne biblioteki. Obsługuje:
-- HTTP i HTTPS
-- Keep-Alive
-- uwierzytelnianie
-- buforowanie
-- wszystkie metody
-- przekierowania
-- kompresję
-- Lost update
-- podlega testom jednostkowym.
-
%prep
%setup -q -n httplib2-%{version}
%patch -P 0 -p1
-%patch -P 1 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS=pytest_cov.plugin,pytest_timeout \
-PYTHONPATH=$(pwd)/build-2/lib \
-%{__python} -m pytest tests -k 'not test_certs_file_from_builtin and not test_certs_file_from_environment and not test_ipv6 and not test_with_certifi_removed_from_modules and not test_noproxy_star'
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
@@ -144,7 +77,6 @@ PYTEST_PLUGINS=pytest_cov.plugin,pytest_timeout \
PYTHONPATH=$(pwd)/build-3/lib \
%{__python3} -m pytest tests -k 'not test_certs_file_from_builtin and not test_certs_file_from_environment and not test_ipv6 and not test_with_certifi_removed_from_modules and not test_noproxy_star and not test_server_not_found_error_is_raised_for_invalid_hostname and not test_socks5_auth'
%endif
-%endif
%if %{with doc}
%{__make} -C doc html
@@ -153,34 +85,15 @@ PYTHONPATH=$(pwd)/build-3/lib \
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/httplib2/cacerts.txt
-%endif
-
-%if %{with python3}
%py3_install
%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/httplib2/cacerts.txt
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGELOG LICENSE README.md
-%{py_sitescriptdir}/httplib2
-%{py_sitescriptdir}/httplib2-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-httplib2
-%defattr(644,root,root,755)
-%doc CHANGELOG LICENSE README.md python3/README
%{py3_sitescriptdir}/httplib2
%{py3_sitescriptdir}/httplib2-%{version}-py*.egg-info
-%endif
diff --git a/python-httplib2-0.9-proxy-http.patch b/python-httplib2-0.9-proxy-http.patch
deleted file mode 100644
index 7f050e6..0000000
--- a/python-httplib2-0.9-proxy-http.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- httplib2-0.20.4/python2/httplib2/__init__.py.orig 2022-04-28 06:26:39.115490769 +0200
-+++ httplib2-0.20.4/python2/httplib2/__init__.py 2022-04-28 06:29:49.124461403 +0200
-@@ -962,7 +962,10 @@ def proxy_info_from_url(url, method="htt
- """
- url = urlparse.urlparse(url)
-
-- proxy_type = 3 # socks.PROXY_TYPE_HTTP
-+ if method == 'http':
-+ proxy_type = 4 # socks.PROXY_TYPE_HTTP_NO_TUNNEL
-+ else:
-+ proxy_type = 3 # socks.PROXY_TYPE_HTTP
- pi = ProxyInfo(
- proxy_type=proxy_type,
- proxy_host=url.hostname,
diff --git a/python-httplib2.certfile.patch b/python-httplib2.certfile.patch
index 5579af3..2f0b189 100644
--- a/python-httplib2.certfile.patch
+++ b/python-httplib2.certfile.patch
@@ -1,18 +1,5 @@
---- httplib2-0.12.0/python2/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 +0100
-+++ httplib2-0.12.0/python2/httplib2/certs.py 2018-11-16 06:34:12.392370656 +0100
-@@ -19,9 +19,7 @@ except ImportError:
- pass
-
-
--BUILTIN_CA_CERTS = os.path.join(
-- os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
--)
-+BUILTIN_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
-
-
- def where():
---- httplib2-0.12.0/python3/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 +0100
-+++ httplib2-0.12.0/python3/httplib2/certs.py 2018-11-16 06:34:27.006133962 +0100
+--- httplib2-0.12.0/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 +0100
++++ httplib2-0.12.0/httplib2/certs.py 2018-11-16 06:34:27.006133962 +0100
@@ -19,9 +19,7 @@ except ImportError:
pass
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-httplib2.git/commitdiff/11f234ccdb588a010da42e393340ba20b7f818ff
More information about the pld-cvs-commit
mailing list