Files
MSYS2-packages/python-wcwidth/PKGBUILD
Christoph Reiter a0902f1e21 Use pypi PURLs instead of plain pypi names
This allows us to include a version and we already use PURL
for other things, so might as well remove the pypi special case.

Normalize the names, since that is required for PURLs.
2025-02-16 20:58:55 +01:00

43 lines
1.2 KiB
Bash

# Maintainer: Alexandre Ferreira < alex.jorge.m [at] gmail.com >
_realname=wcwidth
pkgbase=python-${_realname}
pkgname=("python-${_realname}")
pkgver=0.2.13
pkgrel=3
pkgdesc='Measures number of Terminal column cells of wide-character codes'
url='https://github.com/jquast/wcwidth'
msys2_references=(
"anitya: 88052"
"purl: pkg:pypi/wcwidth"
)
arch=('any')
license=('spdx:MIT')
depends=('python')
makedepends=(
"python-setuptools"
"python-build"
"python-installer"
)
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/jquast/${_realname}/archive/${pkgver}.tar.gz")
sha256sums=('144f41dc91f1cee91e59ad3af58d0dd119279b897742a5a0579d958a128506a7')
noextract=("${_realname}-${pkgver}.tar.gz")
prepare() {
[[ -d ${srcdir}/${_realname}-${pkgver} ]] && rm -rf ${srcdir}/${_realname}-${pkgver}
bsdtar -xzf ${srcdir}/${_realname}-${pkgver}.tar.gz -C $srcdir || true
bsdtar -xzf ${srcdir}/${_realname}-${pkgver}.tar.gz -C $srcdir || true
}
build() {
cd "${_realname}-${pkgver}"
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${_realname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python-${_realname}/LICENSE"
}