Package init
This commit is contained in:
commit
388a5c1394
BIN
httplib2-0.13.1.tar.gz
Normal file
BIN
httplib2-0.13.1.tar.gz
Normal file
Binary file not shown.
41
python-httplib2.certfile.patch
Normal file
41
python-httplib2.certfile.patch
Normal file
@ -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__":
|
||||
75
python-httplib2.spec
Normal file
75
python-httplib2.spec
Normal file
@ -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 <buildteam@openeuler.org> - 0.13.1-1
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user