commit c024dd7aaf5a0f098e8b722ef5dcf521395a1e13be72d3f057eea42f23d2fa76 Author: Sascha Peilicke Date: Tue Jul 1 08:59:01 2014 +0000 Accepting request 238443 from home:rjschwei - needed by newer version of google-cloud-sdk, generally useful OBS-URL: https://build.opensuse.org/request/show/238443 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websocket-client?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/python-websocket-client.changes b/python-websocket-client.changes new file mode 100644 index 0000000..a2d07c8 --- /dev/null +++ b/python-websocket-client.changes @@ -0,0 +1,31 @@ +------------------------------------------------------------------- +Mon Jun 23 22:01:20 UTC 2014 - rschweikert@suse.com + +- Simplify conditionals in spec file +- Fix patch webSoc_useSystemCert.patch, eliminate tab use spaces + +------------------------------------------------------------------- +Mon Jun 16 21:21:11 UTC 2014 - rschweikert@suse.com + +- Clean up spec file + +------------------------------------------------------------------- +Sat Jun 7 10:21:38 UTC 2014 - rschweikert@suse.com + +- Add Group to sub package, fixes build for SLE 11 + +------------------------------------------------------------------- +Fri Jun 6 11:58:30 UTC 2014 - rschweikert@suse.com + +- Include in SLE 12 (FATE #316168) + +------------------------------------------------------------------- +Thu Jun 5 16:07:15 UTC 2014 - rschweikert@suse.com + +- Fix upstream URL, point to github (development) rather than pypy + +------------------------------------------------------------------- +Thu Jun 5 15:34:01 UTC 2014 - rschweikert@suse.com + +- Initial build + diff --git a/python-websocket-client.spec b/python-websocket-client.spec new file mode 100644 index 0000000..bc490c5 --- /dev/null +++ b/python-websocket-client.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-websocket-client +# +# Copyright (c) 2014 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/ +# + + +%define upstream_name websocket-client +Name: python-websocket-client +Version: 0.15.0 +Release: 0 +Summary: WebSocket client implementation +License: LGPL-2.1 +Group: Development/Languages/Python +Url: https://github.com/liris/websocket-client/releases +Source0: %{upstream_name}-%{version}.tar.gz +Patch0: webSoc_useSystemCert.patch +BuildRequires: python-setuptools +BuildRequires: python-six +Requires: python +Requires: python-six +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +BuildRequires: python-argparse +BuildRequires: python-unittest2 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +%description +websocket-client module is WebSocket client for python. This provide the +low level APIs for WebSocket. All APIs are the synchronous functions. + +websocket-client supports only hybi-13. + +%package test +Summary: Unit tests +Group: Development/Languages/Python +Requires: python-websocket-client = %{version} + +%description test +Unit tests for websocket-client + +%prep +%setup -q -n %{upstream_name}-%{version} +%patch0 + +%build +python setup.py build + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} +# Use the system certs +rm %{buildroot}/%{python_sitelib}/websocket/cacert.pem + +%check +python tests/test_websocket.py + +%files +%defattr(-,root,root,-) +%doc LICENSE README.rst +%dir %{python_sitelib}/websocket +%dir %{python_sitelib}/websocket_client-%{version}-py%{py_ver}.egg-info +%{_bindir}/wsdump.py +%{python_sitelib}/websocket/* +%{python_sitelib}/*egg-info/* + +%files test +%defattr(-,root,root,-) +%dir %{python_sitelib}/tests +%{python_sitelib}/tests/* + +%changelog diff --git a/webSoc_useSystemCert.patch b/webSoc_useSystemCert.patch new file mode 100644 index 0000000..9e0c952 --- /dev/null +++ b/webSoc_useSystemCert.patch @@ -0,0 +1,15 @@ +--- websocket/__init__.py.orig ++++ websocket/__init__.py +@@ -517,8 +517,10 @@ class WebSocket(object): + + if is_secure: + if HAVE_SSL: +- sslopt = dict(cert_reqs=ssl.CERT_REQUIRED, +- ca_certs=os.path.join(os.path.dirname(__file__), "cacert.pem")) ++ sslopt = dict(cert_reqs=ssl.CERT_REQUIRED) ++ certPath = os.path.join(os.path.dirname(__file__), "cacert.pem") ++ if os.path.isfile(certPath): ++ sslopt['ca_certs'] = certPath + sslopt.update(self.sslopt) + self.sock = ssl.wrap_socket(self.sock, **sslopt) + match_hostname(self.sock.getpeercert(), hostname) diff --git a/websocket-client-0.15.0.tar.gz b/websocket-client-0.15.0.tar.gz new file mode 100644 index 0000000..3fedda8 --- /dev/null +++ b/websocket-client-0.15.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17c01763866bbd355a2c6919e86f51b8dad9e0875596abd890ffde1e5dfdb5c6 +size 189783