[arch-commits] Commit in (4 files)

Chih-Hsuan Yen yan12125 at archlinux.org
Fri Feb 7 06:52:33 UTC 2020


    Date: Friday, February 7, 2020 @ 06:52:32
  Author: yan12125
Revision: 563701

addpkg: python-snappy, optdepends of python-autobahn

Added:
  python-snappy/
  python-snappy/repos/
  python-snappy/trunk/
  python-snappy/trunk/PKGBUILD

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

Added: python-snappy/trunk/PKGBUILD
===================================================================
--- python-snappy/trunk/PKGBUILD	                        (rev 0)
+++ python-snappy/trunk/PKGBUILD	2020-02-07 06:52:32 UTC (rev 563701)
@@ -0,0 +1,40 @@
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+# Contributor: Guillaume Horel <guillaume.horel at gmail.com>
+
+pkgname=python-snappy
+pkgver=0.5.4
+pkgrel=1
+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=('d9c26532cfa510f45e8d135cde140e8a5603d3fb254cfec273ebc0ecf9f668e2')
+
+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"
+  pytest -v tests --ignore=tests/test_snappy_cffi.py -k 'not test_snappy_cffi_enum'
+}
+
+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