Skip to content

Commit cee3f51

Browse files
committed
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: node-forward/node#39 Reviewed-By: Fedor Indutny <[email protected]>
1 parent af32dd7 commit cee3f51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ SIGN ?=
88
PREFIX ?= /usr/local
99

1010
# Determine EXEEXT
11-
EXEEXT=$(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('EXE'))")
11+
EXEEXT := $(shell $(PYTHON) -c \
12+
"import sys; print('.exe' if sys.platform == 'win32' else '')")
1213

1314
NODE ?= ./node$(EXEEXT)
1415
NODE_EXE = node$(EXEEXT)

tools/install.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import re
1212
import shutil
1313
import sys
14-
import sysconfig
1514

1615
# set at init time
1716
node_prefix = '/usr/local' # PREFIX variable from Makefile
@@ -128,7 +127,7 @@ def subdir_files(path, dest, action):
128127
action(files, subdir + '/')
129128

130129
def files(action):
131-
exeext=sysconfig.get_config_var('EXE')
130+
exeext = '.exe' if sys.platform == 'win32' else ''
132131
action(['out/Release/node' + exeext], 'bin/node' + exeext)
133132

134133
if 'true' == variables.get('node_use_dtrace'):

0 commit comments

Comments
 (0)