File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11"""Implementation of the rules to expose a REPL."""
22
33load ("//python:py_binary.bzl" , _py_binary = "py_binary" )
4- load ("@bazel_skylib//lib:paths.bzl" , "paths" )
54
65def _generate_repl_main_impl (ctx ):
76 stub_repo = ctx .attr .stub .label .repo_name or ctx .workspace_name
8- unnormalized_path = "/" .join ([stub_repo , ctx .file .stub .short_path ])
9- stub_path = paths .normalize (unnormalized_path )
7+ stub_path = "/" .join ([stub_repo , ctx .file .stub .short_path ])
108
119 out = ctx .actions .declare_file (ctx .label .name + ".py" )
1210
Original file line number Diff line number Diff line change 55
66from python .runfiles import runfiles
77
8- STUB_PATH = "%stub_path%"
8+ # runfiles.py will reject paths which aren't normalized, which can happen when the REPL rules are
9+ # used from a remote module.
10+ STUB_PATH = os .path .normpath ("%stub_path%" )
911
1012
1113def start_repl ():
You can’t perform that action at this time.
0 commit comments