summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarl Smedstad2024-04-22 19:50:55 +0200
committerCarl Smedstad2024-04-22 19:53:36 +0200
commit37d34d511deecb9636d30b6a4fa1f8a65ace1226 (patch)
treec6cfe98a8cba05a9c30705dce2a83bfe151aad5f /PKGBUILD
parenta1718b9414d68b2e89a831c6ef090dbd7042fa2a (diff)
downloadaur-gitlint.tar.gz
upgpkg: 0.19.1-3: Python 3.12 compatibility
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD21
1 files changed, 11 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2456004ee166..a50114b77f2c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
-# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
+# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
pkgname=gitlint
pkgver=0.19.1
-pkgrel=2
+pkgrel=3
pkgdesc="Git commit message linter"
arch=(any)
url="https://github.com/jorisroovers/gitlint"
@@ -25,8 +25,7 @@ checkdepends=(
git
python-pytest
)
-
-source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('60de0fe764bd8fc86eb38990fb6704c5c4649a1fee574407b87b3c1471e12bd0')
_archive="$pkgname-$pkgver"
@@ -38,20 +37,22 @@ build() {
python -m build --wheel --no-isolation
rm -rf tmp_install
- _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
python -m installer --destdir=tmp_install dist/*.whl
# Completions
- export PYTHONPATH="$PWD/tmp_install/$_site_packages:$PYTHONPATH"
- _gitlint_cmd="$PWD/tmp_install/usr/bin/gitlint"
- _GITLINT_COMPLETE=bash_source $_gitlint_cmd > gitlint.bash
- _GITLINT_COMPLETE=fish_source $_gitlint_cmd > gitlint.fish
- _GITLINT_COMPLETE=zsh_source $_gitlint_cmd > gitlint.zsh
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ export PYTHONPATH="$PWD/tmp_install/$site_packages"
+ local gitlint_cmd="$PWD/tmp_install/usr/bin/gitlint"
+ _GITLINT_COMPLETE=bash_source $gitlint_cmd > gitlint.bash
+ _GITLINT_COMPLETE=fish_source $gitlint_cmd > gitlint.fish
+ _GITLINT_COMPLETE=zsh_source $gitlint_cmd > gitlint.zsh
}
check() {
cd "$_archive/gitlint-core"
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ export PYTHONPATH="$PWD:$PWD/tmp_install/$site_packages"
pytest
}