blob: 9c91c88fe267b8ec8cab0602b609984986ac32ad (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# Maintainer: Trent Palmer trenttdually at gmail
###########################################################################################################
# Build Options
###########################################################################################################
# seems to work for both vim or neovim if you install for vim,
# but doesn't work for vim if you only install for neovim
_vim="y"
# _use_system_jedi="y" # no more bundled jedi module
_neovim="n"
###########################################################################################################
_name='deoplete-jedi'
pkgname="${_name}-git"
pkgver=r404.4a13930
pkgrel=1
pkgdesc="jedi add-on for deoplete completion plugin for neovim"
arch=('any')
url="https://github.com/deoplete-plugins/deoplete-jedi"
license=('MIT')
groups=()
# depends=('deoplete')
depends=('deoplete' 'python-jedi' 'python-parso' 'python-numpydoc')
makedepends=('git')
provides=('deoplete-jedi')
conflicts=('deoplete-jedi')
replaces=()
backup=()
options=()
source=(
'git+https://github.com/deoplete-plugins/deoplete-jedi' # deopletejedi
)
noextract=()
md5sums=('SKIP')
pkgver() {
cd "${srcdir}/${_name}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
# if [[ "$_use_system_jedi" == "y" ]]; then
# depends+=('python-jedi' 'python-parso' 'python-numpydoc')
# fi
#
# if [[ "$_use_system_jedi" == "n" ]]; then
# source+=('git+https://github.com/davidhalter/jedi.git') # jedi
# source+=('git+https://github.com/davidhalter/typeshed.git') # jedi
# source+=('git+https://github.com/davidhalter/parso.git') # parso
# md5sums+=('SKIP' 'SKIP' 'SKIP')
# fi
# prepare() {
# msg2 'Setting up Git submodules...'
#
# deopletejedi=("jedi" "parso")
# deopletejeditypeshed=("typeshed")
#
# if [[ "$_use_system_jedi" == "n" ]]; then
# gitprepare "deoplete-jedi" "rplugin/python3/deoplete/vendored/" "${deopletejedi[@]}"
# gitprepare "deoplete-jedi/rplugin/python3/deoplete/vendored/jedi" "jedi/third_party/" "${deopletejeditypeshed[@]}"
# fi
# }
# gitprepare() {
# local CD_DIR=$1
# local GIT_PREFIX=$2
# c=0
# for val in "$@" ; do
# if [ $c -gt 1 ]; then
# FEED[$c]=$val
# fi
# c=$(( c + 1 ))
# done
#
# cd "$srcdir/$CD_DIR" || exit
#
# git submodule init
# for GITSUBVAR in "${FEED[@]}" ; do
# git config submodule."$GIT_PREFIX$GITSUBVAR".url "$srcdir/$GITSUBVAR"
# done
# git submodule update
# unset -v FEED
# }
package() {
if [ "$_neovim" = "y" ]; then
# if [[ "$_use_system_jedi" == "n" ]]; then
# mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/vendored/jedi"
# mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/vendored/parso"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/vendored/parso/parso" \
# "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/vendored/parso/"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/vendored/jedi/jedi" \
# "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/vendored/jedi/"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/vendored/jedi/jedi/third_party/typeshed"{stdlib,third_party} \
# "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/vendored/jedi/jedi/third_party/typeshed/"
# fi
# if [[ "$_use_system_jedi" == "y" ]]; then
# mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete"
# fi
mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete" \
"$pkgdir/usr/share/nvim/runtime/rplugin/python3/"
fi
if [ "$_vim" = "y" ]; then
# if [[ "$_use_system_jedi" == "n" ]]; then
# mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/vendored/jedi"
# mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/vendored/parso"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/vendored/parso/parso" \
# "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/vendored/parso/"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/vendored/jedi/jedi" \
# "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/vendored/jedi/"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/vendored/jedi/jedi/third_party/typeshed/"{stdlib,third_party} \
# "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/vendored/jedi/jedi/third_party/typeshed/"
# fi
# if [[ "$_use_system_jedi" == "y" ]]; then
# mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete"
# fi
mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3"
# cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/"
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete" \
"$pkgdir/usr/share/vim/vimfiles/rplugin/python3/"
fi
install -D -m644 "${srcdir}/${_name}/README.md" "$pkgdir"/usr/share/doc/$pkgname/README.md
install -D -m644 "${srcdir}/${_name}/LICENSE" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|