diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..caf8c1f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/websocket_client-0.32.0.tar.gz diff --git a/.python-websocket-client.metadata b/.python-websocket-client.metadata new file mode 100644 index 0000000..fc533a1 --- /dev/null +++ b/.python-websocket-client.metadata @@ -0,0 +1 @@ +9df03f0e64167be9fabe113c99297a4a8774f4fb SOURCES/websocket_client-0.32.0.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/urlparse.patch b/SOURCES/urlparse.patch new file mode 100644 index 0000000..c91503f --- /dev/null +++ b/SOURCES/urlparse.patch @@ -0,0 +1,30 @@ +From 33ea4eb39f2b4c12f8ec88b71f9cad968f02eeef Mon Sep 17 00:00:00 2001 +From: Lokesh Mandvekar +Date: Mon, 10 Aug 2015 13:54:04 -0400 +Subject: [PATCH] import urlparse if six.moves.urllib.parse unavailable + +Signed-off-by: Lokesh Mandvekar +--- + websocket/_url.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/websocket/_url.py b/websocket/_url.py +index 703b715..8667521 100644 +--- a/websocket/_url.py ++++ b/websocket/_url.py +@@ -20,7 +20,11 @@ Copyright (C) 2010 Hiroki Ohtani(liris) + + """ + +-from six.moves.urllib.parse import urlparse ++try: ++ from six.moves.urllib.parse import urlparse ++except: ++ import urlparse ++ + import os + + __all__ = ["parse_url", "get_proxy_info"] +-- +1.8.3.1 + diff --git a/SPECS/python-websocket-client.spec b/SPECS/python-websocket-client.spec new file mode 100644 index 0000000..e286620 --- /dev/null +++ b/SPECS/python-websocket-client.spec @@ -0,0 +1,180 @@ +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global modname websocket +%global distname websocket-client +%global eggname websocket_client + +Name: python-websocket-client +Version: 0.32.0 +Release: 116%{?dist} +Summary: WebSocket client for python +Group: Development/Libraries +License: LGPLv2 +URL: http://pypi.python.org/pypi/websocket-client +Source0: http://pypi.python.org/packages/source/w/%{distname}/%{eggname}-%{version}.tar.gz +Patch0: urlparse.patch +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-six + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-six +%endif + +%if 0%{?rhel} && 0%{?rhel} <= 6 +BuildRequires: python-unittest2 +BuildRequires: python-argparse +Requires: python-argparse +BuildRequires: python-backports-ssl_match_hostname +Requires: python-backports-ssl_match_hostname +%endif + +Requires: python-six + +%description +python-websocket-client module is WebSocket client for python. This +provides the low level APIs for WebSocket. All APIs are the synchronous +functions. + +python-websocket-client supports only hybi-13. + +%if 0%{?with_python3} +%package -n python3-websocket-client +Summary: WebSocket client for python +Group: Development/Libraries +Requires: python3-six + +%description -n python3-websocket-client +python-websocket-client module is WebSocket client for python. This +provides the low level APIs for WebSocket. All APIs are the synchronous +functions. + +python-websocket-client supports only hybi-13. +%endif + +%prep +%setup -q -n %{eggname}-%{version} +%patch0 -p1 + +# Remove bundled egg-info in case it exists +rm -rf %{distname}.egg-info + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + +%build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + +%{__python2} setup.py build + +%install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} +mv %{buildroot}/%{_bindir}/wsdump.py \ + %{buildroot}/%{_bindir}/python3-wsdump + +# unbundle cacert +rm %{buildroot}/%{python3_sitelib}/%{modname}/cacert.pem +# And link in the mozilla ca +ln -s /etc/pki/tls/cert.pem \ + %{buildroot}/%{python3_sitelib}/%{modname}/cacert.pem + +# remove tests that got installed into the buildroot +rm -rf %{buildroot}/%{python3_sitelib}/tests/ + +# Remove executable bit from installed files. +find %{buildroot}/%{python3_sitelib} -type f -exec chmod -x {} \; +popd +%endif + +%{__python} setup.py install -O1 --skip-build --root=%{buildroot} +mv %{buildroot}/%{_bindir}/wsdump.py \ + %{buildroot}/%{_bindir}/wsdump + +# unbundle cacert +rm %{buildroot}/%{python2_sitelib}/%{modname}/cacert.pem +# And link in the mozilla ca +ln -s /etc/pki/tls/cert.pem \ + %{buildroot}/%{python2_sitelib}/%{modname}/cacert.pem + +# remove tests that got installed into the buildroot +rm -rf %{buildroot}/%{python2_sitelib}/tests/ + +# Remove executable bit from installed files. +find %{buildroot}/%{python2_sitelib} -type f -exec chmod -x {} \; + +%check +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif + +#%%{__python2} setup.py test + +%files +%doc README.rst LICENSE +%{python2_sitelib}/%{modname}/ +%{python2_sitelib}/%{eggname}*%{version}* +%{_bindir}/wsdump + +%if 0%{?with_python3} +%files -n python3-websocket-client +%doc README.rst LICENSE +%{python3_sitelib}/%{modname}/ +%{python3_sitelib}/%{eggname}*%{version}* +%{_bindir}/python3-wsdump +%endif + +%changelog +* Mon Aug 31 2015 Lokesh Mandvekar - 0.32.0-116 +- Update to 0.32.0 + +* Tue Jun 16 2015 Lokesh Mandvekar - 0.14.1-98 +- Rebuild fedora rawhide specfile for extras-rhel-7.1 +- Release number abruptly bumped to obsolete subpackage generated from docker + +* Sun Jun 08 2014 Fedora Release Engineering - 0.14.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 28 2014 Kalev Lember - 0.14.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Thu May 22 2014 Ralph Bean - 0.14.1-1 +- Latest upstream with python3 support. + +* Sun Aug 04 2013 Fedora Release Engineering - 0.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Apr 10 2013 Ralph Bean - 0.10.0-1 +- Latest upstream release. +- Removed executable bit from installed lib files for rpmlint. + +* Wed Feb 27 2013 Ralph Bean - 0.9.0-2 +- Replaced websocket_client with %%{eggname} as per review by Palle Ravn + https://bugzilla.redhat.com/show_bug.cgi?id=909644#c4 +- Removed a few unnecessary newlines. + +* Wed Feb 27 2013 Ralph Bean - 0.9.0-1 +- Latest upstream. + +* Sat Feb 09 2013 Ralph Bean - 0.8.0-1 +- Initial package for Fedora