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:
parent
57cb788eaa
commit
dead1b6b06
@ -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)
|
abspath_installed_files=$(readlink -f INSTALLED_FILES)
|
||||||
(
|
(
|
||||||
cd $RPM_BUILD_ROOT
|
cd $RPM_BUILD_ROOT
|
||||||
|
@ -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)
|
abspath_installed_files=$(readlink -f INSTALLED_FILES)
|
||||||
(
|
(
|
||||||
|
@ -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
|
# remove driver parts for other architectures
|
||||||
%ifnarch %ix86
|
%ifnarch %ix86
|
||||||
|
@ -114,7 +114,7 @@ This package contains the Keystone Python library.
|
|||||||
#raw
|
#raw
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -131,7 +131,7 @@ popd
|
|||||||
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
|
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
|
||||||
|
|
||||||
%if ! 0%{?usr_only}
|
%if ! 0%{?usr_only}
|
||||||
|
@ -118,7 +118,7 @@ simple runner (%{python_name}-make-test-env).
|
|||||||
#raw
|
#raw
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -135,7 +135,7 @@ popd
|
|||||||
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
|
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
|
||||||
%if ! 0%{?usr_only}
|
%if ! 0%{?usr_only}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import distutils.spawn
|
import distutils.spawn
|
||||||
@ -32,9 +32,9 @@ DEFAULT_SCRIPTS = {
|
|||||||
"prep":
|
"prep":
|
||||||
"""%setup -n %{pkg_name}-%{unmangled_version} -n %{pkg_name}-%{unmangled_version}""",
|
"""%setup -n %{pkg_name}-%{unmangled_version} -n %{pkg_name}-%{unmangled_version}""",
|
||||||
"build":
|
"build":
|
||||||
"""python setup.py build""",
|
"""%{__python} setup.py build""",
|
||||||
"install":
|
"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)
|
abspath_installed_files=$(readlink -f INSTALLED_FILES)
|
||||||
(
|
(
|
||||||
cd $RPM_BUILD_ROOT
|
cd $RPM_BUILD_ROOT
|
||||||
|
Loading…
Reference in New Issue
Block a user