blob: 3c63c848c87610e408048761923fbb456f6c4bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Maintainer: Mohamed Amine Zghal (medaminezghal) <medaminezghal at outlook dot com>
_name=mcp
pkgname=python-${_name}
pkgver=1.10.1
pkgrel=1
pkgdesc='Model Context Protocol SDK.'
arch=('any')
url='https://github.com/modelcontextprotocol/python-sdk'
license=('MIT')
source=("${_name}-${pkgver}::git+${url}.git#tag=v${pkgver}")
sha256sums=('SKIP')
depends=('python' 'python-anyio' 'python-httpx' 'python-httpx-sse' 'python-pydantic' 'python-starlette' 'python-python-multipart' 'python-sse-starlette' 'python-pydantic-settings' 'uvicorn' 'python-jsonschema')
makedepends=('python-hatchling' 'python-uv-dynamic-versioning' 'python-build' 'python-installer' 'python-wheel' 'git')
checkdepends=('python-pytest' 'ruff' 'python-trio' 'python-pytest-flakefinder' 'python-pytest-xdist' 'python-pytest-examples' 'python-inline-snapshot' 'python-rich' 'python-typer' 'python-dotenv' 'python-websockets' 'python-requests' 'uv')
optdepends=('python-rich: rich' 'python-typer: cli' 'python-dotenv: cli' 'python-websockets: ws')
prepare(){
cd "${srcdir}"/${_name}-${pkgver}
sed -i 's/timeout=5/timeout=60/' tests/client/test_config.py # Increate time limit
sed -i "206i\ 'additionalProperties': True," tests/server/fastmcp/test_func_metadata.py # Fix for pydantic 2.11
}
build() {
cd "${srcdir}"/${_name}-${pkgver}
python -m build --wheel --no-isolation
}
check() {
local pytest_options=(
-vv
)
cd "${srcdir}"/${_name}-${pkgver}
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
ln -sf /usr/bin/ruff test-env/bin/ruff
UV_PROJECT_ENVIRONMENT=test-env UV_PYTHON_PREFERENCE=only-system test-env/bin/python -m pytest "${pytest_options[@]}" tests
}
package() {
cd "${srcdir}"/${_name}-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
}
|