Skip to content

Commit fc56ce8

Browse files
authored
Merge pull request #50 from hzeller/20230209-update-documentation-env-define
Update setting PYTHON_BIN_PATH message --define -> --repo_env
2 parents 5f458fa + bebf131 commit fc56ce8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python_configure.bzl

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _get_python_bin(repository_ctx):
171171
if python_bin_path != None:
172172
return str(python_bin_path)
173173
_fail("Cannot find python in PATH, please make sure " +
174-
"python is installed and add its directory in PATH, or --define " +
174+
"python is installed and add its directory in PATH, or --repo_env " +
175175
"%s='/something/else'.\nPATH=%s" % (
176176
_PYTHON_BIN_PATH,
177177
repository_ctx.os.environ.get("PATH", ""),
@@ -190,7 +190,7 @@ def _get_bash_bin(repository_ctx):
190190
return str(bash_bin_path)
191191
else:
192192
_fail("Cannot find bash in PATH, please make sure " +
193-
"bash is installed and add its directory in PATH, or --define " +
193+
"bash is installed and add its directory in PATH, or --repo_env " +
194194
"%s='/path/to/bash'.\nPATH=%s" % (
195195
_BAZEL_SH,
196196
repository_ctx.os.environ.get("PATH", ""),
@@ -245,7 +245,7 @@ def _check_python_bin(repository_ctx, python_bin):
245245
cmd = '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin)
246246
result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd])
247247
if result.return_code == 1:
248-
_fail("--define %s='%s' is not executable. Is it the python binary?" % (
248+
_fail("--repo_env %s='%s' is not executable. Is it the python binary?" % (
249249
_PYTHON_BIN_PATH,
250250
python_bin,
251251
))

0 commit comments

Comments
 (0)