From 417c9954597518b9719a8363538a2f7d847f87c1 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Sep 29 2017 16:40:39 +0000 Subject: Cleanup spec file conditionals --- diff --git a/python-pybeam.spec b/python-pybeam.spec index 3e4a504..d8d4119 100644 --- a/python-pybeam.spec +++ b/python-pybeam.spec @@ -1,9 +1,12 @@ %global srcname pybeam +%if 0%{?fedora} || 0%{?rhel} > 7 +%global with_python3 1 +%endif Name: python-%{srcname} Version: 0.3.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python module to parse Erlang BEAM files License: MIT Group: Development/Languages @@ -29,7 +32,7 @@ Requires: python-six >= 1.4.0 Python module to parse Erlang BEAM files. -%if 0%{?fedora} +%if 0%{?with_python3} %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-construct @@ -51,7 +54,7 @@ Python module to parse Erlang BEAM files. %build %py2_build -%if 0%{?fedora} +%if 0%{?with_python3} %py3_build %endif @@ -61,14 +64,14 @@ Python module to parse Erlang BEAM files. # overwritten with every setup.py install, and in general we want the # python3 version to be the default. %py2_install -%if 0%{?fedora} +%if 0%{?with_python3} %py3_install %endif %check %{__python2} setup.py test -%if 0%{?fedora} +%if 0%{?with_python3} %{__python3} setup.py test %endif @@ -79,7 +82,7 @@ Python module to parse Erlang BEAM files. %{python2_sitelib}/* -%if 0%{?fedora} +%if 0%{?with_python3} %files -n python3-%{srcname} %license LICENSE %doc README.md @@ -88,6 +91,9 @@ Python module to parse Erlang BEAM files. %changelog +* Fri Sep 29 2017 Troy Dawson - 0.7.19-5 +- Cleanup spec file conditionals + * Thu Jul 27 2017 Fedora Release Engineering - 0.3.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild