servo: Merge #13650 - Define NATIVE_WIN32_PYTHON environment variable (from UK992:win32); r=larsbergstrom
authorUK992 <urbankrajnc92@gmail.com>
Thu, 15 Dec 2016 05:14:16 -0800
changeset 340351 5a1440c3e6b9c5b086b6d37c49444dfe42130de9
parent 340350 dca4035eaa262f7de7769f2439ba2e22a9809f36
child 340352 aeb31d25b1a710e739a3e975e81544fd3743094d
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslarsbergstrom
servo: Merge #13650 - Define NATIVE_WIN32_PYTHON environment variable (from UK992:win32); r=larsbergstrom r? @Wafflespeanut or @larsbergstrom --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors Source-Repo: https://github.com/servo/servo Source-Revision: d6788a5048b9aeab592de651edb2513816389a48
servo/python/servo/command_base.py
--- a/servo/python/servo/command_base.py
+++ b/servo/python/servo/command_base.py
@@ -421,16 +421,20 @@ class CommandBase(object):
             extra_path += [path.join(msvc_deps_dir, "ninja", "bin")]
             # Link openssl
             env["OPENSSL_INCLUDE_DIR"] = path.join(msvc_deps_dir, "openssl", "include")
             env["OPENSSL_LIB_DIR"] = path.join(msvc_deps_dir, "openssl", "lib" + msvc_x64)
             env["OPENSSL_LIBS"] = "ssleay32MD:libeay32MD"
             # Link moztools
             env["MOZTOOLS_PATH"] = path.join(msvc_deps_dir, "moztools", "bin")
 
+        if is_windows():
+            if not os.environ.get("NATIVE_WIN32_PYTHON"):
+                env["NATIVE_WIN32_PYTHON"] = sys.executable
+
         if not self.config["tools"]["system-rust"] \
                 or self.config["tools"]["rust-root"]:
             env["RUST_ROOT"] = self.config["tools"]["rust-root"]
             # Add mingw64 binary path before rust paths to avoid conflict with libstdc++-6.dll
             if sys.platform == "msys":
                 extra_path += [path.join(os.sep, "mingw64", "bin")]
             # These paths are for when rust-root points to an unpacked installer
             extra_path += [path.join(self.config["tools"]["rust-root"], "rustc", "bin")]