8000 fix: Strip trailing newline from python output (#1212) · chrislovecnm/rules_python@799e63f · GitHub
[go: up one dir, main page]

Skip to content

Commit 799e63f

Browse files
authored
fix: Strip trailing newline from python output (bazel-contrib#1212)
This is used to generate a path, which shouldn't have a trailing newline.
1 parent 23cf6b6 commit 799e63f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pip_install/pip_repository.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _get_toolchain_unix_cflags(rctx):
128128
er = rctx.execute([
129129
rctx.path(rctx.attr.python_interpreter_target).realpath,
130130
"-c",
131-
"import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}')",
131+
"import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}', end='')",
132132
])
133133
if er.return_code != 0:
134134
fail("could not get python version from interpreter (status {}): {}".format(er.return_code, er.stderr))

0 commit comments

Comments
 (0)
0