83 lines
3.2 KiB
Bash
83 lines
3.2 KiB
Bash
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.su>
|
|
|
|
_realname=language-server
|
|
_pyname=python-language-server
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=0.36.2
|
|
pkgrel=6
|
|
pkgdesc="An implementation of the Language Server Protocol for Python (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://github.com/palantir/python-language-server"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/python-language-server'
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-future"
|
|
"${MINGW_PACKAGE_PREFIX}-python-jedi"
|
|
"${MINGW_PACKAGE_PREFIX}-python-jsonrpc-server"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pluggy"
|
|
"${MINGW_PACKAGE_PREFIX}-python-ujson")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-versioneer")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-coverage"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-cov"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyflakes"
|
|
"${MINGW_PACKAGE_PREFIX}-python-flake8"
|
|
"${MINGW_PACKAGE_PREFIX}-python-flaky"
|
|
#"${MINGW_PACKAGE_PREFIX}-python-autopep8"
|
|
"${MINGW_PACKAGE_PREFIX}-python-rope"
|
|
#"${MINGW_PACKAGE_PREFIX}-python-pydocstyle"
|
|
"${MINGW_PACKAGE_PREFIX}-python-yapf"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pylint"
|
|
"${MINGW_PACKAGE_PREFIX}-python-mock")
|
|
options=(!strip)
|
|
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
|
|
"001-python-language-server-0.36.2-fix-versioneer.patch"
|
|
"002-python-language-server-0.36.2-fix-setup.patch")
|
|
sha256sums=('9984c84a67ee2c5102c8e703215f407fcfa5e62b0ae86c9572d0ada8c4b417b0'
|
|
'fb52b245c4f59a50ecb5f689eea9fd9a86a8577a5f91a677f1fcb2b4cc262e90'
|
|
'd45d3b1dec94a9033dd13b3754ffe17396e19f1621b26fbc87fe5f84214d0b89')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${_pyname}-${pkgver}"
|
|
|
|
patch -p1 -i "${srcdir}/001-python-language-server-0.36.2-fix-versioneer.patch"
|
|
patch -p1 -i "${srcdir}/002-python-language-server-0.36.2-fix-setup.patch"
|
|
|
|
rm -rf "versioneer.py" | true
|
|
}
|
|
|
|
build() {
|
|
cp -r "${_pyname}-${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}"
|
|
|
|
PYTHONPATH="build/lib" pytest \
|
|
--ignore=test/plugins/test_autopep8_format.py \
|
|
--ignore=test/plugins/test_completion.py \
|
|
--ignore=test/plugins/test_pydocstyle_lint.py \
|
|
--ignore=test/plugins/test_rope_rename.py \
|
|
--ignore=test/plugins/test_yapf_format.py
|
|
}
|
|
|
|
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"
|
|
}
|
|
|
|
# vim: ts=2 sw=2 et:
|