From 4bc49bbd4fc603ae818213e381a030a92d6cce9f Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Tue, 24 Jul 2018 10:08:41 -0400 Subject: [PATCH] Use 'python2' when building the Python 2.x bindings (#1605566) --- pyparted.spec | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/pyparted.spec b/pyparted.spec index 923bf1a..0a0be3a 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -4,13 +4,14 @@ Summary: Python module for GNU parted Name: pyparted Epoch: 1 Version: 3.11.0 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: https://github.com/rhinstaller/pyparted Source0: https://github.com/rhinstaller/pyparted/archive/%{name}-%{version}.tar.gz +BuildRequires: gcc BuildRequires: python2-devel BuildRequires: python2-six %if 0%{?with_python3} @@ -56,7 +57,7 @@ cp -a . %{py3dir} %endif %build -make %{?_smp_mflags} +PYTHON=python2 make %{?_smp_mflags} %if 0%{?with_python3} pushd %{py3dir} @@ -64,18 +65,8 @@ PYTHON=python3 make %{?_smp_mflags} popd %endif -%install -rm -rf %{buildroot} -make install DESTDIR=%{buildroot} - -%if 0%{?with_python3} -pushd %{py3dir} -PYTHON=python3 make install DESTDIR=%{buildroot} -popd -%endif - %check -make test +PYTHON=python2 make test %if 0%{?with_python3} pushd %{py3dir} @@ -83,6 +74,16 @@ PYTHON=python3 make test popd %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 %doc AUTHORS COPYING NEWS README TODO %{python_sitearch}/_ped.so @@ -98,6 +99,9 @@ popd %endif %changelog +* Tue Jul 24 2018 David Cantrell - 1:3.11.0-13 +- Use 'python2' when building the Python 2.x bindings (#1605566) + * Fri Jul 13 2018 Fedora Release Engineering - 1:3.11.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild