• Dan Jacques's avatar
    [win_tools] Use bundled Python CIPD packages (#2). · 3d9b5881
    Dan Jacques authored
    Re-land of bf144679.
    
    Enable bundled Python CIPD packages in bleeding-edge mode. This
    replaces the ZIP unpacking approach used before, and introduces
    validation and management through the CIPD tool. The bleeding edge
    version will only install if a sentinel file is present in the
    "depot_tools" root; otherwise, default behavior will continue.
    
    This method adds a upgrade and downgrade path to/from ZIP and
    CIPD installations. This is done by rewriting the "win_tools.bat"
    process:
    
    1) Ensure that a bootstrap Python is present.
    2) Use it to run "win_tools.py", which has the functionality of
        "git_bootstrap.py" plus Python installation.
    3) Run "win_tools.py" with appropriate flags.
    
    Some tricks were employed to handle cases where there is an
    already-running Python instance that uses the current Python
    installation and executable. This happens on bots because the
    system uses the same "depot_tools" checkout at multiple launch
    layers. To this end, we use the "python.bat" as the "current Python"
    authority and refrain from cleaning up old Python directories if their
    "python.exe" binaries are currently in use.
    
    We change the Git bleeding edge file to share the same
    sentinel file as Python, ".bleeding_edge".
    
    The new Python should have the same facilities as the original Python
    bundle.
    
    BUG=chromium:740171
    TEST=local
    
    Change-Id: I51ba6415c60b95c2aaba94b6e21bd9b3fc82f35d
    Reviewed-on: https://chromium-review.googlesource.com/568524Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
    Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
    3d9b5881
README.md 5.51 KB