This commit is contained in:
moeb 2015-05-15 13:12:40 +02:00
parent d36e5a10b7
commit 205a6ef01a

View File

@ -96,10 +96,17 @@ def _fc_path():
return _PATH
#Make sure that the correct FreeCAD path shows up in Python's system path
no_library_path = ImportError('cadquery was unable to determine freecads library path')
try:
import FreeCAD
except ImportError:
#Make sure that the correct FreeCAD path shows up in Python's system path
path = _fc_path()
if path: sys.path.insert(0, _fc_path())
else: raise ImportError('cadquery was unable to determine freecads library path')
if path:
sys.path.insert(0, _fc_path())
try:
import FreeCAD
except ImportError:
raise no_library_path
else: raise no_library_path