Blob Blame History Raw
Name:           python-engineio
Version:        4.2.1
Release:        %autorelease
Summary:        Python Engine.IO server and client

License:        MIT
URL:            https://github.com/miguelgrinberg/python-engineio/
Source0:        %{url}/archive/v%{version}/python-engineio-%{version}.tar.gz

BuildArch:      noarch
 
BuildRequires:  python3-devel

# Documentation
BuildRequires:  make
BuildRequires:  python3dist(sphinx)

%global common_description %{expand:
Engine.IO is a lightweight transport protocol that enables real-time
bidirectional event-based communication between clients (typically, though not
always, web browsers) and a server. The official implementations of the client
and server components are written in JavaScript. This package provides Python
implementations of both, each with standard and asyncio variants.}

%description %{common_description}


%package -n     python3-engineio
Summary:        %{summary}

%description -n python3-engineio %{common_description}


%pyproject_extras_subpkg -n python3-engineio client asyncio_client


%package        doc
Summary:        Documentation for python-engineio

%description    doc %{common_description}


%prep
%autosetup -p1

# Remove pre-compiled/pre-minified browser build of
# https://github.com/socketio/engine.io from the examples. This makes them less
# useful, but satisfies
# https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/ and
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling. It
# doesn’t seem worth it to package the JavaScript implementation of Engine.IO
# just for the sake of these examples.
find examples -type f -name 'engine.io.js' -print -delete


%generate_buildrequires
%pyproject_buildrequires -x client,asyncio_client -t


%build
%pyproject_wheel
PYTHONPATH="${PWD}" %make_build -C docs html SPHINXOPTS='%{?_smp_mflags}'
rm -vf docs/_build/html/.buildinfo


%install
%pyproject_install
%pyproject_save_files engineio


%check
%pytest


%files -n python3-engineio -f %{pyproject_files}


%files doc
%license LICENSE
%doc CHANGES.md
%doc README.md
%doc SECURITY.md
%doc docs/_build/html
# Bundled pre-compiled engine.io.js has been removed:
%doc examples


%changelog
%autochangelog