mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-31 08:56:34 +00:00
ad6f9bbbf6
The Optimise recipe imported `toposort`, a third-party PyPI package that
is not bundled with Bonsai, so running the recipe there raised
`ModuleNotFoundError: No module named 'toposort'`.
Replace it with the standard library `graphlib.TopologicalSorter`
(available since Python 3.9), which provides the same dependencies-first
ordering guarantee the recipe relies on: forward-referenced instances are
mapped before the instances that reference them. The dependency-graph
dict format ({node: {predecessors}}) is identical between the two, so the
graph construction is unchanged. Drop `toposort` from ifcpatch's
dependencies since it is no longer used.
Verified with toposort NOT installed: the Optimise recipe now runs and
deduplicates correctly (IfcParseExamples_test.ifc 88 -> 63 instances, all
6 products preserved, output reopens cleanly).
Generated with the assistance of an AI coding tool.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 382f5e0c21)
42 lines
947 B
TOML
42 lines
947 B
TOML
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "ifcpatch"
|
|
version = "0.0.0"
|
|
authors = [
|
|
{ name="Dion Moult", email="dion@thinkmoult.com" },
|
|
]
|
|
description = "Utility for applying modification recipes to IFC files"
|
|
readme = "README.md"
|
|
keywords = ["IFC", "BIM"]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
|
|
]
|
|
dependencies = ["ifcopenshell", "numpy"]
|
|
|
|
[project.optional-dependencies]
|
|
advanced = [
|
|
"sqlite3",
|
|
"mysql-connector-python",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "http://ifcopenshell.org"
|
|
Documentation = "https://docs.ifcopenshell.org"
|
|
Issues = "https://github.com/IfcOpenShell/IfcOpenShell/issues"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["ifcpatch*"]
|
|
exclude = ["test*"]
|
|
|
|
[tool.ruff]
|
|
extend = "../../pyproject.toml"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"F401", # unused imports
|
|
]
|