[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Fri Jun 4 20:49:40 UTC 2021


    Date: Friday, June 4, 2021 @ 20:49:40
  Author: felixonmars
Revision: 955941

addpkg: pypinyin 0.41.0-1

Added:
  pypinyin/
  pypinyin/repos/
  pypinyin/trunk/
  pypinyin/trunk/PKGBUILD

----------+
 PKGBUILD |   38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Added: pypinyin/trunk/PKGBUILD
===================================================================
--- pypinyin/trunk/PKGBUILD	                        (rev 0)
+++ pypinyin/trunk/PKGBUILD	2021-06-04 20:49:40 UTC (rev 955941)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Štěpán Němec <stepnem at gmail.com>
+
+pkgname=pypinyin
+pkgver=0.41.0
+pkgrel=1
+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=('a72e889fb7a8a9c15aff7f1751d39ea59e454f86bfbaeecb3fecbb1c60bf8c35')
+
+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/
+}



More information about the arch-commits mailing list