blob: 1dd4b6840c7eb2add97df9339a6d455771b75904 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# $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
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')
pkgver() {
cd "$srcdir/$_reponame"
git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
cp -r "$srcdir/${_reponame}"{,-py2}
}
build() {
cd "$srcdir/${_reponame}"
python setup.py build
cd "$srcdir/${_reponame}-py2"
python2 setup.py build
}
check() {
cd "$srcdir/${_reponame}"
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}"
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"
}
|