rewrite docs to explicitly use python2

I don't particularly care about Python 2 vs 3,
and don't think we're likely to leave 2 soon.

Bug: skia:9079
Change-Id: Ia28c1312309d4d9218d05915dcd21a45fe6f3727
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213506
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2019-05-13 13:51:45 -05:00 committed by Skia Commit-Bot
parent 44d44761c7
commit 2b8b06e793
8 changed files with 21 additions and 21 deletions

View File

@ -62,7 +62,7 @@ possible to patch the files manually by adding the following to
{
'name': 'apply_custom_patch',
'pattern': '.',
'action': ['python',
'action': ['python2',
'-c', 'from distutils.dir_util import copy_tree; copy_tree("src/patch/", "src/");'
],
},

View File

@ -4,7 +4,7 @@ Working in a Chromium repo
To work on Skia inside a Chromium checkout, run the following:
cd chromium/src/third_party/skia
python tools/git-sync-deps
python2 tools/git-sync-deps
bin/gn gen out/Debug
The second command does a minimal "just sync the DEPS" emulation of `gclient

View File

@ -32,7 +32,7 @@ If your branch gets out of date, you will need to update it:
<!--?prettify lang=sh?-->
git pull
python tools/git-sync-deps
python2 tools/git-sync-deps
Adding a unit test
------------------

View File

@ -6,7 +6,7 @@ This is a quickstart to building and running DM.
<!--?prettify lang=sh?-->
python tools/git-sync-deps
python2 tools/git-sync-deps
bin/gn gen out/Debug
ninja -C out/Debug dm
out/Debug/dm -v -w dm_output

View File

@ -9,7 +9,7 @@ We assume you have already synced Skia's dependecies and set up Skia's build sys
<!--?prettify lang=sh?-->
python tools/git-sync-deps
python2 tools/git-sync-deps
bin/gn gen out/Debug
bin/gn gen out/Release --args='is_debug=false'

View File

@ -26,7 +26,7 @@ This requires gsutil, part of the [gcloud sdk](https://cloud.google.com/sdk/down
<!--?prettify lang=sh?-->
CLANGDIR="${HOME}/clang"
python infra/bots/assets/clang_linux/download.py -t $CLANGDIR
python2 infra/bots/assets/clang_linux/download.py -t $CLANGDIR
Building Clang binaries from scratch (Other users)
---------------------------
@ -35,7 +35,7 @@ Building Clang binaries from scratch (Other users)
CLANGDIR="${HOME}/clang"
python tools/git-sync-deps
python2 tools/git-sync-deps
CC= CXX= infra/bots/assets/clang_linux/create.py -t "$CLANGDIR"
Configure and Compile Skia with MSAN
@ -57,7 +57,7 @@ Configure and Compile Skia with MSAN
sanitize = "MSAN"
skia_use_fontconfig = false
EOF
python tools/git-sync-deps
python2 tools/git-sync-deps
bin/gn gen out/msan
ninja -C out/msan
@ -74,7 +74,7 @@ Configure and Compile Skia with ASAN
sanitize = "ASAN"
extra_ldflags = [ "-fuse-ld=lld", "-Wl,-rpath,${CLANGDIR}/lib" ]
EOF
python tools/git-sync-deps
python2 tools/git-sync-deps
bin/gn gen out/asan
ninja -C out/asan
@ -92,7 +92,7 @@ Configure and Compile Skia with TSAN
is_debug = false
extra_ldflags = [ "-Wl,-rpath,${CLANGDIR}/lib" ]
EOF
python tools/git-sync-deps
python2 tools/git-sync-deps
bin/gn gen out/tsan
ninja -C out/tsan

View File

@ -55,7 +55,7 @@ Run GN to generate your build files.
If you find you don't have `bin/gn`, make sure you've run
python tools/git-sync-deps
python2 tools/git-sync-deps
GN allows fine-grained settings for developers and special situations.
@ -92,9 +92,9 @@ NDK](https://developer.android.com/ndk/index.html).
If you do not have an NDK and have access to CIPD, you
can use one of these commands to fetch the NDK our bots use:
python infra/bots/assets/android_ndk_linux/download.py -t /tmp/ndk
python infra/bots/assets/android_ndk_darwin/download.py -t /tmp/ndk
python infra/bots/assets/android_ndk_windows/download.py -t C:/ndk
python2 infra/bots/assets/android_ndk_linux/download.py -t /tmp/ndk
python2 infra/bots/assets/android_ndk_darwin/download.py -t /tmp/ndk
python2 infra/bots/assets/android_ndk_windows/download.py -t C:/ndk
When generating your GN build files, pass the path to your `ndk` and your
desired `target_cpu`:
@ -128,10 +128,10 @@ To compile Skia for an x86 ChromeOS device, one only needs Clang and the lib fil
If you have access to CIPD, you can fetch all of these as follows:
python infra/bots/assets/clang_linux/download.py -t /opt/clang
python infra/bots/assets/armhf_sysroot/download.py -t /opt/armhf_sysroot
python infra/bots/assets/chromebook_arm_gles/download.py -t /opt/chromebook_arm_gles
python infra/bots/assets/chromebook_x86_64_gles/download.py -t /opt/chromebook_x86_64_gles
python2 infra/bots/assets/clang_linux/download.py -t /opt/clang
python2 infra/bots/assets/armhf_sysroot/download.py -t /opt/armhf_sysroot
python2 infra/bots/assets/chromebook_arm_gles/download.py -t /opt/chromebook_arm_gles
python2 infra/bots/assets/chromebook_x86_64_gles/download.py -t /opt/chromebook_x86_64_gles
If you don't have authorization to use those assets, then see the README.md files for
[armhf_sysroot](https://skia.googlesource.com/skia/+/master/infra/bots/assets/armhf_sysroot/README.md),
@ -253,7 +253,7 @@ Skia can be compiled with the free [Build Tools for Visual Studio
The bots use a packaged 2017 toolchain, which Googlers can download like this:
python infra/bots/assets/win_toolchain/download.py -t C:/toolchain
python2 infra/bots/assets/win_toolchain/download.py -t C:/toolchain
You can then pass the VC and SDK paths to GN by setting your GN args:
@ -289,7 +289,7 @@ there is a helper script. It requires that all of your GN directories be inside
the `out` directory. First, create all of your GN configurations as usual.
Pass `--ide=vs` when running `bin/gn gen` for each one. Then:
python gn/gn_meta_sln.py
python2 gn/gn_meta_sln.py
This creates a new dedicated output directory and solution file
`out/sln/skia.sln`. It has one solution configuration for each GN configuration,

View File

@ -29,7 +29,7 @@ installed with `depot_tools`.
# or
# fetch skia
cd skia
python tools/git-sync-deps
python2 tools/git-sync-deps
Getting started with Skia
-------------------------