Skip to content

Instantly share code, notes, and snippets.

@kylelaker
Last active February 28, 2021 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylelaker/0b09add656216b3bccafae8d4f21b581 to your computer and use it in GitHub Desktop.
Save kylelaker/0b09add656216b3bccafae8d4f21b581 to your computer and use it in GitHub Desktop.
python-readchar PKGBUILD
pkgname=python-readchar
pkgver=3.0.3
pkgrel=1
pkgdesc="Python library to read characters and key strokes"
arch=("any")
url="https://github.com/magmax/python-readchar"
license=("MIT")
depends=("python")
makedepends=("python-setuptools" "flake8")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/magmax/python-readchar/archive/v$pkgver.tar.gz"
"LICENSE")
md5sums=('f7ee27cbdea3de2477e8a1bc20678a09'
'6fe7ddd14c619721d6db734a05d7d423')
prepare() {
cd "${srcdir}/$pkgname-$pkgver"
# Fix the tests getting included in the package
sed -i' ' -e's/"tests"/"tests*"/' setup.py
}
build() {
cd "${srcdir}/$pkgname-$pkgver"
python setup.py build
}
package() {
cd "${srcdir}/$pkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment