Use 'python2' when building the Python 2.x bindings (#1605566)

This commit is contained in:
David Cantrell 2018-07-24 10:08:41 -04:00
parent c184324114
commit 4bc49bbd4f

View File

@ -4,13 +4,14 @@ Summary: Python module for GNU parted
Name: pyparted Name: pyparted
Epoch: 1 Epoch: 1
Version: 3.11.0 Version: 3.11.0
Release: 12%{?dist} Release: 13%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
URL: https://github.com/rhinstaller/pyparted URL: https://github.com/rhinstaller/pyparted
Source0: https://github.com/rhinstaller/pyparted/archive/%{name}-%{version}.tar.gz Source0: https://github.com/rhinstaller/pyparted/archive/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python2-six BuildRequires: python2-six
%if 0%{?with_python3} %if 0%{?with_python3}
@ -56,7 +57,7 @@ cp -a . %{py3dir}
%endif %endif
%build %build
make %{?_smp_mflags} PYTHON=python2 make %{?_smp_mflags}
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
@ -64,18 +65,8 @@ PYTHON=python3 make %{?_smp_mflags}
popd popd
%endif %endif
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
PYTHON=python3 make install DESTDIR=%{buildroot}
popd
%endif
%check %check
make test PYTHON=python2 make test
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
@ -83,6 +74,16 @@ PYTHON=python3 make test
popd popd
%endif %endif
%install
rm -rf %{buildroot}
PYTHON=python2 make install DESTDIR=%{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
PYTHON=python3 make install DESTDIR=%{buildroot}
popd
%endif
%files -n python2-pyparted %files -n python2-pyparted
%doc AUTHORS COPYING NEWS README TODO %doc AUTHORS COPYING NEWS README TODO
%{python_sitearch}/_ped.so %{python_sitearch}/_ped.so
@ -98,6 +99,9 @@ popd
%endif %endif
%changelog %changelog
* Tue Jul 24 2018 David Cantrell <dcantrell@redhat.com> - 1:3.11.0-13
- Use 'python2' when building the Python 2.x bindings (#1605566)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.0-12 * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.11.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild