Move all Tensorflow WORKSPACE rules to a skylark macro

Change: 115515678
This commit is contained in:
Kiril Gorovoy 2016-02-24 18:02:16 -08:00 committed by TensorFlower Gardener
parent 9ba55d8a75
commit 77da168dbc
4 changed files with 63 additions and 56 deletions

View File

@ -12,61 +12,8 @@
# path="<PATH_TO_NDK>",
# api_level=21)
new_http_archive(
name = "gmock_archive",
url = "https://googlemock.googlecode.com/files/gmock-1.7.0.zip",
sha256 = "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b",
build_file = "google/protobuf/gmock.BUILD",
)
new_http_archive(
name = "eigen_archive",
url = "https://bitbucket.org/eigen/eigen/get/ed4c9730b545.tar.gz",
sha256 = "3d9eceb8a2add299e37b1f32759157cc2574f7684936c151552a5ae3f33aebd5",
build_file = "eigen.BUILD",
)
bind(
name = "gtest",
actual = "@gmock_archive//:gtest",
)
bind(
name = "gtest_main",
actual = "@gmock_archive//:gtest_main",
)
git_repository(
name = "re2",
remote = "https://github.com/google/re2.git",
commit = "791beff",
)
new_http_archive(
name = "jpeg_archive",
url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz",
sha256 = "3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7",
build_file = "jpeg.BUILD",
)
new_http_archive(
name = "png_archive",
url = "https://storage.googleapis.com/libpng-public-archive/libpng-1.2.53.tar.gz",
sha256 = "e05c9056d7f323088fd7824d8c6acc03a4a758c4b4916715924edc5dd3223a72",
build_file = "png.BUILD",
)
new_http_archive(
name = "six_archive",
url = "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
build_file = "six.BUILD",
)
bind(
name = "six",
actual = "@six_archive//:six",
)
load("//tensorflow:workspace.bzl", "tf_workspace")
tf_workspace()
# TENSORBOARD_BOWER_AUTOGENERATED_BELOW_THIS_LINE_DO_NOT_EDIT

View File

@ -71,7 +71,7 @@ def tf_additional_test_deps():
return []
def tf_additional_test_srcs():
return ["platform/default/test_benchmark.cc"]
return ["platform/default/test_benchmark.cc", "platform/posix/test.cc"]
def tf_kernel_tests_linkstatic():
return 0

View File

@ -23,6 +23,8 @@ limitations under the License.
#include <sys/types.h>
#include <unistd.h>
#include "tensorflow/core/platform/logging.h"
namespace tensorflow {
namespace testing {

58
tensorflow/workspace.bzl Normal file
View File

@ -0,0 +1,58 @@
# Tensorflow external dependencies that can be loaded in WORKSPACE files.
def tf_workspace(path_prefix = ""):
native.new_http_archive(
name = "gmock_archive",
url = "https://googlemock.googlecode.com/files/gmock-1.7.0.zip",
sha256 = "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b",
build_file = path_prefix + "google/protobuf/gmock.BUILD",
)
native.new_http_archive(
name = "eigen_archive",
url = "https://bitbucket.org/eigen/eigen/get/ed4c9730b545.tar.gz",
sha256 = "3d9eceb8a2add299e37b1f32759157cc2574f7684936c151552a5ae3f33aebd5",
build_file = path_prefix + "eigen.BUILD",
)
native.bind(
name = "gtest",
actual = "@gmock_archive//:gtest",
)
native.bind(
name = "gtest_main",
actual = "@gmock_archive//:gtest_main",
)
native.git_repository(
name = "re2",
remote = "https://github.com/google/re2.git",
commit = "791beff",
)
native.new_http_archive(
name = "jpeg_archive",
url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz",
sha256 = "3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7",
build_file = path_prefix + "jpeg.BUILD",
)
native.new_http_archive(
name = "png_archive",
url = "https://storage.googleapis.com/libpng-public-archive/libpng-1.2.53.tar.gz",
sha256 = "e05c9056d7f323088fd7824d8c6acc03a4a758c4b4916715924edc5dd3223a72",
build_file = path_prefix + "png.BUILD",
)
native.new_http_archive(
name = "six_archive",
url = "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
build_file = path_prefix + "six.BUILD",
)
native.bind(
name = "six",
actual = "@six_archive//:six",
)