From 84cefa99583f33b30c9bb128fe8f5594ab913b5c Mon Sep 17 00:00:00 2001 From: Mehdi Chinoune Date: Fri, 29 Jul 2022 20:47:28 +0100 Subject: [PATCH] [new-package] python-debugpy 1.6.2 --- mingw-w64-python-debugpy/PKGBUILD | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 mingw-w64-python-debugpy/PKGBUILD diff --git a/mingw-w64-python-debugpy/PKGBUILD b/mingw-w64-python-debugpy/PKGBUILD new file mode 100644 index 0000000000..bacf219aa2 --- /dev/null +++ b/mingw-w64-python-debugpy/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: Mehdi Chinoune + +_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" +}