diff --git a/python-dialog.spec b/python-dialog.spec index 8dee05d..2401620 100644 --- a/python-dialog.spec +++ b/python-dialog.spec @@ -1,9 +1,14 @@ %global upstream_name pythondialog %global upstream_name2 python2-pythondialog +%if 0%{?fedora} +%bcond_without python3 +%else +%bcond_with python3 +%endif Name: python-dialog Version: 3.3.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python interface to the Unix dialog utility Group: Development/Languages @@ -15,7 +20,9 @@ Source1: https://pypi.python.org/packages/source/p/%{upstream_name2}/%{up BuildArch: noarch BuildRequires: python2-devel +%if %{with python3} BuildRequires: python3-devel +%endif %description A Python interface to the Unix dialog utility, designed to provide an @@ -31,6 +38,7 @@ A Python interface to the Unix dialog utility, designed to provide an easy, pythonic and as complete as possible way to use the dialog features from Python code. +%if %{with python3} %package -n python3-dialog Requires: dialog Summary: %{summary} @@ -39,6 +47,7 @@ Summary: %{summary} A Python interface to the Unix dialog utility, designed to provide an easy, pythonic and as complete as possible way to use the dialog features from Python code. +%endif %prep @@ -46,32 +55,43 @@ features from Python code. tar -xvf %{SOURCE1} %build +%if %{with python3} %py3_build +cp -a README.rst README +%endif pushd %{upstream_name2}-%{version} %py2_build +cp -a README.rst README popd %install +%if %{with python3} %py3_install +%endif pushd %{upstream_name2}-%{version} %py2_install popd +%if %{with python3} %files -n python3-dialog %license COPYING -%doc README.rst examples/ +%doc README examples/ %{python3_sitelib}/dialog.py* %{python3_sitelib}/__pycache__/ %{python3_sitelib}/pythondialog-*.egg-info +%endif %files -n python2-dialog %license %{upstream_name2}-%{version}/COPYING -%doc %{upstream_name2}-%{version}/README.rst %{upstream_name2}-%{version}/examples/ +%doc %{upstream_name2}-%{version}/README %{upstream_name2}-%{version}/examples/ %{python2_sitelib}/dialog.py* %{python2_sitelib}/python2_pythondialog-*.egg-info %changelog +* Thu Dec 03 2015 Robert Buchholz - 3.3.0-5 +- epel7: Only build python2 package + * Thu Dec 03 2015 Robert Buchholz - 3.3.0-4 - No need to convert README, upstream provides utf-8 - Remove obsolete comment