aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/windows.md
diff options
context:
space:
mode:
authorGravatar pcloudy <pcloudy@google.com>2017-09-14 10:36:02 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-09-14 18:47:32 +0200
commit1a538e330825f1ef528cc0a9b4d5caf44b76f7f8 (patch)
treef7db9ef1b944591bcb3ab6b755c192e865edec0b /site/docs/windows.md
parent3b63a4e67c547a656000dfd4e9d61f68a21b92d8 (diff)
Update Windows doc about building Python
BAZEL_PYTHON was only used for the old MSVC python wrapper script. After we use wrapper-free CROSSTOOL by default, it's not used anymore. It has nothing to do with building Python rules. The correct way to specify python interpreter is to use --python_path flag. RELNOTES: None PiperOrigin-RevId: 168655953
Diffstat (limited to 'site/docs/windows.md')
-rw-r--r--site/docs/windows.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/site/docs/windows.md b/site/docs/windows.md
index ef32c292a2..22d02449f8 100644
--- a/site/docs/windows.md
+++ b/site/docs/windows.md
@@ -155,14 +155,19 @@ To build Python targets, you need:
Both Python 2 and Python 3 are supported.
- Bazel tries to locate the Python runtime the first time you build any
- target. To tell Bazel where Python is, you can set the `BAZEL_PYTHON`
- environment variable to the Python interpreter's path. For example:
+ To tell Bazel where Python is, you can use `--python_path=<path/to/python>`.
+ For example:
```
- set BAZEL_PYTHON=C:\Python27\python.exe
+ bazel build --python_path=C:/Python27/python.exe ...
```
+ If `--python_path` is not specified, Bazel uses `python.exe` as
+ the interpreter and the binary looks for it in `$PATH` during runtime.
+ If it is not in `$PATH`(for example, when you use `py_binary` as an action's
+ executable, Bazel will sanitize `$PATH`), then the execution will fail.
+
+
On Windows, Bazel builds two output files for `py_binary` rules:
* a self-extracting zip file