@@ -235,20 +235,23 @@ def _tensorflow_solib_repo_impl(repo_ctx):
235235 tf_lib_path = _find_tf_lib_path (repo_ctx )
236236 repo_ctx .symlink (tf_lib_path , "tensorflow_solib" )
237237 if is_darwin (repo_ctx ):
238- suffix = "2.dylib"
238+ tensorflow_solib = "libtensorflow_cc.2.dylib"
239+ full_path = repo_ctx .path ("tensorflow_solib/{}" .format (tensorflow_solib ))
240+ if not full_path .exists :
241+ tensorflow_solib = "libtensorflow_framework.2.dylib"
239242 else :
240- suffix = "so.2"
243+ tensorflow_solib = "libtensorflow_framework. so.2"
241244
242245 repo_ctx .file (
243246 "BUILD" ,
244247 content = """
245248cc_library(
246249 name = "framework_lib",
247- srcs = ["tensorflow_solib/libtensorflow_framework.{suffix }"],
250+ srcs = ["tensorflow_solib/{tensorflow_solib }"],
248251 deps = ["@python_includes", "@python_includes//:numpy_includes"],
249252 visibility = ["//visibility:public"],
250253)
251- """ .format (suffix = suffix ))
254+ """ .format (tensorflow_solib = tensorflow_solib ))
252255
253256def _python_includes_repo_impl (repo_ctx ):
254257 python_include_path = _find_python_include_path (repo_ctx )
@@ -267,9 +270,6 @@ def _python_includes_repo_impl(repo_ctx):
267270 else :
268271 python_includes_srcs = 'srcs = ["%s"],' % python_solib .basename
269272
270- # Note, "@python_includes" is a misnomer since we include the
271- # libpythonX.Y.so in the srcs, so we can get access to python's various
272- # symbols at link time.
273273 repo_ctx .file (
274274 "BUILD" ,
275275 content = """
@@ -394,7 +394,7 @@ def _protoc_archive(ctx):
394394
395395 if is_darwin (ctx ):
396396 platform = "osx"
397- sha256 = ""
397+ sha256 = "99729771ccb2f70621ac20f241f6ab1c70271f2c6bd2ea1ddbd9c2f7ae08d316 "
398398 else :
399399 platform = "linux"
400400
0 commit comments