From aba8683d5eea9157dfae4e119ceae86bca7494a6 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 8 Apr 2024 11:57:21 +1000 Subject: [PATCH] Fix #4303. Declare dependencies for ifctester. --- src/bsdd/Makefile | 18 ++++++++++++++++++ src/ifcopenshell-python/pyproject.toml | 2 +- src/ifctester/ifctester/reporter.py | 4 ++-- src/ifctester/pyproject.toml | 4 +--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/bsdd/Makefile b/src/bsdd/Makefile index 597a8ccb99..6880922653 100644 --- a/src/bsdd/Makefile +++ b/src/bsdd/Makefile @@ -1,3 +1,21 @@ +# bSDD - Python bSDD library +# Copyright (C) 2021 Dion Moult +# +# This file is part of bSDD. +# +# bSDD is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# bSDD is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with bSDD. If not, see . + VERSION:=`date '+%y%m%d'` SED:=sed -i ifeq ($(UNAME_S),Darwin) diff --git a/src/ifcopenshell-python/pyproject.toml b/src/ifcopenshell-python/pyproject.toml index 816bb98817..5cdb5a275c 100644 --- a/src/ifcopenshell-python/pyproject.toml +++ b/src/ifcopenshell-python/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", ] [project.optional-dependencies] -geometry = ["mathutils", "shapely"] +geometry = ["mathutils", "shapely", "numpy"] date = ["isodate", "dateutil"] [project.urls] "Homepage" = "http://ifcopenshell.org" diff --git a/src/ifctester/ifctester/reporter.py b/src/ifctester/ifctester/reporter.py index ae4a3f5bee..e65ea71d10 100644 --- a/src/ifctester/ifctester/reporter.py +++ b/src/ifctester/ifctester/reporter.py @@ -21,11 +21,9 @@ import sys import math import logging import datetime -import numpy as np import ifcopenshell import ifcopenshell.util.unit import ifcopenshell.util.element -import ifcopenshell.util.placement cwd = os.path.dirname(os.path.realpath(__file__)) @@ -431,6 +429,8 @@ class Bcf(Json): ] def to_file(self, filepath: str) -> None: + import numpy as np + import ifcopenshell.util.placement from bcf.v2.bcfxml import BcfXml unit_scale = None diff --git a/src/ifctester/pyproject.toml b/src/ifctester/pyproject.toml index 0f7366efce..d5adce1193 100644 --- a/src/ifctester/pyproject.toml +++ b/src/ifctester/pyproject.toml @@ -15,9 +15,7 @@ classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", ] -dependencies = [ - "ifcopenshell", -] +dependencies = ["ifcopenshell", "dateutil", "xmlschema", "numpy"] [project.urls] Homepage = "http://ifcopenshell.org"