build: remove python 2.7 dependency
Remove the dependency on the 'sysconfig' module, it breaks the build when $(PYTHON) is python 2.6. PR-URL: https://github.com/node-forward/node/pull/39 Reviewed-By: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
parent
af32dd7b74
commit
cee3f51cef
3
Makefile
3
Makefile
@ -8,7 +8,8 @@ SIGN ?=
|
|||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
# Determine EXEEXT
|
# Determine EXEEXT
|
||||||
EXEEXT=$(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('EXE'))")
|
EXEEXT := $(shell $(PYTHON) -c \
|
||||||
|
"import sys; print('.exe' if sys.platform == 'win32' else '')")
|
||||||
|
|
||||||
NODE ?= ./node$(EXEEXT)
|
NODE ?= ./node$(EXEEXT)
|
||||||
NODE_EXE = node$(EXEEXT)
|
NODE_EXE = node$(EXEEXT)
|
||||||
|
@ -11,7 +11,6 @@ import os
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
|
||||||
|
|
||||||
# set at init time
|
# set at init time
|
||||||
node_prefix = '/usr/local' # PREFIX variable from Makefile
|
node_prefix = '/usr/local' # PREFIX variable from Makefile
|
||||||
@ -128,7 +127,7 @@ def subdir_files(path, dest, action):
|
|||||||
action(files, subdir + '/')
|
action(files, subdir + '/')
|
||||||
|
|
||||||
def files(action):
|
def files(action):
|
||||||
exeext=sysconfig.get_config_var('EXE')
|
exeext = '.exe' if sys.platform == 'win32' else ''
|
||||||
action(['out/Release/node' + exeext], 'bin/node' + exeext)
|
action(['out/Release/node' + exeext], 'bin/node' + exeext)
|
||||||
|
|
||||||
if 'true' == variables.get('node_use_dtrace'):
|
if 'true' == variables.get('node_use_dtrace'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user