Date: Friday, April 7, 2023 @ 21:37:55
  Author: dvzrv
Revision: 1441487

archrelease: copy trunk to community-staging-x86_64

Added:
  python-libcst/repos/community-staging-x86_64/PKGBUILD
    (from rev 1441486, python-libcst/trunk/PKGBUILD)
Deleted:
  python-libcst/repos/community-staging-x86_64/PKGBUILD

----------+
 PKGBUILD |  118 +++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 72 insertions(+), 46 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-07 21:37:38 UTC (rev 1441486)
+++ PKGBUILD    2023-04-07 21:37:55 UTC (rev 1441487)
@@ -1,46 +0,0 @@
-# Maintainer: Filipe Laíns (FFY00) <[email protected]>
-
-_pkgname=libcst
-pkgname=python-libcst
-pkgver=0.4.9
-pkgrel=3
-pkgdesc="A concrete syntax tree parser and serializer library for Python that 
preserves many aspects of Python's abstract syntax tree"
-arch=('x86_64')
-url='https://github.com/Instagram/LibCST'
-license=('MIT')
-depends=('python-typing_extensions' 'python-typing_inspect' 'python-yaml')
-makedepends=('python-setuptools-scm' 'python-setuptools-rust' 'python-isort' 
'python-black' 'ufmt')
-checkdepends=('python-hypothesis' 'python-hypothesmith')
-source=("https://pypi.io/packages/source/l/libcst/libcst-$pkgver.tar.gz";)
-sha512sums=('f4f6b89ae06b319d8a7ce29e3a2446318b587684adcc80fae32fd4cf4cb3744ef20e11543d38b27622b4b748df1ca4f829d23cf0327f0f4639c93a4fc118c4df')
-
-prepare() {
-  cd $_pkgname-$pkgver
-
-  sed -i 's/subprocess.check_call/subprocess.run/' libcst/codegen/generate.py
-  python -m libcst.codegen.generate all
-
-  rm 
libcst/metadata/tests/{test_full_repo_manager,test_type_inference_provider}.py 
# need pyre
-}
-
-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:

Copied: python-libcst/repos/community-staging-x86_64/PKGBUILD (from rev 
1441486, python-libcst/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-04-07 21:37:55 UTC (rev 1441487)
@@ -0,0 +1,72 @@
+# Maintainer: Filipe Laíns (FFY00) <[email protected]>
+
+_pkgname=libcst
+pkgname=python-libcst
+pkgver=0.4.9
+pkgrel=4
+pkgdesc="A concrete syntax tree parser and serializer library for Python that 
preserves many aspects of Python's abstract syntax tree"
+arch=('x86_64')
+url='https://github.com/Instagram/LibCST'
+license=('MIT')
+depends=(
+  'glibc'
+  'gcc-libs'
+  'python'
+  'python-typing_extensions'
+  'python-typing_inspect'
+  'python-pyyaml'
+)
+makedepends=(
+  'python-build'
+  'python-installer'
+  'python-setuptools-rust'
+  'python-setuptools-scm'
+  'python-wheel'
+  'ufmt'
+)
+checkdepends=(
+  'python-hypothesis'
+  'python-hypothesmith'
+  'python-pytest'
+)
+source=("https://pypi.io/packages/source/l/libcst/libcst-$pkgver.tar.gz";)
+sha512sums=('f4f6b89ae06b319d8a7ce29e3a2446318b587684adcc80fae32fd4cf4cb3744ef20e11543d38b27622b4b748df1ca4f829d23cf0327f0f4639c93a4fc118c4df')
+
+prepare() {
+  cd $_pkgname-$pkgver
+
+  # generate code for tests
+  sed -i 's/subprocess.check_call/subprocess.run/' libcst/codegen/generate.py
+  python -m libcst.codegen.generate all
+}
+
+build() {
+  cd $_pkgname-$pkgver
+
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  local pytest_options=(
+    --ignore libcst/tests/test_fuzz.py
+    --deselect 
libcst/metadata/tests/test_type_inference_provider.py::TypeInferenceProviderTest::test_gen_cache_0
+    --deselect 
libcst/metadata/tests/test_type_inference_provider.py::TypeInferenceProviderTest::test_simple_class_types_0
+    --deselect 
libcst/metadata/tests/test_type_inference_provider.py::TypeInferenceProviderTest::test_with_empty_cache
+  )
+  cd $_pkgname-$pkgver
+
+  pytest -vv "${pytest_options[@]}"
+}
+
+package() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $_pkgname-$pkgver
+
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+  # remove tests
+  rm -frv "$pkgdir/$site_packages/$_pkgname/"{tests,metadata/tests}
+}
+
+# vim:set ts=2 sw=2 et:

Reply via email to