Carl Smedstad pushed to branch main at Arch Linux / Packaging / Packages / 
python-hiredis


Commits:
02626e8f by Carl Smedstad at 2024-09-28T18:33:04+02:00
Reformat PKGBUILD closer to /usr/share/pacman/PKGBUILD.proto

- - - - -
60d39d13 by Carl Smedstad at 2024-09-28T18:34:28+02:00
Specify correct license - MIT

- - - - -
5fe39bff by Carl Smedstad at 2024-09-28T19:10:43+02:00
Switch to VCS source, standards based packaging & add testing

- - - - -
f79d044f by Carl Smedstad at 2024-09-28T19:21:09+02:00
upgpkg: 3.0.0-1: Upstream release

https://github.com/redis/hiredis-py/releases/tag/v3.0.0

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,13 +1,21 @@
 pkgbase = python-hiredis
        pkgdesc = Non-blocking redis client for python
-       pkgver = 2.3.2
+       pkgver = 3.0.0
        pkgrel = 1
        url = https://pypi.org/project/hiredis/
        arch = x86_64
-       license = Apache
+       license = MIT
+       checkdepends = python-pytest
+       makedepends = git
+       makedepends = python-build
+       makedepends = python-installer
        makedepends = python-setuptools
+       makedepends = python-wheel
+       depends = glibc
        depends = python
-       source = https://pypi.org/packages/source/h/hiredis/hiredis-2.3.2.tar.gz
-       sha256sums = 
733e2456b68f3f126ddaf2cd500a33b25146c3676b97ea843665717bda0c5d43
+       source = git+https://github.com/redis/hiredis-py.git#tag=v3.0.0
+       source = git+https://github.com/redis/hiredis.git
+       sha256sums = 
ae24959a5ca6004edf847d109fc484d813ba521cf1a5afa047d98f1916f66dac
+       sha256sums = SKIP
 
 pkgname = python-hiredis


=====================================
PKGBUILD
=====================================
@@ -1,29 +1,56 @@
 # Maintainer: Johannes Löthberg <[email protected]>
+# Maintainer: Carl Smedstad <[email protected]>
 
 pkgname=python-hiredis
-pkgver=2.3.2
+_pkgname=hiredis-py
+pkgver=3.0.0
 pkgrel=1
-
 pkgdesc='Non-blocking redis client for python'
-url='https://pypi.org/project/hiredis/'
 arch=('x86_64')
-license=('Apache')
-
-depends=('python')
-makedepends=('python-setuptools')
-
-source=("https://pypi.org/packages/source/h/hiredis/hiredis-$pkgver.tar.gz";)
-
-sha256sums=('733e2456b68f3f126ddaf2cd500a33b25146c3676b97ea843665717bda0c5d43')
+url='https://pypi.org/project/hiredis/'
+license=('MIT')
+depends=(
+    'glibc'
+    'python'
+)
+makedepends=(
+    'git'
+    'python-build'
+    'python-installer'
+    'python-setuptools'
+    'python-wheel'
+)
+checkdepends=('python-pytest')
+source=(
+    "git+https://github.com/redis/hiredis-py.git#tag=v$pkgver";
+    "git+https://github.com/redis/hiredis.git";
+)
+sha256sums=('ae24959a5ca6004edf847d109fc484d813ba521cf1a5afa047d98f1916f66dac'
+            'SKIP')
+
+prepare() {
+    cd $_pkgname
+    git submodule init
+    git config submodule.vendor/hiredis.url "$srcdir/hiredis"
+    git -c protocol.file.allow=always submodule update
+}
 
 build() {
-       cd "$srcdir"/hiredis-$pkgver
-       python setup.py build
+       cd $_pkgname
+    python -m build --wheel --no-isolation
+}
+
+check() {
+    cd $_pkgname
+    python -m installer --destdir=tmp_install dist/*.whl
+    local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+    PYTHONPATH="$PWD/tmp_install/$site_packages" pytest
 }
 
 package() {
-       cd hiredis-$pkgver
-       python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+       cd $_pkgname
+    python -m installer -d "$pkgdir" dist/*.whl
+    install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
 }
 
 # vim: set ts=4 sw=4 tw=0 ft=PKGBUILD :



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-hiredis/-/compare/92be9f8f5714b26bc0a946ac39a689dcb2735955...f79d044fc002d2e41efebc28e5219873379931b2

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-hiredis/-/compare/92be9f8f5714b26bc0a946ac39a689dcb2735955...f79d044fc002d2e41efebc28e5219873379931b2
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to