add option deoplete-jedi-git

This commit is contained in:
Trent Palmer 2020-04-21 14:58:17 -07:00
parent ef3a4cf183
commit 9020c049cd
2 changed files with 49 additions and 32 deletions

View File

@ -1,21 +1,18 @@
pkgbase = deoplete-jedi-git
pkgdesc = jedi add-on for deoplete completion plugin for neovim
pkgver = r381.42f4c24
pkgrel = 1
pkgrel = 2
url = https://github.com/deoplete-plugins/deoplete-jedi
arch = any
license = MIT
makedepends = git
depends = deoplete
depends = python-jedi
depends = python-parso
depends = python-numpydoc
provides = deoplete-jedi
conflicts = deoplete-jedi
source = git+https://github.com/deoplete-plugins/deoplete-jedi
source = git+https://github.com/davidhalter/jedi.git
source = git+https://github.com/davidhalter/typeshed.git
source = git+https://github.com/davidhalter/parso.git
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
pkgname = deoplete-jedi-git

View File

@ -4,14 +4,14 @@
# Build Options
###########################################################################################################
_vim="y"
_use_system_jedi="y"
_neovim="n"
###########################################################################################################
_name='deoplete-jedi'
pkgname="${_name}-git"
pkgver=r381.42f4c24
pkgrel=1
pkgrel=2
pkgdesc="jedi add-on for deoplete completion plugin for neovim"
arch=('any')
url="https://github.com/deoplete-plugins/deoplete-jedi"
@ -26,26 +26,36 @@ backup=()
options=()
source=(
'git+https://github.com/deoplete-plugins/deoplete-jedi' # deopletejedi
'git+https://github.com/davidhalter/jedi.git' # jedi
'git+https://github.com/davidhalter/typeshed.git' # jedi
'git+https://github.com/davidhalter/parso.git' # parso
)
noextract=()
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
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")
gitprepare "deoplete-jedi" "rplugin/python3/deoplete/vendored/" "${deopletejedi[@]}"
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() {
@ -72,6 +82,7 @@ gitprepare() {
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" \
@ -80,11 +91,16 @@ package() {
"$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
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \
"$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
fi
if [ "$_vim" = "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" \
@ -93,6 +109,10 @@ package() {
"$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
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \
"$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
fi