upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / pypinyin / trunk / PKGBUILD
blobf74437d59a822ae83ad42327d264e2937362e1f0
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Štěpán Němec <stepnem@gmail.com>
4 pkgname=pypinyin
5 pkgver=0.49.0
6 pkgrel=1
7 pkgdesc='Chinese characters transliteration module and tool'
8 arch=('any')
9 url='https://github.com/mozillazg/python-pinyin'
10 license=('MIT')
11 depends=('python')
12 makedepends=('python-setuptools' 'phrase-pinyin-data' 'pinyin-data')
13 checkdepends=('python-pytest-cov')
14 source=("https://github.com/mozillazg/python-pinyin/archive/v$pkgver/python-pinyin-$pkgver.tar.gz")
15 sha256sums=('e044a8d7ddb04a7c21cd4fcfb0437342c21d9ddb846e94ed70bd784dca5b68d5')
17 prepare() {
18   cd python-pinyin-$pkgver
19   ln -s /usr/share/pinyin-data/pinyin.txt pinyin-data/
20   ln -s /usr/share/phrase-pinyin-data/pinyin.txt phrase-pinyin-data/
23 build() {
24   cd python-pinyin-$pkgver
25   make gen_data
26   python setup.py build
29 check() {
30   cd python-pinyin-$pkgver
31   pytest pypinyin tests
34 package() {
35   cd python-pinyin-$pkgver
36   python setup.py install --root="$pkgdir" --optimize=1 --skip-build
37   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/