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
| 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: | 5 |
| Popularity: | 1.11 |
| First Submitted: | 2025-02-04 16:43 (UTC) |
| Last Updated: | 2026-05-15 22:01 (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
@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.
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}"
}
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
@lightdot Now, it should be fixed.
Building 1.10.0-1 fails (clean chroot), first with:
RuntimeError: Error getting the version from source `uv-dynamic-versioning`: Unable to find 'git' program
ERROR Backend subprocess exited when trying to invoke build_wheel
After adding git to makedepends:
RuntimeError: Error getting the version from source `uv-dynamic-versioning`: This does not appear to be a Git project
ERROR Backend subprocess exited when trying to invoke build_wheel
@santzes This is not an issue with the PKGBUILD but an incompatibility between the benchmark test and the python-pytest-xdist package.
Try uninstalling python-pytest-xdist or building in a clean chroot.
Running the tests I get an error:
==> Starting check()...
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/lib/python3.13/site-packages/_pytest/main.py", line 285, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~^^
INTERNALERROR> File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1119, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pluggy/_hooks.py", line 534, in call_historic
INTERNALERROR> res = self._hookexec(self.name, self._hookimpls.copy(), kwargs, False)
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR> raise exception
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pytest_benchmark/plugin.py", line 448, in pytest_configure
INTERNALERROR> bs = config._benchmarksession = BenchmarkSession(config)
INTERNALERROR> ~~~~~~~~~~~~~~~~^^^^^^^^
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pytest_benchmark/session.py", line 65, in __init__
INTERNALERROR> self.logger.warn(
INTERNALERROR> ~~~~~~~~~~~~~~~~^
INTERNALERROR> "Benchmarks are automatically disabled because xdist plugin is active."
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> "Benchmarks cannot be performed reliably in a parallelized environment.",
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> )
INTERNALERROR> ^
INTERNALERROR> File "/usr/lib/python3.13/site-packages/pytest_benchmark/logger.py", line 46, in warn
INTERNALERROR> warner(PytestBenchmarkWarning(text))
INTERNALERROR> ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> pytest_benchmark.logger.PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
==> ERROR: A failure occurred in check().
Aborting...
Might be because I've got python-pytest-xdist installed.
Thanks @Auerhuhn and @medaminezghal! The package upgrades fine now.
Pinned Comments
medaminezghal commented on 2026-05-15 22:58 (UTC)
@everyone I’m working towards making this package automatically updated by GitHub CI, this is my repository used to maintain my packages. Every package before it’s updated should be successfully builded in clean environment (ensured by CI). So if you encounter any errors, just clean the cache and try again. Everyone is welcomed to help improve packaging by making issue or improve the CI by pull request (I’m new to CI, in fact I wrote it using AI, I think it still need improvement, I would be happy if anyone put his experience to help improve the CI).