Files
MINGW-packages/mingw-w64-python-unidecode/PKGBUILD
مهدي شينون (Mehdi Chinoune) 9c4daa8927 Use PEP 517 for building if supported (10/10)
2025-01-20 22:34:51 +01:00

41 lines
1.3 KiB
Bash

# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
_realname=unidecode
_pyname=Unidecode
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.3.8
pkgrel=3
pkgdesc='ASCII transliterations of Unicode text (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/avian2/unidecode'
msys2_references=(
'pypi: Unidecode'
)
license=('spdx:GPL-2.0-or-later')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
options=(!strip)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4')
build() {
cp -r "${_pyname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
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: