Skip to content

Commit cd992fb

Browse files
committed
Specify default Python 2 command on Windows since shebang lines don't work
Create the directories pointed to by TEMP and TMP environment variables
1 parent f13e4eb commit cd992fb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

BUILDING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ Make sure all of the following are in the `PATH`:
6767
* gperf as `gperf`
6868
* bison as `bison`
6969

70-
Also, ensure that `TEMP` and `TMP` environment variables point to existing directories.
71-
7270
See `build.py` for more on customizing the build environment or process.
7371

7472
### Build

buildlib.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ class WindowsBuilder(Builder):
702702

703703
syzygy_archive = None
704704
patch_command = ["patch", "-p1"]
705+
python2_command = "python"
705706
use_depot_tools_toolchain = False
706707

707708
@staticmethod
@@ -769,6 +770,13 @@ def generate_build_configuration(self):
769770
append_environ = {"DEPOT_TOOLS_WIN_TOOLCHAIN": "0"}
770771
self._gyp_generate_ninja(self._get_gyp_flags(), append_environ)
771772

773+
def build(self):
774+
# Try to make temporary directories so ninja won't fail
775+
os.makedirs(os.environ["TEMP"], exist_ok=True)
776+
os.makedirs(os.environ["TMP"], exist_ok=True)
777+
778+
super(WindowsBuilder, self).build()
779+
772780
def generate_package(self):
773781
# Derived from chrome/tools/build/make_zip.py
774782
# Hardcoded to only include files with buildtype "dev" and "official", and files for 32bit

0 commit comments

Comments
 (0)