Skip to content

Commit 3dd9896

Browse files
Fix release MCP launcher resolution
1 parent 05196e1 commit 3dd9896

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

scripts/smoke_installed_wheel.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,21 @@ def main() -> int:
157157
"wellplot MCP example manifest did not expose the expected examples."
158158
)
159159

160-
server_command_text = shutil.which("wellplot-mcp")
161-
server_command = Path(server_command_text).resolve() if server_command_text else None
160+
python_executable = Path(sys.executable)
161+
search_path = os.pathsep.join(
162+
path for path in [str(python_executable.parent), os.environ.get("PATH", "")] if path
163+
)
164+
server_command_text = shutil.which("wellplot-mcp", path=search_path)
165+
server_command = Path(server_command_text) if server_command_text else None
162166
server_args: list[str] = []
163167
if server_command is None:
164-
server_command = Path(sys.executable).resolve().with_name("wellplot-mcp")
168+
server_command = python_executable.with_name("wellplot-mcp")
165169
if not server_command.exists():
166170
candidate = server_command.with_suffix(".exe")
167171
if candidate.exists():
168172
server_command = candidate
169173
else:
170-
server_command = Path(sys.executable).resolve()
174+
server_command = python_executable
171175
server_args = ["-m", "wellplot.mcp.server"]
172176

173177
async def _exercise_stdio_server() -> None:

0 commit comments

Comments
 (0)