%global srcname socketIO-client %global deps_py3 python3-requests python3-six python3-websocket-client %global deps_tests_py3 python3-nose python3-coverage %global deps_py2 python2-requests python2-six python-websocket-client %global deps_tests_py2 python2-nose python2-coverage Name: python-%{srcname} Version: 0.6.5 Release: 2%{?dist} Summary: A socket.io client library for Python License: MIT URL: https://github.com/invisibleroads/%{srcname} Source0: https://github.com/invisibleroads/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz BuildArch: noarch %description The socketIO-client is a Python client library for socket.io. %package -n python3-%{srcname} Summary: A socket.io client library for Python BuildRequires: python3-devel BuildRequires: %deps_py3 %deps_tests_py3 Requires: %deps_py3 %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} The socketIO-client is a Python client library for socket.io. This package contains the library for Python 3. %package -n python2-%{srcname} Summary: A socket.io client library for Python BuildRequires: python2-devel BuildRequires: %deps_py2 %deps_tests_py2 Requires: %deps_py2 %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} The socketIO-client is a Python client library for socket.io. This package contains the library for Python 2. %prep %setup -q -n %{srcname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install # remove tests for sitelib in %{python2_sitelib} %{python3_sitelib}; do rm -frv %{buildroot}${sitelib}/socketIO_client/tests sed -i '/^socketIO_client\/tests\//d' %{buildroot}${sitelib}/socketIO_client-*.egg-info/SOURCES.txt done %check # temporarily disable tests, they seem to run indefinitely #%__python2 setup.py check nosetests #%__python3 setup.py check nosetests %files -n python3-%{srcname} %{!?_licensedir:%global license %%doc} %doc README.rst %license LICENSE %{python3_sitelib}/* %files -n python2-%{srcname} %{!?_licensedir:%global license %%doc} %doc README.rst %license LICENSE %{python2_sitelib}/* %changelog * Thu Jan 21 2016 Jan Vcelak 0.6.5-2 - rename the source RPM * Thu Dec 31 2015 Jan Vcelak 0.6.5-1 - initial package