We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a7135f commit 573655eCopy full SHA for 573655e
1 file changed
src/ifcopenshell-python/ifcopenshell/__init__.py
@@ -18,12 +18,25 @@
18
###############################################################################
19
20
import os
21
+import sys
22
+import platform
23
import functools
24
25
from functools import reduce
26
27
from . import guid
-from . import ifcopenshell_wrapper
28
+
29
+python_distribution = os.path.join(platform.system().lower(),
30
+ platform.architecture()[0],
31
+ 'python%s.%s' % platform.python_version_tuple()[:2])
32
+sys.path.append(os.path.abspath(os.path.join(
33
+ os.path.dirname(__file__),
34
+ 'lib', python_distribution)))
35
36
+try:
37
+ from . import ifcopenshell_wrapper
38
+except:
39
+ raise ImportError("IfcOpenShell not built for '%s'" % python_distribution)
40
41
class entity_instance(object):
42
def __init__(self, e):
0 commit comments