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
|
%endif
|
||||||
|
|
||||||
%global py2dir python2-build
|
|
||||||
|
|
||||||
Summary: Python module for GNU parted
|
Summary: Python module for GNU parted
|
||||||
Name: pyparted
|
Name: pyparted
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
@ -98,52 +96,43 @@ partition tables. This package provides Python 3 bindings for parted.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python3}
|
||||||
rm -rf ../%{py2dir}
|
rm -rf %{py3dir}
|
||||||
mkdir -p ../%{py2dir}
|
mkdir -p %{py3dir}
|
||||||
cp -a . ../%{py2dir}
|
cp -a . %{py3dir}
|
||||||
mv ../%{py2dir} .
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python3}
|
%if %{with python2}
|
||||||
PYTHON=python3 make %{?_smp_mflags}
|
PYTHON=python2 make %{?_smp_mflags}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python3}
|
||||||
pushd %{py2dir}
|
pushd %{py3dir}
|
||||||
PYTHON=python2 make %{?_smp_mflags}
|
PYTHON=python3 make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with python3}
|
%if %{with python2}
|
||||||
PYTHON=python3 make test
|
PYTHON=python2 make test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python3}
|
||||||
pushd %{py2dir}
|
pushd %{py3dir}
|
||||||
PYTHON=python2 make test
|
PYTHON=python3 make test
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python3}
|
|
||||||
PYTHON=python3 make install DESTDIR=%{buildroot}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
pushd %{py2dir}
|
|
||||||
PYTHON=python2 make install DESTDIR=%{buildroot}
|
PYTHON=python2 make install DESTDIR=%{buildroot}
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%files -n python3-pyparted
|
pushd %{py3dir}
|
||||||
%doc AUTHORS COPYING NEWS README TODO
|
PYTHON=python3 make install DESTDIR=%{buildroot}
|
||||||
%{python3_sitearch}/_ped.*.so
|
popd
|
||||||
%{python3_sitearch}/parted
|
|
||||||
%{python3_sitearch}/%{name}-%{version}-*.egg-info
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
@ -154,6 +143,14 @@ popd
|
|||||||
%{python2_sitearch}/%{name}-%{version}-*.egg-info
|
%{python2_sitearch}/%{name}-%{version}-*.egg-info
|
||||||
%endif
|
%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
|
%changelog
|
||||||
* Thu Jul 26 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-15
|
* 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
|
- Do not disable python2 builds by default. There are still some packages
|
||||||
|
Loading…
Reference in New Issue
Block a user