mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
Don't use importlib for version
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
# ifccityjson - Python CityJSON to IFC converter
|
||||
# Copyright (C) 2021 Laurens J.N. Oostwegel <l.oostwegel@gmail.com>
|
||||
#
|
||||
@@ -16,5 +15,5 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with ifccityjson. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
__version__ = "0.1.0"
|
||||
from .cityjson2ifc import *
|
||||
@@ -18,12 +18,12 @@
|
||||
# along with ifccityjson. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
from importlib.metadata import version as pkg_version
|
||||
import ifcopenshell
|
||||
import ifcopenshell.api
|
||||
from datetime import datetime
|
||||
|
||||
from .geometry import GeometryIO
|
||||
from . import __version__
|
||||
|
||||
JSON_TO_IFC = {
|
||||
"Building": ["IfcBuilding"],
|
||||
@@ -197,7 +197,7 @@ class Cityjson2ifc:
|
||||
"IfcOpenShell, an open source (LGPL) software library that helps users and software developers to work with the IFC file format.",
|
||||
)
|
||||
p_o = self.IFC_model.createIfcPersonAndOrganization(person, organization)
|
||||
application = self.IFC_model.createIfcApplication(organization, pkg_version("ifccityjson"), "ifccityjson", "ifccityjson")
|
||||
application = self.IFC_model.createIfcApplication(organization, __version__, "ifccityjson", "ifccityjson")
|
||||
timestamp = int(datetime.now().timestamp())
|
||||
ownerHistory = self.IFC_model.createIfcOwnerHistory(p_o, application, "READWRITE", None, None, None, None,
|
||||
timestamp)
|
||||
|
||||
Reference in New Issue
Block a user