Date: Saturday, March 29, 2014 @ 03:38:43 Author: fyan Revision: 108578
archrelease: copy trunk to community-any Added: python-pyflakes/repos/community-any/ python-pyflakes/repos/community-any/PKGBUILD (from rev 108577, python-pyflakes/trunk/PKGBUILD) ----------+ PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) Copied: python-pyflakes/repos/community-any/PKGBUILD (from rev 108577, python-pyflakes/trunk/PKGBUILD) =================================================================== --- community-any/PKGBUILD (rev 0) +++ community-any/PKGBUILD 2014-03-29 02:38:43 UTC (rev 108578) @@ -0,0 +1,65 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@gmail.com> +# Contributor: Karol 'Kenji Takahashi' Woźniak <kenji.sx> +# Contributor: Tianjiao Yin <ytj000+...@gmail.com> +# Contributor: Thomas Dziedzic < gostrc at gmail > +# Contributor: TDY <t...@gmx.com> +# Contributor: Tiago Pierezan Camargo <tcama...@gmail.com> + +pkgbase=python-pyflakes +pkgname=(python-pyflakes python2-pyflakes) +_reponame=pyflakes +pkgver=0.8 +pkgrel=2 +pkgdesc='A lint-like tool for Python to identify common errors quickly without executing code' +arch=('any') +url='http://pypi.python.org/pypi/pyflakes' +license=('MIT') +makedepends=('python-setuptools' 'python2-setuptools') +source=("http://pypi.python.org/packages/source/p/pyflakes/${_reponame}-${pkgver}.tar.gz") +sha1sums=('801c9ad6bddc95e436b103a8deefbfe0f4451f50') + +prepare() { + cp -r "${_reponame}-${pkgver}"{,-py2} +} + +build() { + cd "$srcdir/${_reponame}-${pkgver}" + python setup.py build + + cd "$srcdir/${_reponame}-${pkgver}-py2" + python2 setup.py build +} + +check() { + cd "$srcdir/${_reponame}-${pkgver}" + python setup.py test + + cd "$srcdir/${_reponame}-${pkgver}-py2" + python2 setup.py test +} + +package_python-pyflakes() { + depends=('python') + + cd "${_reponame}-${pkgver}" + + 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() { + depends=('python2') + + cd "${_reponame}-${pkgver}-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" +}