diff options
Diffstat (limited to 'academic/pyCRAC/pyCRAC.SlackBuild')
-rw-r--r-- | academic/pyCRAC/pyCRAC.SlackBuild | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/academic/pyCRAC/pyCRAC.SlackBuild b/academic/pyCRAC/pyCRAC.SlackBuild index af4e827e0f115..bf5735f064996 100644 --- a/academic/pyCRAC/pyCRAC.SlackBuild +++ b/academic/pyCRAC/pyCRAC.SlackBuild @@ -23,15 +23,22 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=pyCRAC -VERSION=${VERSION:-1.3.3} +VERSION=${VERSION:-1.4.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -SRCNAM=sgrann-pycrac -SRCVER=${SRCVER:-fafa1e7d1fae} +# pyCRAC works with python2 as well as python3; +# Note that python2 is being phased out; therefore python3 is set as default. +# This is the same for the python pyCrac dependencies + +#set which python version to install it for +PYTHON2=false +PYTHON3=true + PIPENAM=kinetic_crac_pipeline -PIPEVER=${PIPEVER:-1bdb8c231d2d} +PIPEVER=${PIPEVER:-ffe91cc6bf7a} +PIPETAG=sgrann if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -65,20 +72,24 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$SRCVER -tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz || tar xvf $CWD/$SRCVER.tar.gz -cd $SRCNAM-$SRCVER +rm -rf $PRGNAM-$VERSION +rm -rf $PIPETAG-$PIPENAM-$PIPEVER +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION mkdir $PRGNAM/$PIPENAM -tar xvf $CWD/sgrann-$PIPENAM-$PIPEVER.tar.gz -C $PRGNAM/$PIPENAM --strip-components=1 || \ - tar xvf $CWD/$PIPEVER.tar.gz -C $PRGNAM/$PIPENAM --strip-components=1 -#replace setup.py +if [[ -f $CWD/$PIPETAG-$PIPENAM-$PIPEVER.tar.gz ]]; then + tar xvf $CWD/$PIPETAG-$PIPENAM-$PIPEVER.tar.gz -C $PRGNAM/$PIPENAM --strip-components=1 +elif [[ -f $CWD/$PIPEVER.tar.gz ]]; then + tar xvf $CWD/$PIPEVER.tar.gz -C $PRGNAM/$PIPENAM --strip-components=1 +fi + +#replace setup.py; test.sh rm setup.py cp $CWD/setup_slack.py setup.py -#replace Manifest -rm MANIFEST.txt -cp $CWD/MANIFEST_slack.txt MANIFEST.txt +rm tests/test.sh +cp $CWD/test_slack.sh tests/test.sh chown -R root:root . find -L . \ @@ -87,7 +98,12 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python setup.py install --root=$PKG +if $PYTHON2; then + python setup.py install --root=$PKG +fi +if $PYTHON3; then + python3 setup.py install --root=$PKG +fi find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -99,8 +115,8 @@ cp $PRGNAM/$PIPENAM/gaussianProcessAnalysis.R $PKG/usr/share/$PRGNAM-$VERSION/$P # the manual etc. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - LICENCE.txt README.txt "The pyCRAC Manual.pdf" VERSION.txt \ - $CWD/README.tests $CWD/setup_slack.py $CWD/MANIFEST_slack.txt \ + README.md \ + $CWD/README.tests $CWD/setup_slack.py \ $CWD/README \ $PKG/usr/doc/$PRGNAM-$VERSION cp -a $PRGNAM/$PIPENAM/README.md $PKG/usr/doc/$PRGNAM-$VERSION/$PIPENAM-README.md |