1"""Loads pasta python package.""" 2 3load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") 4 5def repo(): 6 tf_http_archive( 7 name = "pasta", 8 urls = tf_mirror_urls("https://github.com/google/pasta/archive/v0.2.0.tar.gz"), 9 strip_prefix = "pasta-0.2.0", 10 sha256 = "b9e3bcf5ab79986e245c8a2f3a872d14c610ce66904c4f16818342ce81cf97d2", 11 build_file = "//third_party/pasta:pasta.BUILD", 12 system_build_file = "//third_party/pasta:BUILD.system", 13 14 # We want to add a bazel macro for use in the `@pasta` BUILD file. 15 # 16 # If we have this file live in this repo, referencing it from `@pasta` 17 # becomes tricky. If we do `@//` the build breaks when this repo 18 # (TensorFlow) is *not* the main repo (i.e. when TensorFlow is used as 19 # a dependency in another workspace). If we hardcode `@org_tensorflow`, 20 # the build breaks when this repo is used in another workspace under a 21 # different name. 22 # 23 # We could generate `build_defs.bzl` to reference this repo by whatever 24 # name it's registered with. Or we could just symlink `build_defs.bzl` 25 # into the `@pasta` repo and then reference it with a repo relative 26 # label; i.e. `//:build_defs.bzl`: 27 link_files = { 28 "//third_party/pasta:build_defs.bzl": "build_defs.bzl", 29 }, 30 ) 31