diff options
author | a821 | 2023-07-12 10:21:50 +0200 |
---|---|---|
committer | a821 | 2023-07-12 10:21:50 +0200 |
commit | bd8501a669dd21415c0d70ae601888950b9b8a5e (patch) | |
tree | a12ba12e338ea19e25a4865f7979cbf94a93b787 /PKGBUILD | |
parent | 28791d040d8e7d23dbf2600c78b7e32246f62dde (diff) | |
download | aur-python-colorama-git.tar.gz |
Update PKGBUILD
1. Updated to follow the official PKGBUILD
2. `epoch` set to 1 because wrong `pkgver()`
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 13 insertions, 26 deletions
@@ -1,54 +1,41 @@ -# Maintainer: jyantis <yantis@yantis.net> +# Maintainer: a821 +# Contributor: Felix Yan +# Contributor: jyantis <yantis@yantis.net> pkgname=python-colorama-git -pkgver=0.3.3.r116.97e2635 -pkgrel=2 +pkgver=0.4.6.r5.g21c4b94 +pkgrel=1 +epoch=1 pkgdesc='Simple cross-plaform colored terminal text in Python 3' arch=('any') url='https://github.com/tartley/colorama' license=('BSD') -depends=('python' 'python-setuptools' 'python-mock') -source=('git+https://github.com/tartley/colorama.git') +depends=('python') +source=("git+${url}") sha256sums=('SKIP') -makedepends=('git') +makedepends=('git' 'python-build' 'python-installer' 'python-hatchling') provides=('python-colorama') conflicts=('python-colorama') pkgver() { cd colorama - set -o pipefail - _gitversion=$( git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' || - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" ) - - if [ -f "colorama/__init__.py" ]; then - printf "%s.%s" "$(grep -R "__version__ =" colorama/__init__.py | awk -F\' '{print $2}')" $_gitversion | sed 's/-/./g' - else - printf "%s" $_gitversion - fi + git describe --long --tags | sed 's/-/.r/;s/-/./g' } build() { cd colorama - python setup.py build + python -m build -nw } check() { cd colorama - python setup.py test --verbose + python -m unittest discover -p *_test.py } package() { cd colorama - - # We don't need anything related to git in the package - rm -rf .git* - - python setup.py install --root="${pkgdir}" --optimize=1 - - # Install License + python -m installer --destdir="${pkgdir}" dist/*.whl install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - # Install Documentation install -D -m644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst" } |