3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module websocket-client
8 Summary: WebSocket client for Python
13 Group: Development/Libraries
14 Source0: https://pypi.python.org/packages/source/w/websocket-client/websocket_client-%{version}.tar.gz
15 # Source0-md5: 386d62d389cdc811fb85ed571924f0ae
16 URL: https://pypi.python.org/pypi/websocket-client
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.710
21 BuildRequires: python-setuptools
23 BuildRequires: python-backports-ssl_match_hostname
24 BuildRequires: python-six
28 BuildRequires: python3
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-six
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 python-websocket-client module is WebSocket client for Python. This
40 provides the low level APIs for WebSocket. All APIs are the
41 synchronous functions.
43 python-websocket-client supports only hybi-13.
45 %package -n python3-websocket-client
46 Summary: WebSocket client for python
47 Group: Development/Libraries
50 %description -n python3-websocket-client
51 python-websocket-client module is WebSocket client for Python. This
52 provides the low level APIs for WebSocket. All APIs are the
53 synchronous functions.
55 python-websocket-client supports only hybi-13.
58 %setup -q -n websocket_client-%{version}
62 %py3_build %{?with_tests:test}
66 %py_build %{?with_tests:test}
70 rm -rf $RPM_BUILD_ROOT
74 mv $RPM_BUILD_ROOT%{_bindir}/{wsdump.py,wsdump-%{py3_ver}}
76 # remove tests that got installed into the buildroot
77 rm -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/websocket/tests
84 mv $RPM_BUILD_ROOT%{_bindir}/{wsdump.py,wsdump-%{py_ver}}
86 # remove tests that got installed into the buildroot
87 rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/websocket/tests
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc README.rst LICENSE
97 %attr(755,root,root) %{_bindir}/wsdump-%{py_ver}
98 %dir %{py_sitescriptdir}/websocket
99 %{py_sitescriptdir}/websocket/*.py[co]
100 %{py_sitescriptdir}/websocket_client-%{version}-py*.egg-info
104 %files -n python3-websocket-client
105 %defattr(644,root,root,755)
106 %doc README.rst LICENSE
107 %attr(755,root,root) %{_bindir}/wsdump-%{py3_ver}
108 %dir %{py3_sitescriptdir}/websocket
109 %{py3_sitescriptdir}/websocket/*.py
110 %{py3_sitescriptdir}/websocket/__pycache__
111 %{py3_sitescriptdir}/websocket_client-%{version}-py*.egg-info