Skip to content

Commit bf32025

Browse files
committed
fix install command
1 parent fe8c7e1 commit bf32025

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai-websearch-mcp"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
description = "using openai websearch as mcp server"
55
readme = "README.md"
66
requires-python = ">=3.10"

src/openai_websearch_mcp/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import logging
66
import sys
77
import os
8+
import platform
89
import typer
910
from shutil import which
1011

@@ -120,15 +121,17 @@ def install() -> None:
120121
local_bin = Path(Path.home(), ".local", "bin")
121122
pyenv_shims = Path(Path.home(), ".pyenv", "shims")
122123
path = os.environ['PATH']
124+
python_version = platform.python_version()
125+
python_bin = Path(Path.home(), "Library", "Python", python_version, "bin")
123126
if sys.platform == "win32":
124-
env_dict["PATH"] = f"{local_bin};{pyenv_shims};{path}"
127+
env_dict["PATH"] = f"{local_bin};{pyenv_shims};{python_bin};{path}"
125128
else:
126-
env_dict["PATH"] = f"{local_bin}:{pyenv_shims}:{path}"
129+
env_dict["PATH"] = f"{local_bin}:{pyenv_shims}:{python_bin}:{path}"
127130

128131
api_key = os.environ['OPENAI_API_KEY'] if "OPENAI_API_KEY" in os.environ else "your-api-key-here"
129132
env_dict["OPENAI_API_KEY"] = api_key
130133

131-
uv = which('uvx')
134+
uv = which('uvx', path=env_dict['PATH'])
132135
command = uv if uv else "uvx"
133136
args = [name]
134137

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)