diff options
-rw-r--r-- | python/python-sh/README | 6 | ||||
-rw-r--r-- | python/python-sh/python-sh.SlackBuild | 55 | ||||
-rw-r--r-- | python/python-sh/python-sh.info | 10 | ||||
-rw-r--r-- | python/python-sh/slack-desc | 19 |
4 files changed, 90 insertions, 0 deletions
diff --git a/python/python-sh/README b/python/python-sh/README new file mode 100644 index 0000000000..5d7ae670f6 --- /dev/null +++ b/python/python-sh/README @@ -0,0 +1,6 @@ +sh (previously pbs) is a full-fledged subprocess interface for Python that +allows you to call any program as if it were a function. + +Eg: +from sh import ifconfig +print(ifconfig("wlan0")) diff --git a/python/python-sh/python-sh.SlackBuild b/python/python-sh/python-sh.SlackBuild new file mode 100644 index 0000000000..3914d3f3c4 --- /dev/null +++ b/python/python-sh/python-sh.SlackBuild @@ -0,0 +1,55 @@ +#!/bin/sh + +# Slackware build script for python-sh + +# Written by Larry Hajali <larryhaja[at]gmail[dot]com> + +PRGNAM=python-sh +VERSION=${VERSION:-1.07} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf ${PRGNAM/python-/}-$VERSION +tar xvf $CWD/${PRGNAM/python-/}-$VERSION.tar.gz +cd ${PRGNAM/python-/}-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +python setup.py install --root=$PKG + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS.md LICENSE.txt PKG-INFO README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/python/python-sh/python-sh.info b/python/python-sh/python-sh.info new file mode 100644 index 0000000000..d3cf63b742 --- /dev/null +++ b/python/python-sh/python-sh.info @@ -0,0 +1,10 @@ +PRGNAM="python-sh" +VERSION="1.07" +HOMEPAGE="http://amoffat.github.com/sh/index.html" +DOWNLOAD="http://pypi.python.org/packages/source/s/sh/sh-1.07.tar.gz" +MD5SUM="68edad68bd108df713f1424bc65468e9" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Larry Hajali" +EMAIL="larryhaja[at]gmail[dot]com" diff --git a/python/python-sh/slack-desc b/python/python-sh/slack-desc new file mode 100644 index 0000000000..856bf3936c --- /dev/null +++ b/python/python-sh/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +python-sh: python-sh (full-fledged subprocess interface for Python) +python-sh: +python-sh: sh (previously pbs) is a full-fledged subprocess interface for Python +python-sh: that allows you to call any program as if it were a function. +python-sh: +python-sh: Homepage: http://amoffat.github.com/sh/index.html +python-sh: +python-sh: +python-sh: +python-sh: +python-sh: |