[arch-commits] Commit in pypinyin/repos (community-any community-any/PKGBUILD)

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


    Date: Friday, June 4, 2021 @ 20:49:51
  Author: felixonmars
Revision: 955942

archrelease: copy trunk to community-any

Added:
  pypinyin/repos/community-any/
  pypinyin/repos/community-any/PKGBUILD
    (from rev 955941, pypinyin/trunk/PKGBUILD)

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

Copied: pypinyin/repos/community-any/PKGBUILD (from rev 955941, pypinyin/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-06-04 20:49:51 UTC (rev 955942)
@@ -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