aur-packages/deoplete-jedi-git/PKGBUILD

130 lines
5.3 KiB
Bash
Raw Permalink Normal View History

2017-12-28 14:52:32 -08:00
# 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
2018-06-08 01:00:34 -07:00
_neovim="n"
###########################################################################################################
2017-12-28 14:52:32 -08:00
_name='deoplete-jedi'
pkgname="${_name}-git"
pkgver=r404.4a13930
pkgrel=1
2017-12-28 14:52:32 -08:00
pkgdesc="jedi add-on for deoplete completion plugin for neovim"
arch=('any')
url="https://github.com/deoplete-plugins/deoplete-jedi"
2017-12-28 14:52:32 -08:00
license=('MIT')
groups=()
# depends=('deoplete')
depends=('deoplete' 'python-jedi' 'python-parso' 'python-numpydoc')
2017-12-28 14:52:32 -08:00
makedepends=('git')
2018-01-02 01:09:32 -08:00
provides=('deoplete-jedi')
conflicts=('deoplete-jedi')
replaces=()
2017-12-28 14:52:32 -08:00
backup=()
options=()
source=(
'git+https://github.com/deoplete-plugins/deoplete-jedi' # deopletejedi
)
2017-12-28 14:52:32 -08:00
noextract=()
2020-04-21 14:58:17 -07:00
md5sums=('SKIP')
2017-12-28 14:52:32 -08:00
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
2020-04-21 14:58:17 -07:00
# 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
# }
2020-04-21 14:58:17 -07:00
# 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
# }
2017-12-28 14:52:32 -08:00
2017-12-28 14:52:32 -08:00
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
2017-12-28 14:52:32 -08:00
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
2017-12-28 14:52:32 -08:00
}