diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 27 insertions, 15 deletions
@@ -1,27 +1,39 @@ -# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io> -pkgname="python-flake8-sql" -_pkgname=flake8-sql -pkgver=0.4.0 +## 0.4.1 was never tagged, so I use the most recent commit + +pkgname=python-flake8-sql +_name="${pkgname#python-}" +pkgver=0.4.1 +_commit=0ed4d53dfed6d243254d9065646b17cf8f49708d pkgrel=1 -pkgdesc="Plugin that checks SQL code against opinionated style rules." +pkgdesc='Plugin that checks SQL code against opinionated style rules' arch=('any') -url="https://github.com/pgjones/${_pkgname}" +url='https://github.com/pgjones/flake8-sql' license=('MIT') -depends=('flake8') +depends=('flake8' 'python-sqlparse') +makedepends=('python-setuptools') +checkdepends=('python-pytest') replaces=('flake8-sql') provides=('flake8-sql') -source=("https://github.com/pgjones/flake8-sql/archive/$pkgver.tar.gz") -md5sums=('2068ed9edba616d42a9e67d0391e2d29') +changelog=CHANGELOG.rst +source=("$pkgname-$pkgver.tar.gz::https://github.com/pgjones/flake8-sql/archive/$_commit.tar.gz") +sha256sums=('b4fac5b0c0c129a5ef9a863ad23c997e5b28a4a11d810493c6d38971052e253d') build() { - cd "${_pkgname}-${pkgver}" - python setup.py build + cd "$_name-$_commit" + python setup.py build } -package() { - cd "${_pkgname}-${pkgver}" - python setup.py install --root="${pkgdir}" --optimize=1 +check() { + cd "$_name-$_commit" + pytest +} - install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +package() { + cd "$_name-$_commit" + PYTHONHASHSEED=0 python setup.py install --root="$pkgdir" --optimize=1 --skip-build + install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" + install -Dm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/" } |