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

Evangelos Foutras foutrelis at gemini.archlinux.org
Wed Dec 1 14:51:09 UTC 2021


    Date: Wednesday, December 1, 2021 @ 14:51:09
  Author: foutrelis
Revision: 1059405

archrelease: copy trunk to community-staging-x86_64

Added:
  python-snappy/repos/community-staging-x86_64/
  python-snappy/repos/community-staging-x86_64/PKGBUILD
    (from rev 1059403, python-snappy/trunk/PKGBUILD)

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

Copied: python-snappy/repos/community-staging-x86_64/PKGBUILD (from rev 1059403, python-snappy/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-12-01 14:51:09 UTC (rev 1059405)
@@ -0,0 +1,42 @@
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+# Contributor: Guillaume Horel <guillaume.horel at gmail.com>
+
+pkgname=python-snappy
+pkgver=0.6.0
+pkgrel=2
+pkgdesc='Python bindings for the snappy compression library.'
+url='https://github.com/andrix/python-snappy'
+depends=(python snappy)
+makedepends=(python-setuptools)
+checkdepends=(python-pytest)
+license=(BSD)
+arch=(x86_64)
+source=(https://files.pythonhosted.org/packages/source/p/python-snappy/python-snappy-$pkgver.tar.gz)
+sha256sums=('168a98d3f597b633cfeeae7fe1c78a8dfd81f018b866cf7ce9e4c56086af891a')
+
+prepare() {
+  cd $pkgname-$pkgver
+  # Move test scripts around, so that they can use the correct sys.path (build/lib.linux...)
+  mkdir tests
+  mv test_*.py tests
+}
+
+build() {
+  cd $pkgname-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $pkgname-$pkgver
+  pyver=$(python -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
+  export PYTHONPATH="$PWD/build/lib.linux-$CARCH-$pyver"
+  # Avoid writing .pyc files in check(), or packaging with --nocheck cannot reproduce
+  # packages built with check() as .pyc files created in check() embed $srcdir
+  PYTHONDONTWRITEBYTECODE=1 pytest tests --ignore=tests/test_snappy_cffi.py
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list