From ed12bdf9708db3594737c5578c3e61f72dd64def Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 29 May 2018 08:21:46 -0400 Subject: [PATCH] Fix up bare 'python' to be python2 Signed-off-by: Stephen Gallagher --- nodejs.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index a691a7a..9753a9e 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -287,6 +287,13 @@ rm -rf deps/icu-small \ %patch4 -p1 +# Replace any instances of unversioned python' with python2 +find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python2~" {} \; +find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python2~" {} \; +find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python2~" {} \; +find . -type f -exec sed -i "s~python -c~python2 -c~" {} \; +sed -i "s~which('python')~which('python2')~" configure + %build # build with debugging symbols and add defines from libuv (#892601) # Node's v8 breaks with GCC 6 because of incorrect usage of methods on @@ -308,11 +315,6 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" export LDFLAGS="%{build_ldflags}" -# Work around Fedora 28 issue: -# https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out -# Tracking BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1550564 -export PYTHON_DISALLOW_AMBIGUOUS_VERSION=0 - #%if ! 0%%{?bootstrap} %if %{with bootstrap} ./configure --prefix=%{_prefix} \ @@ -489,7 +491,6 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - %files docs %dir %{_pkgdocdir} %{_pkgdocdir}/html -%{_pkgdocdir}/npm* %{_pkgdocdir}/npm/html %{_pkgdocdir}/npm/doc