File tree 1 file changed +9
-0
lines changed 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ def is_windows():
44
44
return platform .system () == "Windows"
45
45
46
46
47
+ def is_raspi_arm ():
48
+ return os .uname ()[4 ] == "armv7l"
49
+
50
+
47
51
def get_tf_header_dir ():
48
52
import tensorflow as tf
49
53
@@ -60,6 +64,8 @@ def get_tf_shared_lib_dir():
60
64
if is_windows ():
61
65
tf_shared_lib_dir = tf .sysconfig .get_compile_flags ()[0 ][2 :- 7 ] + "python"
62
66
return tf_shared_lib_dir .replace ("\\ " , "/" )
67
+ elif is_raspi_arm ():
68
+ return tf .sysconfig .get_compile_flags ()[0 ][2 :- 7 ] + "python"
63
69
else :
64
70
return tf .sysconfig .get_link_flags ()[0 ][2 :]
65
71
@@ -75,6 +81,9 @@ def get_shared_lib_name():
75
81
elif is_windows ():
76
82
# Windows
77
83
return "_pywrap_tensorflow_internal.lib"
84
+ elif is_raspi_arm ():
85
+ # The below command for linux would return an empty list
86
+ return "_pywrap_tensorflow_internal.so"
78
87
else :
79
88
# Linux
80
89
return namespec [1 ][3 :]
You can’t perform that action at this time.
0 commit comments