diff --git a/conf/templates/packaging/scripts/logilab-astng-install.sh b/conf/templates/packaging/scripts/logilab-astng-install.sh index fb115665..a4b3c673 100644 --- a/conf/templates/packaging/scripts/logilab-astng-install.sh +++ b/conf/templates/packaging/scripts/logilab-astng-install.sh @@ -1,4 +1,4 @@ -python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +%{__python} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES abspath_installed_files=$(readlink -f INSTALLED_FILES) ( cd $RPM_BUILD_ROOT diff --git a/conf/templates/packaging/scripts/networkx-install.sh b/conf/templates/packaging/scripts/networkx-install.sh index 15aa919c..20f13acc 100644 --- a/conf/templates/packaging/scripts/networkx-install.sh +++ b/conf/templates/packaging/scripts/networkx-install.sh @@ -1,4 +1,4 @@ -python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES abspath_installed_files=$(readlink -f INSTALLED_FILES) ( diff --git a/conf/templates/packaging/scripts/selenium-install.sh b/conf/templates/packaging/scripts/selenium-install.sh index 23ce68f3..f00b677c 100644 --- a/conf/templates/packaging/scripts/selenium-install.sh +++ b/conf/templates/packaging/scripts/selenium-install.sh @@ -1,4 +1,4 @@ -python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES # remove driver parts for other architectures %ifnarch %ix86 diff --git a/conf/templates/packaging/specs/openstack-keystone.spec b/conf/templates/packaging/specs/openstack-keystone.spec index 9f93902f..d47a9eeb 100644 --- a/conf/templates/packaging/specs/openstack-keystone.spec +++ b/conf/templates/packaging/specs/openstack-keystone.spec @@ -114,7 +114,7 @@ This package contains the Keystone Python library. #raw %build -python setup.py build +%{__python} setup.py build %install @@ -131,7 +131,7 @@ popd rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo %endif -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} %if ! 0%{?usr_only} diff --git a/conf/templates/packaging/specs/openstack-trove.spec b/conf/templates/packaging/specs/openstack-trove.spec index 273bb623..695050b2 100644 --- a/conf/templates/packaging/specs/openstack-trove.spec +++ b/conf/templates/packaging/specs/openstack-trove.spec @@ -118,7 +118,7 @@ simple runner (%{python_name}-make-test-env). #raw %build -python setup.py build +%{__python} setup.py build %install @@ -135,7 +135,7 @@ popd rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo %endif -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} %if ! 0%{?usr_only} diff --git a/tools/py2rpm b/tools/py2rpm index d16234a6..14832b4c 100755 --- a/tools/py2rpm +++ b/tools/py2rpm @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import argparse import distutils.spawn @@ -32,9 +32,9 @@ DEFAULT_SCRIPTS = { "prep": """%setup -n %{pkg_name}-%{unmangled_version} -n %{pkg_name}-%{unmangled_version}""", "build": - """python setup.py build""", + """%{__python} setup.py build""", "install": - """python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES + """%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES abspath_installed_files=$(readlink -f INSTALLED_FILES) ( cd $RPM_BUILD_ROOT