File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,18 @@ def build_extensions(self):
127
127
_add_directory (include_dirs , "/usr/X11/include" )
128
128
129
129
elif sys .platform .startswith ("linux" ):
130
- if platform .processor () == "x86_64" :
130
+ platform_ = platform .processor ()
131
+ if not platform_ :
132
+ platform_ = platform .architecture ()[0 ]
133
+
134
+ if platform_ in ["x86_64" , "64bit" ]:
131
135
_add_directory (library_dirs , "/lib64" )
132
136
_add_directory (library_dirs , "/usr/lib64" )
133
137
_add_directory (library_dirs , "/usr/lib/x86_64-linux-gnu" )
134
- else :
138
+ elif platform_ in [ "i386" , "i686" , "32bit" ] :
135
139
_add_directory (library_dirs , "/usr/lib/i386-linux-gnu" )
140
+ else :
141
+ raise ValueError ("Unable to identify Linux platform: `%s`" % platform_ )
136
142
137
143
# XXX Kludge. Above /\ we brute force support multiarch. Here we
138
144
# try Barry's more general approach. Afterward, something should
You can’t perform that action at this time.
0 commit comments