For fedora distro, when building git-buildpackage rpm packages in the buildroot,
/bin/python is called to do python setup.py actions during rpmbuild,which leads
to /bin/python is taken as requirement of git-buildpackage-rpm-0.6.15-0.noarch.rpm
automatically, resulting in:
Install gbs with dnf command in fedora distro will raise error:
nothing provides /bin/python needed by git-buildpackage-rpm-0.6.12-59.1.noarch
Fixes: DEVT-197
Change-Id: I30169a506d7f92aed759124c40beb2803c196218
Signed-off-by: Li Jinjing <jinjingx.li@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
%build
-WITHOUT_NOSETESTS=1 python ./setup.py build
+WITHOUT_NOSETESTS=1 %{__python} ./setup.py build
%if %{with docs}
# Prepare apidocs
GIT_CEILING_DIRECTORIES=%{_builddir} \
GIT_AUTHOR_EMAIL=rpmbuild@example.com GIT_AUTHOR_NAME=rpmbuild \
GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL \
- python setup.py nosetests
+ %{__python} setup.py nosetests
%endif
%install
rm -rf %{buildroot}
-WITHOUT_NOSETESTS=1 python ./setup.py install --root=%{buildroot} --prefix=/usr
+WITHOUT_NOSETESTS=1 %{__python} ./setup.py install --root=%{buildroot} --prefix=/usr
rm -rf %{buildroot}%{python_sitelib}/*info
%if %{with docs}