53 lines
1.8 KiB
Bash
53 lines
1.8 KiB
Bash
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>
|
|
|
|
_realname=sphinx-argparse
|
|
_pypi_name=sphinx_argparse
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=0.4.0
|
|
pkgrel=1
|
|
pkgdesc="Sphinx extension that automatically documents argparse commands and options (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_references=(
|
|
'pypi: sphinx-argparse'
|
|
)
|
|
url='https://github.com/ashb/sphinx-argparse'
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-sphinx")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel"
|
|
"${MINGW_PACKAGE_PREFIX}-python-poetry-core")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-python-commonmark: markdown support")
|
|
options=('!strip')
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_pypi_name}-${pkgver}.tar.gz")
|
|
sha256sums=('e0f34184eb56f12face774fbc87b880abdb9017a0998d1ec559b267e9697e449')
|
|
|
|
build() {
|
|
msg "Python build for ${MSYSTEM}"
|
|
cd "${srcdir}"
|
|
cp -r "${_pypi_name}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
msg "Python test for ${MSYSTEM}"
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
${MINGW_PREFIX}/bin/python -m pytest
|
|
}
|
|
|
|
package() {
|
|
msg "Python install for ${MSYSTEM}"
|
|
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"
|
|
}
|