Skip to content

Commit 80f9590

Browse files
balazsdukaiaothms
authored andcommitted
Get package version from pyproject.toml
1 parent 16cda28 commit 80f9590

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ifccityjson/ifccityjson/cityjson2ifc/cityjson2ifc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# along with ifccityjson. If not, see <http://www.gnu.org/licenses/>.
1919

2020
import os
21+
from importlib.metadata import version as pkg_version
2122
import ifcopenshell
2223
import ifcopenshell.api
2324
from datetime import datetime
@@ -196,7 +197,7 @@ def create_owner_history(self):
196197
"IfcOpenShell, an open source (LGPL) software library that helps users and software developers to work with the IFC file format.",
197198
)
198199
p_o = self.IFC_model.createIfcPersonAndOrganization(person, organization)
199-
application = self.IFC_model.createIfcApplication(organization, "v0.0.x", "ifccityjson", "ifccityjson")
200+
application = self.IFC_model.createIfcApplication(organization, pkg_version("ifccityjson"), "ifccityjson", "ifccityjson")
200201
timestamp = int(datetime.now().timestamp())
201202
ownerHistory = self.IFC_model.createIfcOwnerHistory(p_o, application, "READWRITE", None, None, None, None,
202203
timestamp)

0 commit comments

Comments
 (0)