fix deoplete-jedi-git so it pulls in jedi and parso

submodules
This commit is contained in:
Trent Palmer 2018-06-10 11:47:35 -07:00
parent 7d13d46b50
commit 5943a15f24
2 changed files with 40 additions and 11 deletions

View File

@ -7,11 +7,13 @@ pkgbase = deoplete-jedi-git
license = MIT license = MIT
makedepends = git makedepends = git
depends = deoplete-git depends = deoplete-git
depends = python-jedi
depends = python2-jedi
provides = deoplete-jedi provides = deoplete-jedi
conflicts = 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 md5sums = SKIP
pkgname = deoplete-jedi-git pkgname = deoplete-jedi-git

View File

@ -17,38 +17,65 @@ arch=('any')
url="https://github.com/zchee/deoplete-jedi" url="https://github.com/zchee/deoplete-jedi"
license=('MIT') license=('MIT')
groups=() groups=()
depends=('deoplete-git' 'python-jedi' 'python2-jedi') depends=('deoplete-git')
makedepends=('git') makedepends=('git')
provides=('deoplete-jedi') provides=('deoplete-jedi')
conflicts=('deoplete-jedi') conflicts=('deoplete-jedi')
replaces=() replaces=()
backup=() backup=()
options=() 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=() noextract=()
md5sums=('SKIP') md5sums=('SKIP' 'SKIP' 'SKIP')
pkgver() { pkgver() {
cd "${srcdir}/${_name}" cd "${srcdir}/${_name}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 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() { prepare() {
cd "${srcdir}/${_name}/rplugin/python3/deoplete/sources/deoplete_jedi/" msg2 'Setting up Git submodules...'
sed -i -e 's/vendored//g' server.py
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() { package() {
if [ "$_neovim" = "y" ]; then if [ "$_neovim" = "y" ]; then
mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete" 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/" "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
fi fi
if [ "$_vim" = "y" ]; then if [ "$_vim" = "y" ]; then
mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete" 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/" "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/"
fi fi