From 02dd5857d4b7b1879e6b77fb5bdc08d40f5c8ba0 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 26 Jul 2018 14:31:45 -0400 Subject: [PATCH] Do not disable python2 builds by default. There are still some packages that have not been updated to python3 and require python2-pyparted. --- pyparted.spec | 53 ++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/pyparted.spec b/pyparted.spec index c5ffc3a..50978ed 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -39,8 +39,6 @@ %endif -%global py2dir python2-build - Summary: Python module for GNU parted Name: pyparted Epoch: 1 @@ -98,52 +96,43 @@ partition tables. This package provides Python 3 bindings for parted. %prep %setup -q -%if %{with python2} -rm -rf ../%{py2dir} -mkdir -p ../%{py2dir} -cp -a . ../%{py2dir} -mv ../%{py2dir} . +%if %{with python3} +rm -rf %{py3dir} +mkdir -p %{py3dir} +cp -a . %{py3dir} %endif %build -%if %{with python3} -PYTHON=python3 make %{?_smp_mflags} +%if %{with python2} +PYTHON=python2 make %{?_smp_mflags} %endif -%if %{with python2} -pushd %{py2dir} -PYTHON=python2 make %{?_smp_mflags} +%if %{with python3} +pushd %{py3dir} +PYTHON=python3 make %{?_smp_mflags} popd %endif %check -%if %{with python3} -PYTHON=python3 make test +%if %{with python2} +PYTHON=python2 make test %endif -%if %{with python2} -pushd %{py2dir} -PYTHON=python2 make test +%if %{with python3} +pushd %{py3dir} +PYTHON=python3 make test popd %endif %install -%if %{with python3} -PYTHON=python3 make install DESTDIR=%{buildroot} -%endif - %if %{with python2} -pushd %{py2dir} PYTHON=python2 make install DESTDIR=%{buildroot} -popd %endif %if %{with python3} -%files -n python3-pyparted -%doc AUTHORS COPYING NEWS README TODO -%{python3_sitearch}/_ped.*.so -%{python3_sitearch}/parted -%{python3_sitearch}/%{name}-%{version}-*.egg-info +pushd %{py3dir} +PYTHON=python3 make install DESTDIR=%{buildroot} +popd %endif %if %{with python2} @@ -154,6 +143,14 @@ popd %{python2_sitearch}/%{name}-%{version}-*.egg-info %endif +%if %{with python3} +%files -n python3-pyparted +%doc AUTHORS COPYING NEWS README TODO +%{python3_sitearch}/_ped.*.so +%{python3_sitearch}/parted +%{python3_sitearch}/%{name}-%{version}-*.egg-info +%endif + %changelog * Thu Jul 26 2018 David Cantrell - 1:3.11.0-15 - Do not disable python2 builds by default. There are still some packages