diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | CHANGELOG.rst | 28 | ||||
-rw-r--r-- | PKGBUILD | 42 |
3 files changed, 63 insertions, 20 deletions
@@ -1,15 +1,18 @@ pkgbase = python-flake8-sql - pkgdesc = Plugin that checks SQL code against opinionated style rules. - pkgver = 0.4.0 + pkgdesc = Plugin that checks SQL code against opinionated style rules + pkgver = 0.4.1 pkgrel = 1 url = https://github.com/pgjones/flake8-sql + changelog = CHANGELOG.rst arch = any license = MIT + checkdepends = python-pytest + makedepends = python-setuptools depends = flake8 + depends = python-sqlparse provides = flake8-sql replaces = flake8-sql - source = https://github.com/pgjones/flake8-sql/archive/0.4.0.tar.gz - md5sums = 2068ed9edba616d42a9e67d0391e2d29 + source = python-flake8-sql-0.4.1.tar.gz::https://github.com/pgjones/flake8-sql/archive/0ed4d53dfed6d243254d9065646b17cf8f49708d.tar.gz + sha256sums = b4fac5b0c0c129a5ef9a863ad23c997e5b28a4a11d810493c6d38971052e253d pkgname = python-flake8-sql - diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 000000000000..7fa7d9133651 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,28 @@ +0.4.1 2020-06-27 +---------------- + +* Fix wrong lineno used on Python 3.8. + +0.4.0 2020-01-12 +---------------- + +* Support Python 3.7 & 3.8, drop Python 3.3 & 3.4. +* Do not consider FROM keywords within functions as ROOT keywords. + +0.3.0 2018-08-12 +---------------- + +* Support f-string formatted SQL statements. +* Install typing for Python versions < 3.5 + +0.2.0 2017-02-06 +---------------- + +* Add additional root keywords and descriptors. +* Align on ``INTO`` rather than ``INSERT``, i.e. the former is now the + root keyword and the latter is a descriptor. + +0.1.0 2017-02-06 +---------------- + +* First release. @@ -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/" } |