[arch-commits] Commit in python-libcst/repos (2 files)

Felix Yan felixonmars at gemini.archlinux.org
Wed Dec 1 02:18:01 UTC 2021


    Date: Wednesday, December 1, 2021 @ 02:18:01
  Author: felixonmars
Revision: 1059101

archrelease: copy trunk to community-staging-any

Added:
  python-libcst/repos/community-staging-any/
  python-libcst/repos/community-staging-any/PKGBUILD
    (from rev 1059100, python-libcst/trunk/PKGBUILD)

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

Copied: python-libcst/repos/community-staging-any/PKGBUILD (from rev 1059100, python-libcst/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-12-01 02:18:01 UTC (rev 1059101)
@@ -0,0 +1,44 @@
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+
+_pkgname=LibCST
+pkgname=python-libcst
+pkgver=0.3.20
+pkgrel=3
+pkgdesc="A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree"
+arch=('any')
+url='https://github.com/Instagram/LibCST'
+license=('MIT')
+depends=('python-typing_extensions' 'python-typing_inspect' 'python-yaml')
+makedepends=('python-setuptools' 'python-isort' 'python-black')
+checkdepends=('python-hypothesis' 'python-hypothesmith')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('03920d896850a228c3e48d9eb6256d6e781829965a6ccc4a8d9051ea8ad21a86c25b95cb4aef03b0fd3bd8d45694398dd7e30aeefc9d1b530747ee85ba73861f')
+
+prepare() {
+  cd $_pkgname-$pkgver
+
+  sed -i 's/import AbstractBaseMatcherNodeMeta/import Optional, AbstractBaseMatcherNodeMeta/' libcst/codegen/gen_matcher_classes.py
+  python -m libcst.codegen.generate matchers
+}
+
+build() {
+  cd $_pkgname-$pkgver
+
+  python setup.py build
+}
+
+check() {
+  cd $_pkgname-$pkgver
+
+  python -m unittest
+}
+
+package() {
+  cd $_pkgname-$pkgver
+
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list