upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-regex / trunk / PKGBUILD
blob51d21f0b36fa081e35f7f6049e678722e423ee90
1 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Eli Schwartz <eschwartz@archlinux.org>
4 # Contributor: Nikola Milinković <nikmil@gmail.com>
5 # Submitter: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
7 _pkgbase=regex
8 pkgname=python-regex
9 pkgver=2023.5.5
10 pkgrel=1
11 pkgdesc="Alternative python regular expression module."
12 arch=('x86_64')
13 url="https://github.com/mrabarnett/mrab-regex"
14 license=('Python' 'Apache')
15 depends=('python')
16 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
17 options=(!emptydirs)
18 source=("https://files.pythonhosted.org/packages/source/r/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz")
19 sha256sums=('7d76a8a1fc9da08296462a18f16620ba73bcbf5909e42383b253ef34d9d5141e')
20 b2sums=('1eb63c85abcf37b83e2d8f03a18ea9ae0f80aed2d8d29b0141e5064ab30067d9146d9ec440b3bc043dfb569a8216349b67354c7b7b3c4faf6f447f4b910128dc')
22 build() {
23   cd "regex-${pkgver}"
25   python -m build -wn
28 check() {
29   cd "regex-${pkgver}"
31   local _pyver=cpython-$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
32   cd "$PWD/build/lib.linux-$CARCH-$_pyver"
33   python -m unittest regex/test_regex.py
36 package() {
37   cd "regex-${pkgver}"
39   python -m installer --d "${pkgdir}" dist/*.whl
40   install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt