diff options
author | Carlos Aznarán Laos | 2022-02-25 15:34:36 -0500 |
---|---|---|
committer | Carlos Aznarán Laos | 2022-02-25 15:34:36 -0500 |
commit | d3afed0bb8ed742bb5a38a374a07a8abe24314be (patch) | |
tree | 237978646ee302bfcd97451c94c1135cff120a4f /PKGBUILD | |
parent | f0d99f78f7fdbd76ed7a796d7d9cdfa8edbf38e1 (diff) | |
download | aur-python-pyflakes-git.tar.gz |
Add git as makedependency
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 76 |
1 files changed, 19 insertions, 57 deletions
@@ -1,74 +1,36 @@ -# $Id$ -# Contributor: Felix Yan <felixonmars@archlinux.org> -# Contributor: Karol 'Kenji Takahashi' Woźniak <kenji.sx> -# Contributor: Tianjiao Yin <ytj000+AUR@gmail.com> -# Contributor: Thomas Dziedzic < gostrc at gmail > -# Contributor: TDY <tdy@gmx.com> -# Contributor: Tiago Pierezan Camargo <tcamargo@gmail.com> - -pkgbase=python-pyflakes-git -pkgname=(python-pyflakes-git python2-pyflakes-git) -_reponame=pyflakes -pkgver=1.3.0.r4.g140e231 +# Contributor: Yen Chi Hsuan <yan12125@gmail.com> +_base=pyflakes +pkgname=python-${_base}-git +pkgver=2.4.0.r4.g84da8cd pkgrel=1 -pkgdesc='A lint-like tool for Python to identify common errors quickly without executing code (Git version)' -arch=('any') -url='http://pypi.python.org/pypi/pyflakes' -license=('MIT') -makedepends=('python-setuptools' 'python2-setuptools') -source=("${_reponame}"::"git+https://github.com/pyflakes/pyflakes/") -sha1sums=('SKIP') +pkgdesc="A lint-like tool for Python to identify common errors quickly without executing code (Git version)" +arch=(any) +url="https://github.com/PyCQA/${_base}" +license=(MIT) +depends=(python-setuptools) +makedepends=(git) +source=(git+${url}.git) +sha512sums=('SKIP') +provides=(python-pyflakes) +conflicts=(python-pyflakes) pkgver() { - cd "$srcdir/$_reponame" + cd $_base git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g' } -prepare() { - cp -r "$srcdir/${_reponame}"{,-py2} -} - build() { - cd "$srcdir/${_reponame}" + cd ${_base} python setup.py build - - cd "$srcdir/${_reponame}-py2" - python2 setup.py build } check() { - cd "$srcdir/${_reponame}" + cd ${_base} python setup.py test - - cd "$srcdir/${_reponame}-py2" - python2 setup.py test } -package_python-pyflakes-git() { - depends=('python-setuptools') - provides=(python-pyflakes) - conflicts=(python-pyflakes) - - cd "${_reponame}" - +package() { + cd ${_base} python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 - - # We have python 3 as default python, and want to keep compatibility with the old pyflakes3k naming - ln -s pyflakes "${pkgdir}/usr/bin/pyflakes3k" - - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" -} - -package_python2-pyflakes-git() { - depends=('python2-setuptools') - provides=(python2-pyflakes) - conflicts=(python2-pyflakes) - - cd "${_reponame}-py2" - - python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 - - mv "${pkgdir}/usr/bin/pyflakes" "${pkgdir}/usr/bin/pyflakes-python2" - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |