Date: Friday, April 7, 2023 @ 03:53:47
Author: felixonmars
Revision: 1440379
archrelease: copy trunk to community-staging-any
Added:
pypinyin/repos/community-staging-any/
pypinyin/repos/community-staging-any/PKGBUILD
(from rev 1440377, pypinyin/trunk/PKGBUILD)
----------+
PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
Copied: pypinyin/repos/community-staging-any/PKGBUILD (from rev 1440377,
pypinyin/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-07 03:53:47 UTC (rev 1440379)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Štěpán Němec <[email protected]>
+
+pkgname=pypinyin
+pkgver=0.48.0
+pkgrel=2
+pkgdesc='Chinese characters transliteration module and tool'
+arch=('any')
+url='https://github.com/mozillazg/python-pinyin'
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools' 'phrase-pinyin-data' 'pinyin-data')
+checkdepends=('python-pytest-cov')
+source=("https://github.com/mozillazg/python-pinyin/archive/v$pkgver/python-pinyin-$pkgver.tar.gz")
+sha256sums=('3fd48ae19e9cd3755cdc6a6da579df1108725324070f2af6b130bdb98fa53c05')
+
+prepare() {
+ cd python-pinyin-$pkgver
+ ln -s /usr/share/pinyin-data/pinyin.txt pinyin-data/
+ ln -s /usr/share/phrase-pinyin-data/pinyin.txt phrase-pinyin-data/
+}
+
+build() {
+ cd python-pinyin-$pkgver
+ make gen_data
+ python setup.py build
+}
+
+check() {
+ cd python-pinyin-$pkgver
+ pytest pypinyin tests
+}
+
+package() {
+ cd python-pinyin-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+}