makedeb


python3-krfzf-py-git 0.0.4.r1.e403493-2


A pythonic fzf wrapper.

Click here to go back to the commit logs for python3-krfzf-py-git.

Commit:


Hash: ee114a7171b7b8e31268becb95a871ea140b23b9

Message: supprt bookworm

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 1d073e1..a7a03ac 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,23 @@
 generated-by = makedeb
 pkgname = python3-krfzf-py-git
 pkgbase = python3-krfzf-py-git
-pkgdesc = A pythonic fzf wrapper of KR.
+pkgdesc = A pythonic fzf wrapper.
 pkgrel = 2
-pkgver = 1.e403493
-url = https://github.com/justfoolingaround/fzf.py
+pkgver = 0.0.4.r1.e403493
 arch = all
 conflicts = python3-krfzf-py
 depends = python3
 license = GPL3
 makedepends = git
-makedepends = pip3
+makedepends = python3-build
+makedepends = python3-poetry
+makedepends = python3-installer
+makedepends = python3-wheel
 provides = python3-krfzf-py
 source = git+https://github.com/justfoolingaround/fzf.py
 b2sums = SKIP
 makedepends = git
-makedepends = pip3
+makedepends = python3-build
+makedepends = python3-poetry
+makedepends = python3-installer
+makedepends = python3-wheel
diff --git a/PKGBUILD b/PKGBUILD
index 9d19a1a..2981ac9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
 # Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
+_pkgname=python3-krfzf-py
 pkgname=python3-krfzf-py-git
-pkgver=1.e403493
+pkgver=0.0.4.r1.e403493
 pkgrel=2
-pkgdesc="A pythonic fzf wrapper of KR."
+pkgdesc="A pythonic fzf wrapper."
 arch=('all')
-url="https://github.com/justfoolingaround/fzf.py"
 license=('GPL3')
 depends=('python3')
-makedepends=('git' 'pip3')
+makedepends=('git' 'python3-build' 'python3-poetry' 'python3-installer' 'python3-wheel')
 _gitname='fzf.py'
 source=("git+https://github.com/justfoolingaround/$_gitname")
 b2sums=(SKIP)
@@ -16,16 +16,22 @@ conflicts=('python3-krfzf-py')
 
 pkgver() {
   cd "${_gitname}"
-  echo "$(git rev-list --count HEAD)"."$(git rev-parse --short HEAD)"
+  printf "%s.r%s.%s" "$(grep 'version =' pyproject.toml | cut -d '"' -f 2)" "$(git rev-list --count HEAD)" "$(git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
 }
 
-package() {
-  cd "${_gitname}"
-  pip3 install --no-deps -t "${pkgdir}/usr/lib/python3/dist-packages/" .
-
-  # remove src reference
-  sed -i "s!file.*fzf.py!https://github.com/justfoolingaround/$_gitname!g" "$(grep -rl dir_info "${pkgdir}/usr/lib/python3/dist-packages/")"
+build(){
+        python3 -m build --no-isolation --wheel "$srcdir/${_gitname}"
+}
 
-  install -Dm644 "LICENSE" "$pkgdir/usr/share/doc/$pkgname/license"
-  install -Dm644 "readme.md" "$pkgdir/usr/share/doc/$pkgname/readme"
+package() {
+cd $srcdir/${_gitname/-/_}
+  _py=$(python3 --version)
+  _py=${_py%%.*}
+  python3 -m installer --prefix="/usr" --destdir="$pkgdir" \
+    "dist/krfzf_py-${pkgver%.r*}-py${_py##* }-none-any.whl"
+  # Manual remove local
+  mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
+  rmdir "$pkgdir/usr/local" 
+  install -Dm644 "LICENSE" "$pkgdir/usr/share/doc/$_pkgname/license"
+  install -Dm644 "readme.md" "$pkgdir/usr/share/doc/$_pkgname/readme"
 }