diff options
Diffstat (limited to 'libraries/simplejson')
-rw-r--r-- | libraries/simplejson/README | 6 | ||||
-rw-r--r-- | libraries/simplejson/setup.py.patch | 22 | ||||
-rw-r--r-- | libraries/simplejson/simplejson.SlackBuild | 60 | ||||
-rw-r--r-- | libraries/simplejson/simplejson.info | 8 | ||||
-rw-r--r-- | libraries/simplejson/slack-desc | 19 |
5 files changed, 115 insertions, 0 deletions
diff --git a/libraries/simplejson/README b/libraries/simplejson/README new file mode 100644 index 000000000000..42d514dffba7 --- /dev/null +++ b/libraries/simplejson/README @@ -0,0 +1,6 @@ +simplejson is a simple, fast, complete, correct and extensible +JSON <http://json.org> encoder and decoder for Python 2.4+. +It is pure Python code, but includes an optional C extension +for a serious speed boost. + +Requires pysetuptools.
\ No newline at end of file diff --git a/libraries/simplejson/setup.py.patch b/libraries/simplejson/setup.py.patch new file mode 100644 index 000000000000..da22d796ffa8 --- /dev/null +++ b/libraries/simplejson/setup.py.patch @@ -0,0 +1,22 @@ +diff -Naur simplejson-2.0.9.orig/setup.py simplejson-2.0.9/setup.py +--- simplejson-2.0.9.orig/setup.py 2009-02-18 23:39:19.000000000 +0000 ++++ simplejson-2.0.9/setup.py 2009-04-13 04:34:39.000000000 +0000 +@@ -1,17 +1,7 @@ + #!/usr/bin/env python + +-from ez_setup import use_setuptools ++import setuptools + import sys +-if 'cygwin' in sys.platform.lower(): +- min_version='0.6c6' +-else: +- min_version='0.6a9' +-try: +- use_setuptools(min_version=min_version) +-except TypeError: +- # If a non-local ez_setup is already imported, it won't be able to +- # use the min_version kwarg and will bail with TypeError +- use_setuptools() + + from setuptools import setup, find_packages, Extension, Feature + from distutils.command.build_ext import build_ext diff --git a/libraries/simplejson/simplejson.SlackBuild b/libraries/simplejson/simplejson.SlackBuild new file mode 100644 index 000000000000..8210db4a71de --- /dev/null +++ b/libraries/simplejson/simplejson.SlackBuild @@ -0,0 +1,60 @@ +#!/bin/sh +# Slackware build script for simplejson +# Written by Larry Hajali <larryhaja[at]gail[dot]com> + +PRGNAM=simplejson +VERSION=${VERSION:-2.0.9} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$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 {} \; + +# Lets use the system setup tools rather then ez_setup. +patch -p1 < $CWD/setup.py.patch + +python setup.py install --root=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html +cp -a LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION +cp -aR docs/* $PKG/usr/doc/$PRGNAM-$VERSION/html/ +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.tgz diff --git a/libraries/simplejson/simplejson.info b/libraries/simplejson/simplejson.info new file mode 100644 index 000000000000..35a594cb0267 --- /dev/null +++ b/libraries/simplejson/simplejson.info @@ -0,0 +1,8 @@ +PRGNAM="simplejson" +VERSION="2.0.9" +HOMEPAGE="http://undefined.org/python/#simplejson" +DOWNLOAD="http://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.9.tar.gz" +MD5SUM="af5e67a39ca3408563411d357e6d5e47" +MAINTAINER="Larry Hajali" +EMAIL="larryhaja[at]gmail[dot]com" +APPROVED="dsomero" diff --git a/libraries/simplejson/slack-desc b/libraries/simplejson/slack-desc new file mode 100644 index 000000000000..efcaa42845e7 --- /dev/null +++ b/libraries/simplejson/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 ':'. + + |-----handy-ruler------------------------------------------------------| +simplejson: simplejson (extensible JSON encoder and decoder for Python) +simplejson: +simplejson: Simplejson is a simple, fast, complete, correct and extensible JSON +simplejson: encoder and decoder for Python 2.3+. It is pure Python code, but +simplejson: includes an optional C extension for a serious speed boost. +simplejson: +simplejson: Homepage: http://undefined.org/python/#simplejson +simplejson: +simplejson: +simplejson: +simplejson: |