[new-package] python-debugpy 1.6.2

This commit is contained in:
Mehdi Chinoune
2022-07-29 20:47:28 +01:00
committed by Biswapriyo Nath
parent 021561115e
commit 84cefa9958

View File

@@ -0,0 +1,45 @@
# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
_realname=debugpy
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.6.2
pkgrel=1
pkgdesc="An implementation of the Debug Adapter Protocol for Python (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url='https://github.com/microsoft/debugpy'
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel"
"${MINGW_PACKAGE_PREFIX}-cc")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.zip")
sha256sums=('e6047272e97a11aa6898138c1c88c8cf61838deeb2a4f0a74e63bb567f8dafc6')
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}"
# The test command will usually depend upon what is contained in the tox.ini file
# or in the [testenv:py] section of the pyproject.toml file.
${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"
}