diff --git a/.gitignore b/.gitignore index caf8c1f..e01222a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/websocket_client-0.32.0.tar.gz +SOURCES/websocket-client-3c25814.tar.gz diff --git a/.python-websocket-client.metadata b/.python-websocket-client.metadata index fc533a1..d49d041 100644 --- a/.python-websocket-client.metadata +++ b/.python-websocket-client.metadata @@ -1 +1 @@ -9df03f0e64167be9fabe113c99297a4a8774f4fb SOURCES/websocket_client-0.32.0.tar.gz +b5f812015910950f49380712a8872cc8b2165fdd SOURCES/websocket-client-3c25814.tar.gz diff --git a/SOURCES/0001-urlparse-import-conditionals-for-rhel7.patch b/SOURCES/0001-urlparse-import-conditionals-for-rhel7.patch new file mode 100644 index 0000000..82c326f --- /dev/null +++ b/SOURCES/0001-urlparse-import-conditionals-for-rhel7.patch @@ -0,0 +1,29 @@ +From f09faa353bc916c043e5fdc291feb9d2e2682640 Mon Sep 17 00:00:00 2001 +From: Lokesh Mandvekar +Date: Wed, 1 May 2019 18:26:30 +0000 +Subject: [PATCH] urlparse import conditionals for rhel7 + +Signed-off-by: Lokesh Mandvekar +--- + websocket/_url.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/websocket/_url.py b/websocket/_url.py +index f7bdf34..dcc9644 100644 +--- a/websocket/_url.py ++++ b/websocket/_url.py +@@ -24,7 +24,10 @@ import os + import socket + import struct + +-from six.moves.urllib.parse import urlparse ++try: ++ from six.moves.urllib.parse import urlparse ++except: ++ import urlparse + + + __all__ = ["parse_url", "get_proxy_info"] +-- +1.8.3.1 + diff --git a/SOURCES/urlparse.patch b/SOURCES/urlparse.patch deleted file mode 100644 index c91503f..0000000 --- a/SOURCES/urlparse.patch +++ /dev/null @@ -1,30 +0,0 @@ -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 index e286620..052de6a 100644 --- a/SPECS/python-websocket-client.spec +++ b/SPECS/python-websocket-client.spec @@ -12,19 +12,24 @@ %global distname websocket-client %global eggname websocket_client +%global commit 3c25814664fef5b78716ed8841123ed1c0d17824 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + Name: python-websocket-client -Version: 0.32.0 -Release: 116%{?dist} +Version: 0.56.0 +Release: 1.git%{shortcommit}%{?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 +#Source0: http://pypi.python.org/packages/source/w/%%{distname}/%%{eggname}-%%{version}.tar.gz +Source0: https://github.com/%{distname}/%{distname}/archive/%{commit}/%{distname}-%{shortcommit}.tar.gz +Patch0: 0001-urlparse-import-conditionals-for-rhel7.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-six +BuildRequires: git %if 0%{?with_python3} BuildRequires: python3-devel @@ -64,8 +69,7 @@ python-websocket-client supports only hybi-13. %endif %prep -%setup -q -n %{eggname}-%{version} -%patch0 -p1 +%autosetup -Sgit -n %{distname}-%{commit} # Remove bundled egg-info in case it exists rm -rf %{distname}.egg-info @@ -110,7 +114,7 @@ mv %{buildroot}/%{_bindir}/wsdump.py \ %{buildroot}/%{_bindir}/wsdump # unbundle cacert -rm %{buildroot}/%{python2_sitelib}/%{modname}/cacert.pem +#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 @@ -145,6 +149,9 @@ popd %endif %changelog +* Mon May 13 2019 Lokesh Mandvekar - 0.56.0-1.git3c25814 +- Resolves: #1702715 + * Mon Aug 31 2015 Lokesh Mandvekar - 0.32.0-116 - Update to 0.32.0