From a03cb0b16d1457751e06e855b688da1d0cfea4af Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Thu, 10 Apr 2025 08:56:07 -0700 Subject: [PATCH] CLI: Ensure correct api version is used (#4237) Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> --- libs/cli/langgraph_cli/config.py | 7 ++++++- libs/cli/pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/cli/langgraph_cli/config.py b/libs/cli/langgraph_cli/config.py index 29807dae0..9cd135ff2 100644 --- a/libs/cli/langgraph_cli/config.py +++ b/libs/cli/langgraph_cli/config.py @@ -406,7 +406,12 @@ class Config(TypedDict, total=False): """ -PIP_CLEANUP_LINES = """# -- Removing pip from the final image ~<:===~~~ -- +PIP_CLEANUP_LINES = """# -- Ensure user deps didn't inadvertently overwrite langgraph-api +RUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license && \ + touch /api/langgraph_api/__init__.py /api/langgraph_runtime/__init__.py /api/langgraph_license/__init__.py +RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir --no-deps -e /api +# -- End of ensuring user deps didn't inadvertently overwrite langgraph-api -- +# -- Removing pip from the final image ~<:===~~~ -- RUN pip uninstall -y pip setuptools wheel && \ rm -rf /usr/local/lib/python*/site-packages/pip* /usr/local/lib/python*/site-packages/setuptools* /usr/local/lib/python*/site-packages/wheel* && \ find /usr/local/bin -name "pip*" -delete diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index b14b12541..6da8e0c1e 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.2.0" +version = "0.2.1" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT"