Skip to content

Commit 7866759

Browse files
committed
Merge pull request #60 from Sapphire64/master
Py3k libraries path fix (issue #41)
2 parents 001a152 + c44994b commit 7866759

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,18 @@ def build_extensions(self):
127127
_add_directory(include_dirs, "/usr/X11/include")
128128

129129
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"]:
131135
_add_directory(library_dirs, "/lib64")
132136
_add_directory(library_dirs, "/usr/lib64")
133137
_add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu")
134-
else:
138+
elif platform_ in ["i386", "i686", "32bit"]:
135139
_add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
140+
else:
141+
raise ValueError("Unable to identify Linux platform: `%s`" % platform_)
136142

137143
# XXX Kludge. Above /\ we brute force support multiarch. Here we
138144
# try Barry's more general approach. Afterward, something should

0 commit comments

Comments
 (0)