summaryrefslogtreecommitdiff
path: root/sci-libs/tensorflow/files/tensorflow-1.14.0-0001-systemlibs-unbundle-enum34.patch
blob: a220bca57d69d449275e041e1707ae1d59551553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 2956ac52f8495e08d5328f672c1366c52c9f8cfe Mon Sep 17 00:00:00 2001
From: Jason Zaman <jason@perfinion.com>
Date: Wed, 29 May 2019 19:27:11 +0800
Subject: [PATCH] systemlibs: unbundle enum34

Signed-off-by: Jason Zaman <jason@perfinion.com>
---
 tensorflow/workspace.bzl                     |  1 +
 third_party/systemlibs/enum34.BUILD          | 14 ++++++++++++++
 third_party/systemlibs/syslibs_configure.bzl |  1 +
 3 files changed, 16 insertions(+)
 create mode 100644 third_party/systemlibs/enum34.BUILD

diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
index 55d7eb9371..a53a12e720 100755
--- a/tensorflow/workspace.bzl
+++ b/tensorflow/workspace.bzl
@@ -346,6 +346,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
         ],
         sha256 = "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
         build_file = clean_dep("//third_party:enum34.BUILD"),
+        system_build_file = clean_dep("//third_party/systemlibs:enum34.BUILD"),
         strip_prefix = "enum34-1.1.6/enum",
     )
 
diff --git a/third_party/systemlibs/enum34.BUILD b/third_party/systemlibs/enum34.BUILD
new file mode 100644
index 0000000000..de14bd5641
--- /dev/null
+++ b/third_party/systemlibs/enum34.BUILD
@@ -0,0 +1,14 @@
+# Description:
+#   enum34 provides a backport of the enum module for Python 2.
+
+licenses(["notice"])  # MIT
+
+filegroup(
+    name = "LICENSE",
+    visibility = ["//visibility:public"],
+)
+
+py_library(
+    name = "enum",
+    visibility = ["//visibility:public"],
+)
diff --git a/third_party/systemlibs/syslibs_configure.bzl b/third_party/systemlibs/syslibs_configure.bzl
index a2d4123fd6..16f3b09697 100644
--- a/third_party/systemlibs/syslibs_configure.bzl
+++ b/third_party/systemlibs/syslibs_configure.bzl
@@ -21,6 +21,7 @@ VALID_LIBS = [
     "curl",
     "cython",
     "double_conversion",
+    "enum34_archive",
     "flatbuffers",
     "gast_archive",
     "gif_archive",
-- 
2.21.0