Skip to content

Commit

Permalink
Skip macos & windows
Browse files Browse the repository at this point in the history
Signed-off-by: Yong Tang <[email protected]>
  • Loading branch information
yongtang committed Jul 26, 2022
1 parent 96ad01d commit df361e5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
9 changes: 7 additions & 2 deletions tensorflow_io/core/filesystems/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ cc_library(
linkstatic = True,
deps = [
"//tensorflow_io/core/filesystems/az",
"//tensorflow_io/core/filesystems/dfs",
"//tensorflow_io/core/filesystems/hdfs",
"//tensorflow_io/core/filesystems/http",
"//tensorflow_io/core/filesystems/s3",
],
] + select({
"@bazel_tools//src/conditions:windows": [],
"@bazel_tools//src/conditions:darwin": [],
"//conditions:default": [
"//tensorflow_io/core/filesystems/dfs",
],
}),
alwayslink = 1,
)
23 changes: 16 additions & 7 deletions tensorflow_io/core/filesystems/dfs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,27 @@ load(

cc_library(
name = "dfs",
srcs = [
"dfs_filesystem.cc",
"dfs_utils.cc",
"dfs_utils.h",
],
srcs = [] + select({
"@bazel_tools//src/conditions:windows": [],
"@bazel_tools//src/conditions:darwin": [],
"//conditions:default": [
"dfs_filesystem.cc",
"dfs_utils.cc",
"dfs_utils.h",
],
}),
copts = tf_io_copts(),
linkstatic = True,
deps = [
"//tensorflow_io/core/filesystems:filesystem_plugins_header",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@daos",
],
] + select({
"@bazel_tools//src/conditions:windows": [],
"@bazel_tools//src/conditions:darwin": [],
"//conditions:default": [
"@daos",
],
}),
alwayslink = 1,
)
7 changes: 6 additions & 1 deletion tensorflow_io/core/filesystems/filesystem_plugins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ limitations under the License.
TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
info->plugin_memory_allocate = tensorflow::io::plugin_memory_allocate;
info->plugin_memory_free = tensorflow::io::plugin_memory_free;
info->num_schemes = 8;
info->num_schemes = 7;
#if !defined(__APPLE__) && !defined(_MSC_VER)
info->num_schemes = info->num_schemes + 1;
#endif
info->ops = static_cast<TF_FilesystemPluginOps*>(
tensorflow::io::plugin_memory_allocate(info->num_schemes *
sizeof(info->ops[0])));
Expand All @@ -40,5 +43,7 @@ TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[4], "hdfs");
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[5], "viewfs");
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[6], "har");
#if !defined(__APPLE__) && !defined(_MSC_VER)
tensorflow::io::dfs::ProvideFilesystemSupportFor(&info->ops[7], "daos");
#endif
}

0 comments on commit df361e5

Please sign in to comment.