commit b1b4b20570543853f65de21b4d1f75155246d7c2971142c6df8489a94d0957c7 Author: Michal Čihař Date: Wed Apr 22 13:55:12 2015 +0000 Accepting request 298596 from home:Nijel:branches:devel:languages:python Initial packaging, needed for python-tornado OBS-URL: https://build.opensuse.org/request/show/298596 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-certifi?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/certifi-14.05.14.tar.gz b/certifi-14.05.14.tar.gz new file mode 100644 index 0000000..998e407 --- /dev/null +++ b/certifi-14.05.14.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e1bcbacd6357c151ae37cf0290dcc809721d32ce21fd6b7339568f3ddef1b69 +size 168608 diff --git a/python-certifi-shipped-requests-cabundle.patch b/python-certifi-shipped-requests-cabundle.patch new file mode 100644 index 0000000..2793c33 --- /dev/null +++ b/python-certifi-shipped-requests-cabundle.patch @@ -0,0 +1,11 @@ +--- a/certifi/core.py.orig 2014-05-16 16:50:08.000000000 +0200 ++++ b/certifi/core.py 2014-12-22 12:28:19.529632069 +0100 +@@ -13,7 +13,7 @@ + def where(): + f = os.path.split(__file__)[0] + +- return os.path.join(f, 'cacert.pem') ++ return "/etc/ssl/ca-bundle.pem" + + if __name__ == '__main__': + print(where()) diff --git a/python-certifi.changes b/python-certifi.changes new file mode 100644 index 0000000..0ab6d0c --- /dev/null +++ b/python-certifi.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed Apr 22 13:31:54 UTC 2015 - mcihar@suse.cz + +- Initial packaging + diff --git a/python-certifi.spec b/python-certifi.spec new file mode 100644 index 0000000..85bc927 --- /dev/null +++ b/python-certifi.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-certifi +# +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +Name: python-certifi +Version: 14.05.14 +Release: 0 +License: ISC +Summary: Python package for providing Mozilla's CA Bundle +Url: http://python-requests.org +Group: Development/Languages/Python +Source: https://pypi.python.org/packages/source/c/certifi/certifi-%{version}.tar.gz +# PATCH-FIX-SUSE -- prefer SUSE certificates +Patch0: python-certifi-shipped-requests-cabundle.patch +BuildRequires: python-devel +BuildRequires: python-setuptools +%if 0%{?suse_version} +Requires: ca-certificates +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +%description +This installable Python package contains a CA Bundle that you can reference +in your Python code. This is useful for verifying HTTP requests, for example. + +This is the same CA Bundle which ships with the Requests codebase, and is +derived from Mozilla Firefox's canonical set. + +%prep +%setup -q -n certifi-%{version} +%if 0%{?suse_version} +%patch0 -p1 +%endif + +%build +python setup.py build + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%if 0%{?suse_version} +rm %{buildroot}/%{python_sitelib}/certifi/cacert.pem +%endif + +%files +%defattr(-,root,root,-) +%doc README.rst LICENSE +%{python_sitelib}/* + +%changelog