Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Sep 25, 2019
1 parent 0a4d8c8 commit 9f89138
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ matrix:
os: osx
#osx_image: xcode11
language: shell # 'language: python' is not yet supported on macOS
env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1
env: NODE_GYP_FORCE_PYTHON=python3
before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew install npm
- name: "Node.js 12 & Python 3.7 on Windows"
os: windows
Expand All @@ -58,12 +58,8 @@ matrix:
env: >-
PATH=/c/Python37:/c/Python37/Scripts:$PATH
NODE_GYP_FORCE_PYTHON=/c/Python37/python.exe
EXPERIMENTAL_NODE_GYP_PYTHON3=1
before_install: choco install python

allow_failures:
- os: osx
env: NODE_GYP_FORCE_PYTHON=python3 EXPERIMENTAL_NODE_GYP_PYTHON3=1
install:
#- pip install -r requirements.txt
- pip install flake8 # pytest # add another testing frameworks later
Expand Down
2 changes: 1 addition & 1 deletion gyp/pylib/gyp/xcode_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ def XcodeVersion():
if version:
version = re.match(r'(\d+\.\d+\.?\d*)', version).groups()[0]
else:
raise GypError("No Xcode or CLT version detected!")
raise GypError("No Xcode or CLT version detected! {}".format(version))
# The CLT has no build information, so we return an empty string.
version_list = [version, '']
version = version_list[0]
Expand Down
10 changes: 7 additions & 3 deletions lib/find-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ PythonFinder.prototype = {
log: logWithPrefix(log, 'find Python'),
argsExecutable: [ '-c', 'import sys; print(sys.executable);' ],
argsVersion: [ '-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);' ],
semverRange: process.env.EXPERIMENTAL_NODE_GYP_PYTHON3 ? '2.7.x || >=3.5.0'
: '>=2.7.0 <3.0.0',
semverRange: '2.7.x || >=3.5.0',

// These can be overridden for testing:
execFile: cp.execFile,
Expand Down Expand Up @@ -93,6 +92,11 @@ PythonFinder.prototype = {
check: this.checkCommand,
arg: 'python'
},
{
before: () => { this.addLog('checking if "python3" can be used') },
check: this.checkCommand,
arg: 'python3'
},
{
before: () => { this.addLog('checking if "python2" can be used') },
check: this.checkCommand,
Expand Down Expand Up @@ -286,7 +290,7 @@ PythonFinder.prototype = {
// X
const info = [
'**********************************************************',
'You need to install the latest version of Python 2.7.',
'You need to install the latest version of Python.',
'Node-gyp should be able to find and use Python. If not,',
'you can try one of the following options:',
`- Use the switch --python="${pathExample}"`,
Expand Down

0 comments on commit 9f89138

Please sign in to comment.