Chih-Hsuan Yen pushed to branch main at Arch Linux / Packaging / Packages /
python-snappy
Commits:
46757d59 by Chih-Hsuan Yen at 2024-05-05T18:59:44+08:00
Update to 0.7.1
* Update URL following GitHub HTTP 301 redirect
* Switch from a CPython extension to cramjam following [1]
* arch is now any
* the workaround in prepare() is no longer needed
* Minor improvements: use PEP 517, update license, avoid PyPI tarballs
[1] https://github.com/intake/python-snappy/pull/130
- - - - -
2 changed files:
- .SRCINFO
- PKGBUILD
Changes:
=====================================
.SRCINFO
=====================================
@@ -1,15 +1,19 @@
pkgbase = python-snappy
pkgdesc = Python bindings for the snappy compression library.
- pkgver = 0.6.1
- pkgrel = 4
- url = https://github.com/andrix/python-snappy
- arch = x86_64
- license = BSD
+ pkgver = 0.7.1
+ pkgrel = 1
+ url = https://github.com/intake/python-snappy
+ arch = any
+ license = BSD-3-Clause
checkdepends = python-pytest
+ makedepends = git
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
depends = python
- depends = snappy
- source =
https://files.pythonhosted.org/packages/source/p/python-snappy/python-snappy-0.6.1.tar.gz
- sha256sums =
b6a107ab06206acc5359d4c5632bd9b22d448702a79b3169b0c62e0fb808bb2a
+ depends = python-cramjam
+ source = git+https://github.com/intake/python-snappy#tag=0.7.1
+ sha256sums =
ee39c2cab15dde409732c3d262d628c32c4038cfed0664ae8f0f1dcec0cfe315
pkgname = python-snappy
=====================================
PKGBUILD
=====================================
@@ -2,41 +2,31 @@
# Contributor: Guillaume Horel <[email protected]>
pkgname=python-snappy
-pkgver=0.6.1
-pkgrel=4
+pkgver=0.7.1
+pkgrel=1
pkgdesc='Python bindings for the snappy compression library.'
-url='https://github.com/andrix/python-snappy'
-depends=(python snappy)
-makedepends=(python-setuptools)
+url='https://github.com/intake/python-snappy'
+depends=(python python-cramjam)
+makedepends=(git python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest)
-license=(BSD)
-arch=(x86_64)
-source=(https://files.pythonhosted.org/packages/source/p/python-snappy/python-snappy-$pkgver.tar.gz)
-sha256sums=('b6a107ab06206acc5359d4c5632bd9b22d448702a79b3169b0c62e0fb808bb2a')
-
-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
-}
+# https://github.com/intake/python-snappy/blob/0.7.1/LICENSE
+license=('BSD-3-Clause')
+arch=(any)
+source=("git+https://github.com/intake/python-snappy#tag=$pkgver")
+sha256sums=('ee39c2cab15dde409732c3d262d628c32c4038cfed0664ae8f0f1dcec0cfe315')
build() {
- cd $pkgname-$pkgver
- python setup.py build
+ cd $pkgname
+ python -m build --wheel --no-isolation
}
check() {
- cd $pkgname-$pkgver
- pyver=$(python -c "import sys; print('{}{}'.format(*sys.version_info[:2]))")
- export PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-$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
+ cd $pkgname
+ PYTHONPATH="$PWD/src" pytest
}
package() {
- cd $pkgname-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ cd $pkgname
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/python-snappy/-/commit/46757d5978eb4e4ee2c64cbbe85ad65b242bb29f
--
This project does not include diff previews in email notifications.
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/python-snappy/-/commit/46757d5978eb4e4ee2c64cbbe85ad65b242bb29f
You're receiving this email because of your account on gitlab.archlinux.org.