From 5943a15f24b52e6bfa84defa7839c76d511f4048 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Sun, 10 Jun 2018 11:47:35 -0700 Subject: [PATCH] fix deoplete-jedi-git so it pulls in jedi and parso submodules --- deoplete-jedi-git/.SRCINFO | 8 ++++--- deoplete-jedi-git/PKGBUILD | 43 +++++++++++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/deoplete-jedi-git/.SRCINFO b/deoplete-jedi-git/.SRCINFO index 9759fb2..4c9cf47 100644 --- a/deoplete-jedi-git/.SRCINFO +++ b/deoplete-jedi-git/.SRCINFO @@ -7,11 +7,13 @@ pkgbase = deoplete-jedi-git license = MIT makedepends = git depends = deoplete-git - depends = python-jedi - depends = python2-jedi provides = deoplete-jedi conflicts = deoplete-jedi - source = deoplete-jedi::git://github.com/zchee/deoplete-jedi + source = git+https://github.com/zchee/deoplete-jedi + source = git+https://github.com/davidhalter/jedi.git + source = git+https://github.com/davidhalter/parso.git + md5sums = SKIP + md5sums = SKIP md5sums = SKIP pkgname = deoplete-jedi-git diff --git a/deoplete-jedi-git/PKGBUILD b/deoplete-jedi-git/PKGBUILD index 0dd4c6a..7ad97ea 100644 --- a/deoplete-jedi-git/PKGBUILD +++ b/deoplete-jedi-git/PKGBUILD @@ -17,38 +17,65 @@ arch=('any') url="https://github.com/zchee/deoplete-jedi" license=('MIT') groups=() -depends=('deoplete-git' 'python-jedi' 'python2-jedi') +depends=('deoplete-git') makedepends=('git') provides=('deoplete-jedi') conflicts=('deoplete-jedi') replaces=() backup=() options=() -source=("${_name}::${url//https/git}") +source=( +'git+https://github.com/zchee/deoplete-jedi' # deopletejedi +'git+https://github.com/davidhalter/jedi.git' # jedi +'git+https://github.com/davidhalter/parso.git' # parso +) noextract=() -md5sums=('SKIP') +md5sums=('SKIP' 'SKIP' 'SKIP') pkgver() { cd "${srcdir}/${_name}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } -# hack server.py so it doesn't source jedi and parso submodules prepare() { - cd "${srcdir}/${_name}/rplugin/python3/deoplete/sources/deoplete_jedi/" - sed -i -e 's/vendored//g' server.py + msg2 'Setting up Git submodules...' + + deopletejedi=("jedi" "parso") + gitprepare "deoplete-jedi" "rplugin/python3/deoplete/vendored/" "${deopletejedi[@]}" } +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 mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete" - cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \ + cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/"{sources,vendored} \ "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/" fi if [ "$_vim" = "y" ]; then mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete" - cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \ + cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/"{sources,vendored} \ "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/" fi