From e76894a99e48b4131e6dcf4bcbd6f15f77eebb26 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 16 Feb 2025 09:30:01 +0100 Subject: [PATCH] python-poetry-plugin-shell: Add new package --- mingw-w64-python-poetry-plugin-shell/PKGBUILD | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 mingw-w64-python-poetry-plugin-shell/PKGBUILD diff --git a/mingw-w64-python-poetry-plugin-shell/PKGBUILD b/mingw-w64-python-poetry-plugin-shell/PKGBUILD new file mode 100644 index 0000000000..6f54c6ef7e --- /dev/null +++ b/mingw-w64-python-poetry-plugin-shell/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor: Christoph Reiter + +_realname=poetry-plugin-shell +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=1.0.1 +pkgrel=1 +pkgdesc="Poetry plugin to start a subshell with virtual environment activated (mingw-w64)" +arch=('any') +mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') +msys2_references=( + 'pypi: poetry-plugin-shell' +) +url='https://github.com/python-poetry/poetry-plugin-shell' +license=('spdx:MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-pexpect" + "${MINGW_PACKAGE_PREFIX}-python-shellingham" + "${MINGW_PACKAGE_PREFIX}-python-poetry") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-poetry-core") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest") +source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname//-/_}-${pkgver}.tar.gz") +sha256sums=('2c2f878f2dbf488cdfd990fc7205af858280942f4ff766d7bbc5aa8b198a1762') + +build() { + cp -r "${_realname//-/_}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" + + python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + cd "python-build-${MSYSTEM}" + + python -m pytest +} + +package() { + cd "python-build-${MSYSTEM}" + + MSYS2_ARG_CONV_EXCL="--prefix=" \ + python -m installer --prefix=${MINGW_PREFIX} \ + --destdir="${pkgdir}" dist/*.whl + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" +}