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=2023.12.25
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=('29171aa128da69afdf4bde412d5bedc335f2ca8fcfe4489038577d05f16181e5')
b2sums=('742abe3a3515b527465d81df8fd9404aaa6aa1545e3e6a8c4a87d72d41138caf7f63bceae8bf06b3576656a6b5577bfec51629a60fe837ad2f3a4cd60a08ac06')
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
}