Compare commits
10 Commits
2023.0.0a2
...
obs
| Author | SHA1 | Date | |
|---|---|---|---|
| cb9dd1de5e | |||
|
|
a3ebdc03c8 | ||
|
|
eb4f8a5344 | ||
|
|
756131f41d | ||
|
|
f38811a749 | ||
|
|
31d81e58ba | ||
|
|
94b4c2287c | ||
|
|
e359870b75 | ||
|
|
7d216edc50 | ||
|
|
6c4a589f0f |
19
.SRCINFO
Normal file
19
.SRCINFO
Normal file
@@ -0,0 +1,19 @@
|
||||
pkgbase = python-lsprotocol
|
||||
pkgdesc = Python types for Language Server Protocol
|
||||
pkgver = 2023.0.1
|
||||
pkgrel = 3
|
||||
url = https://github.com/microsoft/lsprotocol
|
||||
arch = any
|
||||
license = MIT
|
||||
checkdepends = python-jsonschema
|
||||
checkdepends = python-pyhamcrest
|
||||
checkdepends = python-pytest
|
||||
makedepends = git
|
||||
makedepends = python-build
|
||||
makedepends = python-flit-core
|
||||
makedepends = python-installer
|
||||
depends = python-cattrs
|
||||
source = git+https://github.com/microsoft/lsprotocol.git#tag=2023.0.1
|
||||
b2sums = 8e3ce2c021a8e170aaa05fb7ff8d25136d26a88977d070fa5f1c29616199c50e7fb2e401597dfe16b16e61e381923a6aa5df326624ac03258dc33028d17d4312
|
||||
|
||||
pkgname = python-lsprotocol
|
||||
4
.nvchecker.toml
Normal file
4
.nvchecker.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[python-lsprotocol]
|
||||
source = "git"
|
||||
git = "https://github.com/microsoft/lsprotocol.git"
|
||||
exclude_regex = ".*(pre|a|alpha|b|beta|rc).*"
|
||||
12
LICENSE
Normal file
12
LICENSE
Normal file
@@ -0,0 +1,12 @@
|
||||
Copyright Arch Linux Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for
|
||||
any purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
||||
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
1
LICENSES/0BSD.txt
Symbolic link
1
LICENSES/0BSD.txt
Symbolic link
@@ -0,0 +1 @@
|
||||
../LICENSE
|
||||
29
PKGBUILD
29
PKGBUILD
@@ -1,36 +1,45 @@
|
||||
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
|
||||
|
||||
_name=lsprotocol
|
||||
pkgname=python-lsprotocol
|
||||
pkgver=2023.0.0a2
|
||||
pkgrel=1
|
||||
pkgdesc='Python implementation of the Language Server Protocol'
|
||||
_name=${pkgname#python-}
|
||||
pkgver=2025.0.0
|
||||
pkgrel=3
|
||||
pkgdesc='Python types for Language Server Protocol'
|
||||
arch=('any')
|
||||
url=https://github.com/microsoft/lsprotocol
|
||||
license=('MIT')
|
||||
depends=('python-cattrs')
|
||||
makedepends=('git' 'python-build' 'python-flit-core' 'python-installer')
|
||||
checkdepends=('python-jsonschema' 'python-pyhamcrest' 'python-pytest')
|
||||
source=("git+$url.git?tag=$pkgver")
|
||||
b2sums=('SKIP')
|
||||
source=("git+$url.git#tag=$pkgver")
|
||||
b2sums=('ea9f4e871d68f62f174d2f8e2efad7bc6b9c4f54216022047e425531525c676577e4bdd657e8eaad86eea944ab6d996da5ae80badc929910b849b52c0ecd9bb2')
|
||||
|
||||
build() {
|
||||
cd $_name/packages/python
|
||||
cd "$_name"/packages/python
|
||||
python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $_name
|
||||
cd "$_name"
|
||||
pytest tests/python
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $_name/packages/python
|
||||
cd "$_name"/packages/python
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
|
||||
# Symlink license file
|
||||
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
||||
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
||||
ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
|
||||
ln -s "$site_packages"/"$_name"-$pkgver.dist-info/LICENSE \
|
||||
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
||||
source[0]="$_name.tar.xz"
|
||||
b2sums[0]="SKIP"
|
||||
source+=('cattrs-25.patch')
|
||||
b2sums+=('2488085c60aa113192beb749e13703654fd8ec459013a94bbf855ec5b887986e7425cfea60e41ef88cfd98fbda6d3a57b775e944c1192bd5d9928cc96decaacf')
|
||||
prepare(){
|
||||
cd "$_name"
|
||||
patch -p1 < $srcdir/cattrs-25.patch
|
||||
}
|
||||
|
||||
22
REUSE.toml
Normal file
22
REUSE.toml
Normal file
@@ -0,0 +1,22 @@
|
||||
version = 1
|
||||
|
||||
[[annotations]]
|
||||
path = [
|
||||
"PKGBUILD",
|
||||
"README.md",
|
||||
"keys/**",
|
||||
".SRCINFO",
|
||||
".nvchecker.toml",
|
||||
"*.install",
|
||||
"*.sysusers",
|
||||
"*.tmpfiles",
|
||||
"*.logrotate",
|
||||
"*.pam",
|
||||
"*.service",
|
||||
"*.socket",
|
||||
"*.timer",
|
||||
"*.desktop",
|
||||
"*.hook",
|
||||
]
|
||||
SPDX-FileCopyrightText = "Arch Linux contributors"
|
||||
SPDX-License-Identifier = "0BSD"
|
||||
14
_service
Normal file
14
_service
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<services>
|
||||
<service name="tar_scm">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/microsoft/lsprotocol.git</param>
|
||||
<param name="filename">lsprotocol</param>
|
||||
<param name="revision">refs/tags/2025.0.0</param>
|
||||
<param name="version">_none_</param>
|
||||
</service>
|
||||
<service name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
</services>
|
||||
40
cattrs-25.patch
Normal file
40
cattrs-25.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 7b5d4f7422bfe4c597b8124f99861e751d47f153 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksandr Dovydenkov <asd@altlinux.org>
|
||||
Date: Fri, 26 Sep 2025 10:29:26 +0300
|
||||
Subject: [PATCH] Add support cattrs>=25.0.0.
|
||||
|
||||
Breaking on update to cattrs version 25.1.0. See: https://catt.rs/en/latest/migrations.html#the-default-structure-hook-fallback-factory
|
||||
---
|
||||
packages/python/lsprotocol/converters.py | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/python/lsprotocol/converters.py b/packages/python/lsprotocol/converters.py
|
||||
index db12c65..47ba036 100644
|
||||
--- a/packages/python/lsprotocol/converters.py
|
||||
+++ b/packages/python/lsprotocol/converters.py
|
||||
@@ -1,6 +1,7 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
+from importlib.metadata import version
|
||||
from typing import Optional
|
||||
|
||||
import cattrs
|
||||
@@ -8,10 +9,16 @@
|
||||
from . import _hooks
|
||||
|
||||
|
||||
+def _get_default_converter():
|
||||
+ if version("cattrs") >= "25.0.0":
|
||||
+ return cattrs.Converter(structure_fallback_factory=lambda _: cattrs.fns.raise_error)
|
||||
+ return cattrs.Converter()
|
||||
+
|
||||
+
|
||||
def get_converter(
|
||||
converter: Optional[cattrs.Converter] = None,
|
||||
) -> cattrs.Converter:
|
||||
"""Adds cattrs hooks for LSP lsp_types to the given converter."""
|
||||
if converter is None:
|
||||
- converter = cattrs.Converter()
|
||||
+ converter = _get_default_converter()
|
||||
return _hooks.register_hooks(converter)
|
||||
Reference in New Issue
Block a user