From df886b3a6b29e14efc1a195f34a8d922248b1fec Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 12 Sep 2020 11:08:31 +0200 Subject: [PATCH] Add missing express module init --- .../ifcopenshell/express/__init__.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/ifcopenshell-python/ifcopenshell/express/__init__.py diff --git a/src/ifcopenshell-python/ifcopenshell/express/__init__.py b/src/ifcopenshell-python/ifcopenshell/express/__init__.py new file mode 100644 index 0000000000..2b3c80b285 --- /dev/null +++ b/src/ifcopenshell-python/ifcopenshell/express/__init__.py @@ -0,0 +1,20 @@ +import os +import sys +import subprocess + +d = os.path.abspath(os.path.dirname(__file__)) +sys.path.append(d) + +exp_parser_fn = os.path.join(d, "express_parser.py") + +if not os.path.exists(exp_parser_fn): + with open(exp_parser_fn, "w") as f: + subprocess.call([sys.executable, "bootstrap.py"], cwd=d, stdout=f) + +import express_parser +import schema_class +import ifcopenshell.ifcopenshell_wrapper + +def parse(fn): + mapping = express_parser.parse(fn) + return schema_class.SchemaClass(mapping, schema_class.LateBoundSchemaInstantiator).code