diff options
author | Larry Hajali <larryhaja[at]gmail[dot]com> | 2012-12-27 07:56:31 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-27 17:56:20 +0100 |
commit | c1a8fd49940a63b583b61403d3da5a8eb354b46a (patch) | |
tree | a3c90ee38b4662634bdcf73561f46d72bf22a71a /python | |
parent | 669a30ce99229883d6df0e2c6ef6bbd2fb81d744 (diff) | |
download | slackbuilds-c1a8fd49940a63b583b61403d3da5a8eb354b46a.tar.gz |
python/python-dateutil: Updated for version 2.1, added license.
Also added the new dependency six
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/python-dateutil/python-dateutil-2.1-open-utf-8.patch | 20 | ||||
-rw-r--r-- | python/python-dateutil/python-dateutil.SlackBuild | 29 | ||||
-rw-r--r-- | python/python-dateutil/python-dateutil.info | 8 |
3 files changed, 48 insertions, 9 deletions
diff --git a/python/python-dateutil/python-dateutil-2.1-open-utf-8.patch b/python/python-dateutil/python-dateutil-2.1-open-utf-8.patch new file mode 100644 index 0000000000..7b1784378f --- /dev/null +++ b/python/python-dateutil/python-dateutil-2.1-open-utf-8.patch @@ -0,0 +1,20 @@ +=== modified file 'setup.py' +--- setup.py 2012-04-29 13:32:22 +0000 ++++ setup.py 2012-04-29 13:34:16 +0000 +@@ -1,5 +1,6 @@ + #!/usr/bin/python + from os.path import isfile, join ++import codecs + import glob + import os + import re +@@ -13,7 +14,7 @@ + + TOPDIR = os.path.dirname(__file__) or "." + VERSION = re.search('__version__ = "([^"]+)"', +- open(TOPDIR + "/dateutil/__init__.py").read()).group(1) ++ codecs.open(TOPDIR + "/dateutil/__init__.py", encoding='utf-8').read()).group(1) + + + setup(name="python-dateutil", + diff --git a/python/python-dateutil/python-dateutil.SlackBuild b/python/python-dateutil/python-dateutil.SlackBuild index f8f949ce34..b0e6e3e7c6 100644 --- a/python/python-dateutil/python-dateutil.SlackBuild +++ b/python/python-dateutil/python-dateutil.SlackBuild @@ -2,19 +2,35 @@ # Slackware build script for python-dateutil -# Written by Larry Hajali <larryhaja[at]gmail[dot]com> +# Copyright 2012 Larry Hajali <larryhaja[at]gmail[dot]com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=python-dateutil -VERSION=1.5 +VERSION=${VERSION:-2.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -39,13 +55,16 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Fix UnicodeDecodeError in setup.py. From upstream. +patch -p0 < $CWD/python-dateutil-2.1-open-utf-8.patch + python setup.py install --root=$PKG find $PKG | xargs 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 LICENSE NEWS README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE NEWS PKG-INFO README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/python/python-dateutil/python-dateutil.info b/python/python-dateutil/python-dateutil.info index 874241ed6f..a4643cb012 100644 --- a/python/python-dateutil/python-dateutil.info +++ b/python/python-dateutil/python-dateutil.info @@ -1,10 +1,10 @@ PRGNAM="python-dateutil" -VERSION="1.5" +VERSION="2.1" HOMEPAGE="http://labix.org/python-dateutil" -DOWNLOAD="http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz" -MD5SUM="35f3732db3f2cc4afdc68a8533b60a52" +DOWNLOAD="http://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.1.tar.gz" +MD5SUM="1534bb15cf311f07afaa3aacba1c028b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="distribute" +REQUIRES="distribute six" MAINTAINER="Larry Hajali" EMAIL="larryhaja[at]gmail[dot]com" |