From dda5246c39801ba80de4beec5cdb413107408005 Mon Sep 17 00:00:00 2001 From: Itamar Reis Peixoto Date: Dec 12 2015 20:50:56 +0000 Subject: include python_provide macro bz# 1291005 / el6 build fixes --- diff --git a/python-dialog.spec b/python-dialog.spec index 2401620..571ae03 100644 --- a/python-dialog.spec +++ b/python-dialog.spec @@ -8,7 +8,7 @@ Name: python-dialog Version: 3.3.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python interface to the Unix dialog utility Group: Development/Languages @@ -31,7 +31,9 @@ features from Python code. %package -n python2-dialog Requires: dialog -Summary: %{summary} +Summary: %{summary} +Group: Development/Languages +%{?python_provide:%python_provide python2-dialog} %description -n python2-dialog A Python interface to the Unix dialog utility, designed to provide an @@ -42,6 +44,8 @@ features from Python code. %package -n python3-dialog Requires: dialog Summary: %{summary} +Group: Development/Languages +%{?python_provide:%python_provide python3-dialog} %description -n python3-dialog A Python interface to the Unix dialog utility, designed to provide an @@ -59,8 +63,13 @@ tar -xvf %{SOURCE1} %py3_build cp -a README.rst README %endif + pushd %{upstream_name2}-%{version} +%if 0%{?el6} == 1 +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +%else %py2_build +%endif cp -a README.rst README popd @@ -69,26 +78,39 @@ popd %py3_install %endif pushd %{upstream_name2}-%{version} +%if 0%{?el6} == 1 +%{__python} setup.py install --skip-build --root %{buildroot} +%else %py2_install +%endif + popd %if %{with python3} %files -n python3-dialog -%license COPYING -%doc README examples/ +%doc %{upstream_name2}-%{version}/COPYING +%doc %{upstream_name2}-%{version}/README %{upstream_name2}-%{version}/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}/COPYING %doc %{upstream_name2}-%{version}/README %{upstream_name2}-%{version}/examples/ +%if 0%{?el6} == 1 +%{python_sitelib}/dialog.py* +%{python_sitelib}/python2_pythondialog-*.egg-info +%else %{python2_sitelib}/dialog.py* %{python2_sitelib}/python2_pythondialog-*.egg-info - +%endif %changelog +* Sat Dec 12 2015 Itamar Reis Peixoto - 3.3.0-6 +- include python_provide macro bz# 1291005 +- include el6 conditionals / fixes from Nick Le Mouton + * Thu Dec 03 2015 Robert Buchholz - 3.3.0-5 - epel7: Only build python2 package