summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD16
2 files changed, 12 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 144f7623d94d..317026f1156d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-wpiformat-git
pkgdesc = Linters and formatters for ensuring WPILib's source code conforms to its style guide
pkgver = 2023.28
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/wpilibsuite/styleguide
arch = i686
arch = x86_64
@@ -9,6 +9,7 @@ pkgbase = python-wpiformat-git
makedepends = python-tox
depends = python-regex
depends = python-black
+ depends = clang
provides = python-wpiformat
conflicts = python-wpiformat
source = git+https://github.com/wpilibsuite/styleguide
diff --git a/PKGBUILD b/PKGBUILD
index c6532d7fc47f..00a38f8cdd8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,12 +2,12 @@
pkgname=python-wpiformat-git
pkgver=2023.28
-pkgrel=1
+pkgrel=2
pkgdesc="Linters and formatters for ensuring WPILib's source code conforms to its style guide"
arch=('i686' 'x86_64')
url="https://github.com/wpilibsuite/styleguide"
license=('custom=FRC-BSD')
-depends=('python-regex' 'python-black')
+depends=('python-regex' 'python-black' 'clang')
makedepends=('python-tox')
provides=('python-wpiformat')
conflicts=('python-wpiformat')
@@ -15,23 +15,27 @@ source=(git+https://github.com/wpilibsuite/styleguide)
md5sums=('SKIP')
pkgver() {
- cd "$srcdir/styleguide"
+ cd "${srcdir}/styleguide"
year=$(date +%Y)
echo $year.$(git rev-list --count --after="main@{$(($year - 1))-01-01}" main)
}
build() {
- cd "$srcdir/styleguide/wpiformat"
+ cd "${srcdir}/styleguide/wpiformat"
python -m build --wheel
}
check() {
- cd "$srcdir/styleguide/wpiformat"
+ cd "${srcdir}/styleguide/wpiformat"
tox
}
package() {
- cd "$srcdir/styleguide/wpiformat"
+ cd "${srcdir}/styleguide/wpiformat"
pip install clang-format clang-tidy --no-deps --root ${pkgdir} --ignore-installed
pip install dist/wpiformat-*.whl --no-deps --root ${pkgdir} --ignore-installed
+
+ # Remove duplicates already provided by clang package
+ cd "${pkgdir}/usr/bin"
+ rm clang-format clang-tidy git-clang-format
}