Make py2rpm respect current virtualenv

- use python from environment to run the script;
- use %{__python} AKA what RPM things python interpreter should
  be in specfiles py2rpm generates;
- also use %{__python} in all our specs.

Change-Id: I3c6daf75a721a97f0bd824988f4d5613bd18a6e9
This commit is contained in:
Ivan A. Melnikov 2014-03-05 14:09:15 +04:00
parent 57cb788eaa
commit dead1b6b06
6 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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)
(

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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