## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a lesser substitute. %bcond_without doc_pdf Name: python-socketio Version: 5.4.0 Release: %autorelease Summary: Socket.IO server License: MIT URL: https://github.com/miguelgrinberg/python-socketio Source0: %{url}/archive/v%{version}/python-socketio-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel # Documentation %if %{with doc_pdf} BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif # Extra testing dependencies BuildRequires: python3dist(pytest) %global common_description %{expand: Socket.IO is a 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-socketio Summary: %{summary} %description -n python3-socketio %{common_description} %pyproject_extras_subpkg -n python3-socketio client asyncio_client %package doc Summary: Documentation for python-socketio %description doc %{common_description} %prep %autosetup # Fix “/usr/bin/env python” shebangs in the examples %py3_shebang_fix examples %generate_buildrequires %pyproject_buildrequires -x client,asyncio_client -t %build %pyproject_wheel %if %{with doc_pdf} PYTHONPATH="${PWD}/src" %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' %make_build -C docs/_build/latex %endif %install %pyproject_install %pyproject_save_files socketio %check %pytest %files -n python3-socketio -f %{pyproject_files} %files doc %license LICENSE %doc CHANGES.md %doc README.md %doc SECURITY.md %if %{with doc_pdf} %doc docs/_build/latex/python-socketio.pdf %endif %doc examples %changelog * Fri Oct 01 2021 Benjamin A. Beasley 5.4.0-6 - Fix PYTHONPATH when building documentation * Wed Sep 29 2021 Benjamin A. Beasley 5.4.0-5 - Generate PDF instead of HTML Sphinx documentation. * Sun Sep 12 2021 Benjamin A. Beasley 5.4.0-4 - Let pyproject-rpm-mmacros handle the license file * Sun Sep 12 2021 Benjamin A. Beasley 5.4.0-3 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * Sun Sep 12 2021 Benjamin A. Beasley 5.4.0-2 - Reduce macro indirection in the spec file * Mon Aug 02 2021 Benjamin A. Beasley 5.4.0-1 - Update to 5.4.0 * Tue Jul 27 2021 Benjamin A. Beasley 5.3.0-2 - Move %generate_buildrequires after %prep to make the spec file easier to follow * Wed Jul 21 2021 Benjamin A. Beasley 5.3.0-1 - Update to 5.3.0 (closes RHBZ#1875537) * Mon Jul 05 2021 Benjamin A. Beasley - 4.6.1-1 - Update to 4.6.1 - Near-total spec file rewrite - Remove obsolete practices like python_provide macro and manual Requires - Add documentation subpackage - Use pytest as test runner - Fix spurious executable permissions (upstream PR#748) * Fri Jun 04 2021 Python Maint - 4.6.0-3 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 4.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Sep 03 2020 Mukundan Ragavan - 4.6.0-1 - Update to 4.6.0 * Wed Jul 29 2020 Fedora Release Engineering - 4.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 4.4.0-4 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 4.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Dec 30 2019 Mukundan Ragavan - 4.4.0-2 - Use expand macro for description * Sun Dec 22 2019 Mukundan Ragavan - 4.4.0-1 - Initial package.