stronger python package version parsing
This commit is contained in:
parent
465824bd6c
commit
dd1adac6bb
4 changed files with 16 additions and 7 deletions
2
TODO.org
2
TODO.org
|
@ -1,2 +1,2 @@
|
|||
* update VERSION of python packages with this (see elpy.SlackBuild):
|
||||
VERSION=$(grep -i "^version:" /usr/lib$(uname -m | grep -o 64)/python*/site-packages/$PRGNAM-*-py*.egg-info | grep -o "[0-9.]*")_$VERSION
|
||||
VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "jedi-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
# variables
|
||||
VERSION=go1
|
||||
VERSION=${VERSION:-$(date +%F | tr - .)}
|
||||
BUILD=1
|
||||
|
||||
TAG=cyco
|
||||
|
@ -16,6 +16,8 @@ ARCH=$(uname -m)
|
|||
|
||||
PREFIX=/usr
|
||||
|
||||
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
||||
|
||||
# nettoyage préalable
|
||||
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
||||
|
||||
|
@ -35,11 +37,16 @@ esac
|
|||
|
||||
# mise en place
|
||||
cd $TMP
|
||||
[ ! -e $CWD/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz ] && wget -c http://$PRGNAM.googlecode.com/files/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz -O $CWD/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz
|
||||
[ ! -e $REPOSITORY ] \
|
||||
&& hg clone -u release https://code.google.com/p/go $REPOSITORY \
|
||||
|| (cd $REPOSITORY && hg pull -u)
|
||||
|
||||
mkdir -p $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")
|
||||
cp -R $REPOSITORY $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")/
|
||||
rm -fr $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")/$PRGNAM/.hg*
|
||||
cd $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")/$PRGNAM/src
|
||||
./all.bash
|
||||
|
||||
mkdir -p $PKG$PREFIX/
|
||||
cd $PKG$PREFIX/
|
||||
tar xf $CWD/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
|
|
|
@ -36,7 +36,7 @@ cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION
|
|||
cd $TMP/$PRGNAM-$VERSION
|
||||
python setup.py install --root $PKG
|
||||
|
||||
VERSION=$(grep -i "^version:" /usr/lib$(uname -m | grep -o 64)/python*/site-packages/$PRGNAM-*-py*.egg-info | grep -o "[0-9.]*")_$VERSION
|
||||
VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "$PRGNAM-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install
|
||||
|
|
|
@ -36,6 +36,8 @@ cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION
|
|||
cd $TMP/$PRGNAM-$VERSION
|
||||
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
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
|
|
Loading…
Reference in a new issue