[build-system] requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" [project] name = "cadgen" version = "0.7.21" description = "STEP-first CAD artifact generation runtime: build123d STEP/GLB/topology generation, validation, and inspection for CAD agent skills." readme = "README.md" license = "MIT" license-files = ["LICENSE"] requires-python = ">=3.11" authors = [{ name = "earthtojake" }] keywords = ["cad", "step", "glb", "build123d", "parametric", "agent-skills"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Manufacturing", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Multimedia :: Graphics :: 3D Modeling", "Topic :: Scientific/Engineering", ] # ezdxf and shapely both look transitive through build123d, and both are kept # DIRECT on purpose: cadgen imports each one itself, so each is its own # dependency regardless of who else happens to pull it in. # # ezdxf stopped being a WRITING dependency when @dxf moved to build123d geometry # (cadgen._internal.dxf_emit) -- the engine writes through build123d's ExportDXF # and no author-facing contract mentions ezdxf. It remains a READING one, which # is not going away: cadgen.drawing_payload flattens a .dxf to draw it (for the # Viewer's pane and for `cadgen dxf snapshot` alike), and cadgen.drawing_checks # parses one to validate it post-hoc. A DXF reader needs a DXF parser. Dropping the declaration would leave those two modules resting on # build123d's own dependency list, and they would fail at a user's runtime, not # at install, the day that list changes. # # shapely is likewise narrower than it was -- flatten's unions and offsets are # OCC operations now, with shapely only the fallback for the degenerate unions # OCC refuses -- but a fallback that is not installed is not a fallback. dependencies = [ # Bounded above on purpose. cadgen does not merely CALL build123d, it # reaches into it: the determinism shim shadows `set` in three topology # modules and replaces `Vertex.__hash__`, and the lazy store replaces # `Compound.__init__` and reads its arguments BY POSITION. A minor release # is free to reorder that signature or rename those choke points, and the # failure mode is silent: a patch that no longer matches simply stops # applying. Raise the ceiling deliberately, after re-running the suite # against the new minor. "build123d>=0.11.1,<0.12", # cadgen imports OCP directly for STEP/XCAF, topology and BREP work. Match # build123d's non-VTK provider: cadgen does not import VTK or cadquery, and # this keeps the optional visualization stack out of every CAD install. "cadquery-ocp-novtk>=7.9,<8", "ezdxf", # @eng_drawing renders its PDF through ezdxf's drawing add-on, whose # matplotlib backend is the page renderer. The add-on also imports Pillow at # module level and ezdxf declares neither, so a cadgen module would otherwise # import packages cadgen does not depend on -- and the drawing IS the PDF, so # neither is optional. "matplotlib", "pillow", # Snapshots render in a headless browser that Playwright drives. A dependency of every # install, not an extra: the CAD plugin's server and every skill run one requirement, # `cadgen==`, so they share one installation and one warm daemon, and a second # requirement (`cadgen[snapshot]`) would be a second installation. Pinned exactly: each # Playwright release fetches its own browser build, so a range would download a new # browser whenever it moved. The browser itself is fetched on the first snapshot # (snapshot_core.install_browser), not by the install. "playwright==1.63.0", "shapely", ] [project.urls] Homepage = "https://github.com/earthtojake/text-to-cad" Repository = "https://github.com/earthtojake/text-to-cad" Issues = "https://github.com/earthtojake/text-to-cad/issues" [project.scripts] cadgen = "cadgen.cli:main" [tool.setuptools.packages.find] where = ["src"] include = ["cadgen*"] [tool.setuptools.package-data] # _runtime holds everything cadgen executes that is not Python: the esbuilt Node # builders, the headless browser bundle the snapshot CLI drives, the CAD Viewer's # built client that `cadgen viewer` serves, and the file tracer every build loads # (one library per platform). It is data, not a subpackage (no __init__), and it is # found at call time by cadgen.assets and cadgen._internal.filetrace. # Verified by scripts/release/check-wheel-contents.sh. cadgen = ["py.typed", "*.pyi", "_runtime/**/*"] # The viewer server's catalog ordering is ICU root collation, read from this table at # runtime; it ships beside the code that reads it. "cadgen.viewer" = ["collation.json"] # The Node builder bridge (cadgen/_internal/node_runtime.py) spawns node with # `--import node_resolve_register.mjs`; both .mjs files must ship with the package. "cadgen._internal" = ["*.mjs"]