%global pypi_name Flask-uWSGI-WebSocket %global with_python3 1 Name: python-flask-uwsgi-websocket Version: 0.4.4 Release: 1%{?dist} Summary: High-performance WebSockets for your Flask apps powered by uWSGI Group: Development/Libraries License: MIT URL: https://github.com/zeekay/flask-uwsgi-websocket Source0: https://pypi.python.org/packages/source/F/%{pypi_name}/%{pypi_name}-%{version}.tar.gz # License file from Github # https://raw.githubusercontent.com/zeekay/flask-uwsgi-websocket/master/LICENSE # Upstream has been asked to include license text in tarball Source1: LICENSE BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif Requires: python-flask Requires: uwsgi-plugin-python %description High-performance WebSockets for your Flask apps powered by uWSGI. Low-level uWSGI WebSocket API access and flexible high-level abstractions for building complex WebSocket applications with Flask. Supports several different concurrency models including Gevent. Inspired by Flask-Sockets. %if 0%{?with_python3} %package -n python3-flask-uwsgi-websocket Summary: High-performance WebSockets for your Flask apps powered by uWSGI Group: Development/Libraries Requires: python3-flask Requires: uwsgi-plugin-python3 %description -n python3-flask-uwsgi-websocket High-performance WebSockets for your Flask apps powered by uWSGI. Low-level uWSGI WebSocket API access and flexible high-level abstractions for building complex WebSocket applications with Flask. Supports several different concurrency models including Gevent. Inspired by Flask-Sockets. This package includes the Python 3 version of the module. %endif # with_python3 %prep %setup -q -n %{pypi_name}-%{version} # Delete upstream supplied egg-info rm -rf %{pypi_name}.egg-info cp -p %{SOURCE1} . %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif # with_python3 %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %{__python2} setup.py install --skip-build --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} popd %endif # with_python3 %files %doc README.rst %{!?_licensedir:%global license %%doc} %license LICENSE %{python2_sitelib}/flask_uwsgi_websocket %{python2_sitelib}/Flask_uWSGI_WebSocket-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-flask-uwsgi-websocket %doc README.rst %{!?_licensedir:%global license %%doc} %license LICENSE %{python3_sitelib}/flask_uwsgi_websocket %{python3_sitelib}/Flask_uWSGI_WebSocket-%{version}-py?.?.egg-info %endif # with_python3 %changelog * Fri Jul 24 2015 Eduardo Mayorga Téllez - 0.4.4-1 - Update to 0.4.4 - %%files section more specific * Sun Nov 23 2014 Eduardo Mayorga Téllez - 0.2.10-1 - Update to 0.2.10 - Fixing dependency name * Thu Nov 13 2014 Eduardo Mayorga Téllez - 0.2.5-1 - Initial packaging