From da601565f67f3cbef5d0e522b96fd9f13cc4f4c08d354a786befece2fe1fb635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 08:37:54 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-h2?expand=0&rev=24 --- python-h2.changes | 5 +++++ python-h2.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-h2.changes b/python-h2.changes index 69d9bfc..8511c35 100644 --- a/python-h2.changes +++ b/python-h2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 14 08:37:11 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Thu Feb 27 05:43:42 UTC 2020 - Steve Kowalik diff --git a/python-h2.spec b/python-h2.spec index d95feab..50c9b79 100644 --- a/python-h2.spec +++ b/python-h2.spec @@ -17,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-h2 Version: 3.2.0 Release: 0 Summary: HTTP/2 State-Machine based protocol implementation License: MIT -Group: Development/Languages/Python URL: https://github.com/python-hyper/hyper-h2 Source0: https://files.pythonhosted.org/packages/source/h/h2/h2-%{version}.tar.gz BuildRequires: %{python_module hpack >= 2.3} @@ -30,11 +30,13 @@ BuildRequires: %{python_module hyperframe >= 5.2.0} BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module pytest} BuildRequires: fdupes -BuildRequires: python-enum34 >= 1.1.6 BuildRequires: python-rpm-macros Requires: python-hpack >= 2.3 Requires: python-hyperframe >= 5.2.0 BuildArch: noarch +%if %{with python2} +BuildRequires: python-enum34 >= 1.1.6 +%endif %ifpython2 Requires: python-enum34 >= 1.1.6 %endif @@ -65,6 +67,6 @@ your programming paradigm. %license LICENSE %doc HISTORY.rst README.rst %{python_sitelib}/h2 -%{python_sitelib}/h2-%{version}-py%{python_version}.egg-info +%{python_sitelib}/h2-%{version}-py*.egg-info %changelog