Skip to content

Commit 5096f8d

Browse files
committed
Use python2 whenever possible and bump the version.
If python2 seems to be a valid Python 2 interpreter, the configure script will use it. Otherwise, it will fall back to python, as previously. We also bump the crate version so that this change can be propagated further the dependency tree. Closes servo#129.
1 parent 6038459 commit 5096f8d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "mozjs_sys"
33
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
44
repository = "https://github.com/servo/mozjs/"
5-
version = "0.50.0"
5+
version = "0.50.1"
66
authors = ["Mozilla"]
77
links = "mozjs"
88
build = "build.rs"

makefile.cargo

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ ifeq (,$(VCINSTALLDIR))
5050
CXX ?= g++
5151
endif
5252
AR ?= ar
53+
54+
# check if python2 is a valid Python executable, otherwise fall back to python
55+
ifeq (, $(findstring Python 2.,$(shell python2 --version 2> /dev/null)))
56+
PYTHON ?= python2
57+
else
5358
PYTHON ?= python
59+
endif
60+
5461
endif
5562

5663
endif

0 commit comments

Comments
 (0)