[new package] python-ruff-lsp 0.0.49

This commit is contained in:
ognevnydemon
2024-01-11 18:22:48 +03:00
parent 12b5ae7094
commit 3b90f2a3f3

View File

@@ -0,0 +1,51 @@
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>
_realname=ruff-lsp
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=0.0.49
pkgrel=1
pkgdesc="A Language Server Protocol implementation for Ruff (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
msys2_references=(
'pypi: ruff-lsp'
'archlinux: ruff-lsp'
)
url='https://github.com/astral-sh/ruff-lsp/'
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-ruff"
"${MINGW_PACKAGE_PREFIX}-python-pygls"
"${MINGW_PACKAGE_PREFIX}-python-packaging"
"${MINGW_PACKAGE_PREFIX}-python-lsprotocol"
"${MINGW_PACKAGE_PREFIX}-python-typing_extensions")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-hatchling")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-asyncio"
"${MINGW_PACKAGE_PREFIX}-python-lsp-jsonrpc")
options=('!strip')
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('adeb68274e34fbdb6ba0c2f9009950b617f54c2cbf0dd7b4f82c1677477e36d3')
build() {
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m pytest
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}