diff --git a/python-colorama.spec b/python-colorama.spec index 4208c48..bb1c6a5 100644 --- a/python-colorama.spec +++ b/python-colorama.spec @@ -1,14 +1,16 @@ %global pypi_name colorama -%if 0%{?fedora} +%if 0%{?fedora} > 29 || 0%{?rhel} > 7 +%bcond_with python2 %bcond_without python3 %else +%bcond_without python2 %bcond_with python3 %endif Name: python-%{pypi_name} Version: 0.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Cross-platform colored terminal text License: BSD @@ -27,7 +29,7 @@ It also provides some shortcuts to help generate ANSI sequences, and works fine in conjunction with any other ANSI sequence generation library, such as Termcolor. -%if 0%{?fedora} > 29 +%if %{with python2} %package -n python2-%{pypi_name} Summary: Cross-platform colored terminal text BuildRequires: python2-devel @@ -76,7 +78,7 @@ Python 3 version. rm -rf *.egg-info %build -%if 0%{?fedora} > 29 +%if %{with python2} %py2_build %endif %if %{with python3} @@ -84,14 +86,14 @@ rm -rf *.egg-info %endif %install -%if 0%{?fedora} > 29 +%if %{with python2} %py2_install %endif %if %{with python3} %py3_install %endif -%if 0%{?fedora} > 29 +%if %{with python2} %files -n python2-%{pypi_name} %doc README.rst %license LICENSE.txt @@ -108,6 +110,9 @@ rm -rf *.egg-info %endif %changelog +* Fri Oct 19 2018 Javier Peña - 0.4.0-2 +- Fix python2 package for non-Fedora + * Fri Oct 19 2018 Matthias Runge - 0.4.0-1 - update to 0.4.0