Skip to content

Commit df361e5

Browse files
committed
Skip macos & windows
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
1 parent 96ad01d commit df361e5

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

tensorflow_io/core/filesystems/BUILD

+7-2
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ cc_library(
3636
linkstatic = True,
3737
deps = [
3838
"//tensorflow_io/core/filesystems/az",
39-
"//tensorflow_io/core/filesystems/dfs",
4039
"//tensorflow_io/core/filesystems/hdfs",
4140
"//tensorflow_io/core/filesystems/http",
4241
"//tensorflow_io/core/filesystems/s3",
43-
],
42+
] + select({
43+
"@bazel_tools//src/conditions:windows": [],
44+
"@bazel_tools//src/conditions:darwin": [],
45+
"//conditions:default": [
46+
"//tensorflow_io/core/filesystems/dfs",
47+
],
48+
}),
4449
alwayslink = 1,
4550
)

tensorflow_io/core/filesystems/dfs/BUILD

+16-7
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,27 @@ load(
99

1010
cc_library(
1111
name = "dfs",
12-
srcs = [
13-
"dfs_filesystem.cc",
14-
"dfs_utils.cc",
15-
"dfs_utils.h",
16-
],
12+
srcs = [] + select({
13+
"@bazel_tools//src/conditions:windows": [],
14+
"@bazel_tools//src/conditions:darwin": [],
15+
"//conditions:default": [
16+
"dfs_filesystem.cc",
17+
"dfs_utils.cc",
18+
"dfs_utils.h",
19+
],
20+
}),
1721
copts = tf_io_copts(),
1822
linkstatic = True,
1923
deps = [
2024
"//tensorflow_io/core/filesystems:filesystem_plugins_header",
2125
"@com_google_absl//absl/strings",
2226
"@com_google_absl//absl/synchronization",
23-
"@daos",
24-
],
27+
] + select({
28+
"@bazel_tools//src/conditions:windows": [],
29+
"@bazel_tools//src/conditions:darwin": [],
30+
"//conditions:default": [
31+
"@daos",
32+
],
33+
}),
2534
alwayslink = 1,
2635
)

tensorflow_io/core/filesystems/filesystem_plugins.cc

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ limitations under the License.
2929
TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
3030
info->plugin_memory_allocate = tensorflow::io::plugin_memory_allocate;
3131
info->plugin_memory_free = tensorflow::io::plugin_memory_free;
32-
info->num_schemes = 8;
32+
info->num_schemes = 7;
33+
#if !defined(__APPLE__) && !defined(_MSC_VER)
34+
info->num_schemes = info->num_schemes + 1;
35+
#endif
3336
info->ops = static_cast<TF_FilesystemPluginOps*>(
3437
tensorflow::io::plugin_memory_allocate(info->num_schemes *
3538
sizeof(info->ops[0])));
@@ -40,5 +43,7 @@ TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
4043
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[4], "hdfs");
4144
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[5], "viewfs");
4245
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[6], "har");
46+
#if !defined(__APPLE__) && !defined(_MSC_VER)
4347
tensorflow::io::dfs::ProvideFilesystemSupportFor(&info->ops[7], "daos");
48+
#endif
4449
}

0 commit comments

Comments
 (0)