Package Details: python-mcp 1.10.1-1

Git Clone URL: https://aur.archlinux.org/python-mcp.git (read-only, click to copy)
Package Base: python-mcp
Description: Model Context Protocol SDK.
Upstream URL: https://github.com/modelcontextprotocol/python-sdk
Licenses: MIT
Submitter: medaminezghal
Maintainer: medaminezghal
Last Packager: medaminezghal
Votes: 2
Popularity: 0.84
First Submitted: 2025-02-04 16:43 (UTC)
Last Updated: 2025-06-27 13:59 (UTC)

Latest Comments

1 2 3 4 Next › Last »

gwuensch commented on 2025-06-27 19:22 (UTC)

@envolution you're right, the MIT license should be installed with the rest of the package.

License families like BSD or MIT are, strictly speaking, not a single license and each instance requires a separate license file. In license variable refer to them using a common SPDX identifier (e.g. BSD-3-Clause or MIT), but then provide the corresponding file as if it was a custom license.

https://wiki.archlinux.org/title/PKGBUILD#license

envolution commented on 2025-06-27 19:10 (UTC) (edited on 2025-06-27 19:26 (UTC) by envolution)

MIT is not included in 'arch common' licences:

$ ls /usr/share/licenses/spdx/MIT*
ls: cannot access '/usr/share/licenses/spdx/MIT*': No such file or directory

you can also use pacman-contrib's updpkgsums in the PKGBUILD root to update shasums for multiple sources incl git

gwuensch commented on 2025-06-27 16:02 (UTC) (edited on 2025-06-27 16:02 (UTC) by gwuensch)

@medaminezghal makepkg -g is able to generate checksums for git repos when referencing stable tags or commits, see https://wiki.archlinux.org/title/VCS_package_guidelines#Git_checksums

lightdot commented on 2025-06-27 15:50 (UTC)

@medaminezghal, I haven't tried yet but looks like @gwuensch did, so I'm sure it's OK. Like mentioned, it's not an ideal approach because the build now skips the sha256sum test, but it's not the end of the world...

If you're not building packages in a clean chroot, I'd recommend it. Not just to catch build errors, but to keep your system clean...

Thanks for working on this package.

medaminezghal commented on 2025-06-27 14:01 (UTC)

@gwuensch thanks, it works well. But, how can I get the checksum of the source or I need just to skip it?

@lightdot What about now, did it work?

gwuensch commented on 2025-06-27 13:13 (UTC)

I'm not sure if this is best practice for a non-VCS (as in statically versioned) package, but it seems like the obvious solution is to switch to a git source, as git is a dependency anyway:

source=("${pkgname//mcp/sdk}-${pkgver}::git+${url}.git#tag=v${pkgver}")
sha256sums=('bce029d3f7c8b3fdab74a91c9c02b12ceed133777786fd2af2ee2847d9f5a559')

Builds in a clean chroot and git tag isn't required.

lightdot commented on 2025-06-27 08:31 (UTC)

It still doesn't build as is, with the latest 1.10.0-4 PKGBUILD:

fatal: not a git repository (or any of the parent directories): .git

medaminezghal commented on 2025-06-27 04:39 (UTC)

@envolution the git command used to make sure that uv-dynamic-versioning find the right version to build it.

I think that installing LICENSE file isn't necessary for common licenses.

envolution commented on 2025-06-26 22:58 (UTC)

Not sure why the git commands are even in there.

Some suggested changes - use named and versioned tarballs for caching, clear venv before trying to (re)create it, and include the MIT license as required

--- /tmp/1      2025-06-26 18:55:08.914857958 -0400
+++ PKGBUILD    2025-06-26 18:55:34.500402733 -0400
@@ -8,7 +8,7 @@
 arch=('any')
 url='https://github.com/modelcontextprotocol/python-sdk'
 license=('MIT')
-source=("${url}/archive/refs/tags/v${pkgver}.tar.gz")
+source=($pkgname-$pkgver.tar.gz::"${url}/archive/refs/tags/v${pkgver}.tar.gz")
 sha256sums=('205470d15bb2bc95dcb932f9bd3f125a15aa566baa154dfff7fc423d72c58a93')
 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')
@@ -23,8 +23,6 @@

 build() {
   cd "${srcdir}"/${pkgname//mcp/sdk}-${pkgver}
-  git tag -d v${pkgver}
-  git tag v${pkgver}
   python -m build --wheel --no-isolation
 }

@@ -33,6 +31,7 @@
     -vv
   )
   cd "${srcdir}"/${pkgname//mcp/sdk}-${pkgver}
+  rm -rf test-env
   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
@@ -42,4 +41,5 @@
 package() {
   cd "${srcdir}"/${pkgname//mcp/sdk}-$pkgver
   python -m installer --destdir="$pkgdir" dist/*.whl
+  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }

kr3c1k commented on 2025-06-26 21:35 (UTC)

Hello, how can I deal with this error?


==> Removing existing $pkgdir/ directory...
==> Starting build()...
error: tag 'v1.10.0' not found.
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'python-mcp-1.10.0-3': 
error: packages failed to build: python-mcp-1.10.0-3