makedeb


python3-readchar 4.2.1-0


Python library to read characters and key strokes

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for python3-readchar.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Mario Ortiz Manero (AUR) <marioortizmanero@gmail.com>
# Contributor: Kyle Laker (AUR) <kyle+aur@laker.email>
_pkgname=python-readchar
pkgname=python3-readchar
pkgver=4.2.1
pkgrel=0
pkgdesc="Python library to read characters and key strokes"
arch=("all")
url="https://github.com/magmax/python-readchar"
license=("custom:MIT")
depends=("python3")
makedepends=("python3-build" "python3-installer" "python3-wheel" "python3-setuptools")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/magmax/python-readchar/archive/v$pkgver.tar.gz")
b2sums=('5ba452b11e11bca431b3db5245ae640e318275bc58de7f837d0e6167e5c7d102eac2b91641d7f4fea6da3a3b6bedb7c0b984d80d752286285b5316d7f8d499c6')

build() {
    cd "${srcdir}/$_pkgname-$pkgver"

    GITHUB_REF="refs/tags/$pkgver" python3 -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/$_pkgname-$pkgver"

    python3 -m installer --destdir="$pkgdir" dist/*.whl #--optimize=1 --skip-build
    # Manual remove local
    mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
    rmdir "$pkgdir/usr/local" 
    #doc
    install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/readme"
    ln -s "/usr/lib/python3.11/dist-packages/readchar-$pkgver.dist-info/LICENCE" "$pkgdir/usr/share/doc/$pkgname/LICENSE"
}