mirror of
https://src.fedoraproject.org/rpms/nodejs18.git
synced 2024-11-24 17:44:23 +00:00
Build with python3 only
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
21fad4d53b
commit
cc5ee3bfc3
1 changed files with 10 additions and 12 deletions
22
nodejs.spec
22
nodejs.spec
|
@ -8,7 +8,7 @@
|
||||||
# This is used by both the nodejs package and the npm subpackage thar
|
# This is used by both the nodejs package and the npm subpackage thar
|
||||||
# has a separate version - the name is special so that rpmdev-bumpspec
|
# has a separate version - the name is special so that rpmdev-bumpspec
|
||||||
# will bump this rather than adding .1 to the end.
|
# will bump this rather than adding .1 to the end.
|
||||||
%global baserelease 1
|
%global baserelease 2
|
||||||
|
|
||||||
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
|
@ -139,7 +139,6 @@ Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
|
||||||
# Patch to install both node and libnode.so, using the correct libdir
|
# Patch to install both node and libnode.so, using the correct libdir
|
||||||
Patch2: 0002-Install-both-binaries-and-use-libdir.patch
|
Patch2: 0002-Install-both-binaries-and-use-libdir.patch
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: gcc >= 4.9.4
|
BuildRequires: gcc >= 4.9.4
|
||||||
|
@ -345,15 +344,14 @@ The API documentation for the Node.js JavaScript runtime.
|
||||||
rm -rf deps/zlib
|
rm -rf deps/zlib
|
||||||
|
|
||||||
|
|
||||||
# Replace any instances of unversioned python' with python2
|
# Replace any instances of unversioned python' with python3
|
||||||
pathfix.py -i %{__python2} -pn $(find -type f ! -name "*.js")
|
pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js")
|
||||||
find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python2~" {} \;
|
find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \;
|
||||||
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/python3~" {} \;
|
||||||
sed -i "s~python~python2~" $(find . -type f | grep "gyp$")
|
sed -i "s~python~python3~" $(find . -type f | grep "gyp$")
|
||||||
sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py
|
sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py
|
||||||
sed -i "s~usr\/bin\/python.*$~usr\/bin\/python2~" ./deps/v8/tools/mb/mb_unittest.py
|
sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py
|
||||||
find . -type f -exec sed -i "s~python -c~python2 -c~" {} \;
|
find . -type f -exec sed -i "s~python -c~python3 -c~" {} \;
|
||||||
sed -i "s~which('python')~which('python2')~" configure
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
@ -387,7 +385,7 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
|
||||||
export LDFLAGS="%{build_ldflags}"
|
export LDFLAGS="%{build_ldflags}"
|
||||||
|
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
./configure --prefix=%{_prefix} \
|
%{__python3} configure.py --prefix=%{_prefix} \
|
||||||
--shared \
|
--shared \
|
||||||
--libdir=%{_lib} \
|
--libdir=%{_lib} \
|
||||||
--shared-openssl \
|
--shared-openssl \
|
||||||
|
@ -397,7 +395,7 @@ export LDFLAGS="%{build_ldflags}"
|
||||||
--debug-nghttp2 \
|
--debug-nghttp2 \
|
||||||
--openssl-use-def-ca-store
|
--openssl-use-def-ca-store
|
||||||
%else
|
%else
|
||||||
./configure --prefix=%{_prefix} \
|
%{__python3} configure.py --prefix=%{_prefix} \
|
||||||
--shared \
|
--shared \
|
||||||
--libdir=%{_lib} \
|
--libdir=%{_lib} \
|
||||||
--shared-openssl \
|
--shared-openssl \
|
||||||
|
|
Loading…
Reference in a new issue