Platform-branches the Wine-specific execution so Linux behaves identically while macOS drives LTspice.app natively. Implemented from muel9560's measured spec + validated where possible against a Wine -netlist oracle on Linux. - config.py: get_launch() abstraction (argv prefix + env + path translator); IS_DARWIN, LTSPICE_BIN (env-overridable), LTSPICE_LIB_ROOT under ~/Library/Application Support/LTspice on macOS. Linux resolves to the historical Wine paths unchanged. - runner.py: darwin branch uses the native binary, POSIX paths (no Z: map), plain -b (never -Run), and completion by polling for a stable .raw (the Mac GUI app's exit code is unreliable). Linux keeps communicate()+wait_for. - netlister.py (new): asc_to_netlist() converts a schematic to a netlist on macOS, since the Mac CLI can't netlist a .asc. Union-find net extraction; all 15 templates netlist, topology matches the Wine -netlist oracle. - library_tools.py: check_installation reports platform/binary/lib-root/ version/gui-session on macOS. - packaging/docs: drop 'Linux only'; document LTSPICE_BIN + GUI-session need. Adversarial review fixes: restore kill+reap of the Wine subprocess on Linux timeout (was orphaning the process -- a real regression); alias duplicate net labels instead of aborting (sallen-key); synthesize NC_xx nodes for floating pins (op-amps) to match the oracle; use asyncio.get_running_loop(). Linux unaffected: 476 unit + 10 integration (real Wine) still pass; +48 unit +8 integration for the platform/netlister paths. macOS runtime (LTspice.app invocation, GUI session, poll timing) needs validation on Kevin's hardware.
73 lines
1.8 KiB
TOML
73 lines
1.8 KiB
TOML
[project]
|
|
name = "mcltspice"
|
|
version = "2026.03.05.1"
|
|
description = "MCP server for LTspice circuit simulation automation"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = "MIT"
|
|
authors = [
|
|
{name = "Ryan Malloy", email = "ryan@supported.systems"}
|
|
]
|
|
keywords = ["mcp", "ltspice", "spice", "circuit", "simulation", "electronics"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Science/Research",
|
|
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Operating System :: MacOS",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
|
|
dependencies = [
|
|
"fastmcp>=2.0.0",
|
|
"numpy>=1.24.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"ruff>=0.1.0",
|
|
"pytest>=7.0.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
]
|
|
plot = [
|
|
"matplotlib>=3.7.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
mcltspice = "mcltspice.server:main"
|
|
|
|
[project.urls]
|
|
Repository = "https://git.supported.systems/MCP/mcltspice"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = ["src/mcltspice", "pyproject.toml", "README.md", "LICENSE"]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/mcltspice"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
asyncio_mode = "auto"
|
|
markers = [
|
|
"integration: tests requiring LTspice/Wine installation (deselect with '-m not integration')",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "N", "W", "UP"]
|
|
ignore = ["E501"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/**" = ["N806"] # Allow EE-conventional uppercase vars (K, Q, H, Vpk, etc.)
|