forked from AI_MCP/python-mcp
Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
8dd07ab873
|
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
|
_build.*
|
||||||
*.obscpio
|
*.obscpio
|
||||||
*.osc
|
*.osc
|
||||||
_build.*
|
|
||||||
_service:*
|
|
||||||
.pbuild
|
.pbuild
|
||||||
|
_service:*
|
||||||
|
python-mcp-*-build/
|
||||||
|
|||||||
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 2 17:31:21 UTC 2026 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Restore tests again.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 2 11:47:16 UTC 2026 - Egbert Eich <eich@suse.com>
|
Mon Feb 2 11:47:16 UTC 2026 - Egbert Eich <eich@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,17 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
|
||||||
|
|
||||||
Name: python-mcp
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-mcp%{psuffix}
|
||||||
Version: 1.26.0
|
Version: 1.26.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python implementation of the Model Context Protocol
|
Summary: Python implementation of the Model Context Protocol
|
||||||
@@ -34,6 +44,9 @@ BuildRequires: python-rpm-macros
|
|||||||
Requires: python-anyio >= 4.5
|
Requires: python-anyio >= 4.5
|
||||||
Requires: python-httpx >= 0.27
|
Requires: python-httpx >= 0.27
|
||||||
Requires: python-httpx-sse >= 0.4
|
Requires: python-httpx-sse >= 0.4
|
||||||
|
# From PyJWT[crypto]
|
||||||
|
Requires: python-cryptography >= 3.4.0
|
||||||
|
Requires: python-jsonschema >= 4.20.0
|
||||||
Requires: python-pydantic >= 2.7.2
|
Requires: python-pydantic >= 2.7.2
|
||||||
Requires: python-pydantic-settings >= 2.5.2
|
Requires: python-pydantic-settings >= 2.5.2
|
||||||
Requires: python-python-multipart >= 0.0.9
|
Requires: python-python-multipart >= 0.0.9
|
||||||
@@ -41,6 +54,23 @@ Requires: python-sse-starlette >= 1.6.1
|
|||||||
Requires: python-starlette >= 0.27
|
Requires: python-starlette >= 0.27
|
||||||
Requires: python-uvicorn >= 0.23.1
|
Requires: python-uvicorn >= 0.23.1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module PyJWT}
|
||||||
|
BuildRequires: %{python_module dirty-equals}
|
||||||
|
BuildRequires: %{python_module inline-snapshot}
|
||||||
|
BuildRequires: %{python_module jsonschema}
|
||||||
|
BuildRequires: %{python_module mcp = %{version}}
|
||||||
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
|
BuildRequires: %{python_module pytest-examples}
|
||||||
|
BuildRequires: %{python_module pytest-timeout}
|
||||||
|
BuildRequires: %{python_module pytest-xdist}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module requests >= 2.32.3}
|
||||||
|
BuildRequires: %{python_module trio}
|
||||||
|
BuildRequires: %{python_module typer}
|
||||||
|
BuildRequires: %{python_module uv >= 0.7.2}
|
||||||
|
BuildRequires: %{python_module websockets}
|
||||||
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -49,11 +79,12 @@ for python.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Executables for %{name}
|
Summary: Executables for %{name}
|
||||||
Conflicts: mmv
|
BuildRequires: alts
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Recommends: python-uv
|
Recommends: python-uv
|
||||||
Recommends: npm
|
Recommends: npm
|
||||||
|
Conflicts: mmv
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains the executables for %{name}.
|
This package contains the executables for %{name}.
|
||||||
@@ -62,13 +93,40 @@ This package contains the executables for %{name}.
|
|||||||
%autosetup -p1 -n mcp-%{version}
|
%autosetup -p1 -n mcp-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{without test}
|
||||||
|
# This is an ugly hack, should not be necessary, but is to build on SLE 15 with Python 3.11
|
||||||
|
# MgE, 2025-06-19
|
||||||
|
%if 0%{?suse_version} < 1600
|
||||||
|
sed -i -e "s/3.12/3.11/g" pyproject.toml
|
||||||
|
sed -i -e "s/3.13/3.11/g" pyproject.toml
|
||||||
|
%endif
|
||||||
|
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without test}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%fdupes %{buildroot}%{python_sitelib}
|
%fdupes %{buildroot}%{python_sitelib}
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%python_clone -a %{buildroot}%{_bindir}/mcp
|
%python_clone -a %{buildroot}%{_bindir}/mcp
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %{with test}
|
||||||
|
sed -i 's/"python"/"python3"/' tests/client/test_stdio.py
|
||||||
|
# test_command_execution needs full package including docs
|
||||||
|
donttest="test_command_execution"
|
||||||
|
# https://github.com/modelcontextprotocol/python-sdk/commit/17f9c00c53b4463ac1a449d601c2d181664ab857 dropped test_build_metadata[with-path-param]
|
||||||
|
donttest+=" or test_build_metadata[with-path-param]"
|
||||||
|
# test_client_session_version_negotiation_failure failure probably related to https://github.com/modelcontextprotocol/python-sdk/issues/1018
|
||||||
|
donttest+=" or test_client_session_version_negotiation_failure"
|
||||||
|
# flaky tests on aarch64
|
||||||
|
donttest+=" or test_streamablehttp_client_get_stream or test_streamablehttp_client_resumption"
|
||||||
|
%pytest -k "not ($donttest or OAuth)"
|
||||||
|
# problems with unawaited coroutines
|
||||||
|
%pytest -k "OAuth" --asyncio-mode=auto
|
||||||
|
%endif
|
||||||
|
|
||||||
%post devel
|
%post devel
|
||||||
%python_expand %python_install_alternative mcp
|
%python_expand %python_install_alternative mcp
|
||||||
@@ -76,6 +134,7 @@ This package contains the executables for %{name}.
|
|||||||
%postun devel
|
%postun devel
|
||||||
%python_expand %python_uninstall_alternative mcp
|
%python_expand %python_uninstall_alternative mcp
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
@@ -85,5 +144,6 @@ This package contains the executables for %{name}.
|
|||||||
%files %{python_files devel}
|
%files %{python_files devel}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/mcp
|
%python_alternative %{_bindir}/mcp
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user