2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
2021-09-27 23:54:24 +00:00
|
|
|
# Contributor: Jayson Reis <santosdosreis@gmail.com>
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2022-01-17 21:19:34 +00:00
|
|
|
pkgname=python-commitizen
|
2022-07-03 19:29:27 +00:00
|
|
|
_pkgname="${pkgname#python-}"
|
2022-09-12 03:33:09 +00:00
|
|
|
pkgver=2.32.5
|
2022-02-07 22:52:32 +00:00
|
|
|
pkgrel=1
|
2022-04-18 01:57:50 +00:00
|
|
|
pkgdesc='A tool for enforcing descriptive commit messages and version/changelog management'
|
2021-07-24 10:00:43 +00:00
|
|
|
arch=('any')
|
2022-04-18 01:57:50 +00:00
|
|
|
url='https://github.com/commitizen-tools/commitizen'
|
2021-07-24 10:00:43 +00:00
|
|
|
license=('MIT')
|
|
|
|
depends=(
|
|
|
|
'python'
|
2021-08-14 02:09:50 +00:00
|
|
|
'python-questionary'
|
|
|
|
'python-decli'
|
2021-07-24 10:00:43 +00:00
|
|
|
'python-colorama'
|
|
|
|
'python-termcolor'
|
|
|
|
'python-packaging'
|
|
|
|
'python-tomlkit'
|
|
|
|
'python-jinja'
|
|
|
|
'python-pyaml'
|
|
|
|
'python-argcomplete'
|
|
|
|
'python-prompt_toolkit'
|
|
|
|
)
|
2021-09-27 23:54:24 +00:00
|
|
|
makedepends=(
|
2022-02-07 22:52:32 +00:00
|
|
|
'git'
|
2021-09-27 23:54:24 +00:00
|
|
|
'python-build'
|
2022-01-17 21:19:34 +00:00
|
|
|
'python-poetry-core'
|
2022-04-18 01:57:50 +00:00
|
|
|
'python-installer'
|
2021-09-27 23:54:24 +00:00
|
|
|
)
|
2022-01-17 21:19:34 +00:00
|
|
|
provides=('cz' 'git-cz')
|
|
|
|
conflicts=('nodejs-commitizen' 'commitizen-go')
|
2022-09-12 03:33:09 +00:00
|
|
|
_commit='5bf5106c5ab4b469fae7e9583f2ddcbdf004989c'
|
2022-02-07 22:52:32 +00:00
|
|
|
source=("$pkgname::git+$url.git#commit=$_commit")
|
|
|
|
b2sums=('SKIP')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2022-02-07 22:52:32 +00:00
|
|
|
pkgver() {
|
|
|
|
cd "$pkgname"
|
|
|
|
|
|
|
|
git describe --tags | sed 's/^v//'
|
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-09-27 23:54:24 +00:00
|
|
|
# create completions
|
|
|
|
mkdir completions
|
|
|
|
register-python-argcomplete --shell bash cz > completions/bash
|
|
|
|
register-python-argcomplete --shell fish cz > completions/fish
|
|
|
|
}
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
build() {
|
2022-02-07 22:52:32 +00:00
|
|
|
cd "$pkgname"
|
2021-09-27 23:54:24 +00:00
|
|
|
|
2022-01-17 21:19:34 +00:00
|
|
|
python -m build \
|
|
|
|
--wheel \
|
|
|
|
--skip-dependency-check \
|
|
|
|
--no-isolation
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-02-07 22:52:32 +00:00
|
|
|
cd "$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2022-04-18 01:57:50 +00:00
|
|
|
python -m installer \
|
2021-12-14 02:10:32 +00:00
|
|
|
--destdir="$pkgdir" \
|
2021-07-24 10:00:43 +00:00
|
|
|
dist/*.whl
|
2021-08-14 02:09:50 +00:00
|
|
|
|
2022-01-17 21:26:48 +00:00
|
|
|
# fix permissions issue
|
|
|
|
find "$pkgdir/usr/bin" -type f -exec chmod 0755 {} +
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
# license
|
|
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
2021-09-27 23:54:24 +00:00
|
|
|
|
|
|
|
# shell completions
|
|
|
|
install -vDm644 completions/bash "$pkgdir/usr/share/bash-completion/completions/cz"
|
|
|
|
install -vDm644 completions/fish "$pkgdir/usr/share/fish/vendor_completions.d/cz.fish"
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|