@@ -90,10 +90,27 @@ def run(self):
9090 bazel_version = f .read ().strip ()
9191 os .environ ["USE_BAZEL_VERSION" ] = bazel_version
9292
93+ pythonpath = os .environ .get ("PYTHONPATH" , "" )
94+ # Include sys.path entries to support PEP 517 isolated build environments
95+ sys_path_entries = os .pathsep .join ([p for p in sys .path if p ])
96+ if pythonpath :
97+ pythonpath = os .pathsep .join ([pythonpath , sys_path_entries ])
98+ else :
99+ pythonpath = sys_path_entries
100+
101+ bazel_args = [
102+ self ._bazel_cmd ,
103+ "run" ,
104+ "-c" ,
105+ "opt" ,
106+ f"--repo_env=PYTHON_BIN_PATH={ sys .executable } " ,
107+ f"--repo_env=PYTHONPATH={ pythonpath } " ,
108+ ]
109+ bazel_args .extend (self ._additional_build_options )
110+ bazel_args .append ("//tensorflow_data_validation:move_generated_files" )
111+
93112 subprocess .check_call (
94- [self ._bazel_cmd , "run" , "-c" , "opt" ]
95- + self ._additional_build_options
96- + ["//tensorflow_data_validation:move_generated_files" ],
113+ bazel_args ,
97114 # Bazel should be invoked in a directory containing bazel WORKSPACE
98115 # file, which is the root directory.
99116 cwd = os .path .dirname (os .path .realpath (__file__ )),
@@ -225,7 +242,7 @@ def select_constraint(default, nightly=None, git_master=None):
225242 ),
226243 "tfx-bsl"
227244 + select_constraint (
228- default = "@git+https://github.com/vkarampudi/tfx-bsl@testing " ,
245+ default = "@git+https://github.com/vkarampudi/tfx-bsl@master " ,
229246 nightly = ">=1.18.0.dev" ,
230247 git_master = "@git+https://github.com/tensorflow/tfx-bsl@master" ,
231248 ),
0 commit comments