commit 388a5c139436c4be3884e7a2867252864e2ffb94 Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:54:02 2019 +0800 Package init diff --git a/httplib2-0.13.1.tar.gz b/httplib2-0.13.1.tar.gz new file mode 100644 index 0000000..4d6f4de Binary files /dev/null and b/httplib2-0.13.1.tar.gz differ diff --git a/python-httplib2.certfile.patch b/python-httplib2.certfile.patch new file mode 100644 index 0000000..362fd69 --- /dev/null +++ b/python-httplib2.certfile.patch @@ -0,0 +1,41 @@ +diff -Nur httplib2-0.13.0.orig/python2/httplib2/certs.py httplib2-0.13.0/python2/httplib2/certs.py +--- httplib2-0.13.0.orig/python2/httplib2/certs.py 2019-06-06 12:46:32.000000000 -0700 ++++ httplib2-0.13.0/python2/httplib2/certs.py 2019-06-30 14:29:14.050085981 -0700 +@@ -23,6 +23,7 @@ + os.path.dirname(os.path.abspath(__file__)), "cacerts.txt" + ) + ++FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt" + + def where(): + env = os.environ.get("HTTPLIB2_CA_CERTS") +@@ -35,7 +36,7 @@ + return custom_ca_locater_where() + if certifi_available: + return certifi_where() +- return BUILTIN_CA_CERTS ++ return FEDORA_CA_CERTS + + + if __name__ == "__main__": +diff -Nur httplib2-0.13.0.orig/python3/httplib2/certs.py httplib2-0.13.0/python3/httplib2/certs.py +--- httplib2-0.13.0.orig/python3/httplib2/certs.py 2019-06-06 12:46:32.000000000 -0700 ++++ httplib2-0.13.0/python3/httplib2/certs.py 2019-06-30 14:29:38.778214191 -0700 +@@ -23,6 +23,8 @@ + os.path.dirname(os.path.abspath(__file__)), "cacerts.txt" + ) + ++FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt" ++ + + def where(): + env = os.environ.get("HTTPLIB2_CA_CERTS") +@@ -35,7 +37,7 @@ + return custom_ca_locater_where() + if certifi_available: + return certifi_where() +- return BUILTIN_CA_CERTS ++ return FEDORA_CA_CERTS + + + if __name__ == "__main__": diff --git a/python-httplib2.spec b/python-httplib2.spec new file mode 100644 index 0000000..8be9d4d --- /dev/null +++ b/python-httplib2.spec @@ -0,0 +1,75 @@ +Name: python-httplib2 +Version: 0.13.1 +Release: 1 +Summary: Small, fast HTTP client library for Python. +License: MIT +URL: https://github.com/httplib2/httplib2 +Source0: https://github.com/httplib2/httplib2/archive/httplib2-%{version}.tar.gz + +Patch1: python-httplib2.certfile.patch + +BuildRequires: python2-setuptools python2-devel + +%if 0%{?with_python3} +BuildRequires: python3-setuptools python3-devel +%endif + +BuildArch: noarch + +%description +httplib2 is a comprehensive HTTP client library, httplib2.py supports many +features left out of other HTTP libraries. + +%package -n python2-httplib2 +Summary: Small, fast HTTP client library for Python. +%{?python_provide:%python_provide python2-httplib2} + +%description -n python2-httplib2 +Small, fast HTTP client library for Python. + +%if 0%{?with_python3} +%package -n python3-httplib2 +Summary: Small, fast HTTP client library for Python. + +%description -n python3-httplib2 +Small, fast HTTP client library for Python. +%endif + +%prep +%autosetup -n httplib2-%{version} -p1 + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' +%endif + +%build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + +%install +%py2_install + +%if 0%{?with_python3} +%py3_install +%endif + +%files -n python2-httplib2 +%defattr(-,root,root) +%{python2_sitelib}/* + +%if 0%{?with_python3} +%files -n python3-httplib2 +%defattr(-,root,root) +%{python3_sitelib}/* +%endif + +%changelog +* Thu Nov 7 2019 openEuler Buildteam - 0.13.1-1 +- Package init