Added explicit support for Mac OS.

This commit is contained in:
Jeremy Wright 2014-12-05 23:42:25 -05:00
parent de3d4ea8a7
commit 326c02cd0f

View File

@ -37,6 +37,7 @@ def _fc_path():
os.path.join(os.path.expanduser("~"), "lib/freecad/lib"),
"/usr/local/lib/freecad/lib",
"/usr/lib/freecad/lib",
"/opt/freecad/lib/",
"/usr/bin/freecad/lib",
]:
if os.path.exists(_PATH):
@ -84,6 +85,14 @@ def _fc_path():
]:
if os.path.exists(_PATH):
return _PATH
else:
#Assume we're dealing with a Mac
for _PATH in [
os.path.join(os.path.expanduser("~"), "Library/Application Support/FreeCAD/lib"),
"/Applications/FreeCAD.app/lib",
]:
if os.path.exists(_PATH):
return _PATH
#Make sure that the correct FreeCAD path shows up in Python's system path
sys.path.insert(0, _fc_path())
sys.path.insert(0, _fc_path())