# Created by pyp2rpm-3.3.2 %global pypi_name h2 %global common_description %{expand: HTTP/2 Protocol Stack This repository contains a pure-Python implementation of a HTTP/2 protocol stack. It's written from the ground up to be embeddable in whatever program you choose to use, ensuring that you can speak HTTP/2 regardless of your programming paradigm.} Name: python-%{pypi_name} Version: 3.0.1 Release: 3%{?dist} Summary: HTTP/2 State-Machine based protocol implementation License: MIT URL: http://hyper.rtfd.org Source0: https://files.pythonhosted.org/packages/source/h/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: (python3dist(hpack) >= 2.3 with python3dist(hpack) < 4) BuildRequires: (python3dist(hyperframe) >= 5.0 with python3dist(hyperframe) < 6) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(sphinx) # Unbundle BuildRequires: js-jquery BuildRequires: js-underscore %{?python_enable_dependency_generator} %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{common_description} %package doc Summary: Documentation for %{name} Requires: js-jquery Requires: js-underscore %description doc %{common_description} This is the documentation package for h2. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build # generate html docs PYTHONPATH=${PWD} sphinx-build-3 docs/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} # Unbundle JS rm -f html/_static/underscore.js ln -s /usr/share/javascript/underscore/underscore-min.js html/_static/underscore.js rm -f html/_static/underscore-1.3.1.js ln -s /usr/share/javascript/underscore/underscore.js html/_static/underscore-1.3.1.js rm -f html/_static/jquery.js ln -s /usr/share/javascript/jquery/3.2.1/jquery.min.js html/_static/jquery.js rm -f html/_static/jquery-3.2.1.js ln -s /usr/share/javascript/jquery/3.2.1/jquery.js html/_static/jquery-3.2.1.js %install %py3_install %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files doc %doc html %license LICENSE %changelog * Sat Jul 14 2018 Fedora Release Engineering - 3.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 3.0.1-2 - Rebuilt for Python 3.7 * Mon May 14 2018 Robert-André Mauchin - 3.0.1-1 - Initial package.