43 lines
1.4 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jelle van der Waa <jelle@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Nikola Milinković <nikmil@gmail.com>
# Submitter: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
_pkgbase=regex
pkgname=python-regex
pkgver=2024.5.15
pkgrel=1
pkgdesc="Alternative python regular expression module."
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/mrabarnett/mrab-regex"
license=('Python' 'Apache')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/r/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz")
sha256sums=('d3ee02d9e5f482cc8309134a91eeaacbdd2261ba111b0fef3748eeb4913e6a2c')
b2sums=('8990bbc78f7f9c6a4dc07d913ec5557a4cd1bac022bc71093e3d8083b5d547182e08f2e8189c3808d8e368ed42530578df9951367b59dc3450bb09458b57f496')
build() {
cd "regex-${pkgver}"
python -m build -wn
}
check() {
cd "regex-${pkgver}"
local _pyver=cpython-$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
cd "$PWD/build/lib.linux-$CARCH-$_pyver"
python -m unittest regex/test_regex.py
}
package() {
cd "regex-${pkgver}"
python -m installer --d "${pkgdir}" dist/*.whl
install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt
}