summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9ec08ed583e1a8570bb3bcd00397ded58a044941 (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
# Maintainer: David Verelst <david dott verelst hat gmail com>
# Contributor: xiretza <xiretza+aur@gmail.com>

pkgname=python2-jedi-git
_gitname=jedi
epoch=1
pkgver=v0.17.0.r148.2d672d2f
pkgrel=1
pkgdesc="An awesome autocompletion, static analysis and refactoring library for Python"
arch=(any)
url="https://github.com/davidhalter/jedi"
license=('MIT')
depends=('python2')
makedepends=('git' 'python2-setuptools')
provides=('python2-jedi')
conflicts=('python2-jedi')
options=(!emptydirs)
source=(git+https://github.com/davidhalter/jedi.git
        git+https://github.com/davidhalter/typeshed
        git+https://github.com/typeddjango/django-stubs)
md5sums=('SKIP'
         'SKIP'
         'SKIP')

pkgver() {
  cd "$srcdir/$_gitname"

  printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
  cd "$srcdir/$_gitname"

  git submodule init
  git config submodule."jedi/third_party/typeshed".url "${srcdir}/typeshed"
  git config submodule."jedi/third_party/django-stubs".url "${srcdir}/django-stubs"
  git submodule update --recursive
}

build() {
  cd "$srcdir/$_gitname"

  python2 setup.py build
}

package() {
  cd "$srcdir/$_gitname"

  python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
}