slackbuilds/l/jedi/SlackBuild

52 lines
1.4 KiB
Text
Raw Normal View History

2013-01-14 11:22:53 +01:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +%F | tr - .)
BUILD=1
ARCH=noarch
2020-06-25 11:23:11 +02:00
HOME=/home/gwh
TAG=gwh
2013-01-14 11:22:53 +01:00
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=/usr
rm -fr $PKG $TMP/$PRGNAM
2013-01-14 11:22:53 +01:00
mkdir -p $TMP
# mise en place
[ ! -e $REPOSITORY ] && git clone https://github.com/davidhalter/jedi.git $REPOSITORY
( cd $REPOSITORY && git pull )
VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
cp -R $REPOSITORY $TMP/$PRGNAM
cd $TMP/$PRGNAM
2013-01-14 11:22:53 +01:00
python setup.py install --root $PKG
VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "$PRGNAM-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION
2013-01-14 11:22:53 +01:00
mkdir -p $PKG/install
cat <<EOF > $PKG/install
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (an awesome Python auto-completion)
$PRGNAM:
2013-01-14 11:22:53 +01:00
$PRGNAM: Jedi is an autocompletion tool for Python. It works.
$PRGNAM: With and without syntax errors. Sometimes it sucks, but that's normal
$PRGNAM: in dynamic languages. But it sucks less than other tools. It
$PRGNAM: understands almost all of the basic Python syntax elements including
$PRGNAM: many builtins.
$PRGNAM:
$PRGNAM:
2013-01-14 11:22:53 +01:00
$PRGNAM:
$PRGNAM: https://github.com/davidhalter/jedi
EOF
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2020-07-12 09:22:26 +02:00
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz