Do not disable python2 builds by default. There are still some packages
that have not been updated to python3 and require python2-pyparted.
This commit is contained in:
parent
9d1cdadc55
commit
02dd5857d4
@ -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 <dcantrell@redhat.com> - 1:3.11.0-15
|
||||
- Do not disable python2 builds by default. There are still some packages
|
||||
|
Loading…
Reference in New Issue
Block a user