From 12d1829e257feeec8cff59d83555a35782d47f67 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Thu, 16 Aug 2007 06:49:12 +0000 Subject: python-soappy: update to 0.11.6 --- .../python/python-soappy-0.11.3/.mtn2git_empty | 0 packages/python/python-soappy-0.11.3/fpconst.py | 111 --------------------- packages/python/python-soappy/.mtn2git_empty | 0 packages/python/python-soappy/fix-future.patch | 54 ++++++++++ packages/python/python-soappy/fpconst.py | 111 +++++++++++++++++++++ packages/python/python-soappy_0.11.3.bb | 18 ---- packages/python/python-soappy_0.11.6.bb | 18 ++++ 7 files changed, 183 insertions(+), 129 deletions(-) delete mode 100644 packages/python/python-soappy-0.11.3/.mtn2git_empty delete mode 100644 packages/python/python-soappy-0.11.3/fpconst.py create mode 100644 packages/python/python-soappy/.mtn2git_empty create mode 100644 packages/python/python-soappy/fix-future.patch create mode 100644 packages/python/python-soappy/fpconst.py delete mode 100644 packages/python/python-soappy_0.11.3.bb create mode 100644 packages/python/python-soappy_0.11.6.bb (limited to 'packages/python') diff --git a/packages/python/python-soappy-0.11.3/.mtn2git_empty b/packages/python/python-soappy-0.11.3/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/python/python-soappy-0.11.3/fpconst.py b/packages/python/python-soappy-0.11.3/fpconst.py deleted file mode 100644 index a1f8f47e3a..0000000000 --- a/packages/python/python-soappy-0.11.3/fpconst.py +++ /dev/null @@ -1,111 +0,0 @@ -"""Utilities for handling IEEE 754 floating point special values - -This python module implements constants and functions for working with -IEEE754 double-precision special values. It provides constants for -Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity -(NegInf), as well as functions to test for these values. - -The code is implemented in pure python by taking advantage of the -'struct' standard module. Care has been taken to generate proper -results on both big-endian and little-endian machines. Some efficiency -could be gained by translating the core routines into C. - -See -for reference material on the IEEE 754 floating point standard. - -Further information on this package is available at -. - -Author: Gregory R. Warnes -Date:: 2003-04-08 -Copyright: (c) 2003, Pfizer, Inc. -""" - -__version__ = "0.6.0" -ident = "$Id: fpconst.py,v 1.8 2003/05/12 15:14:00 warnes Exp $" - -import struct - -# check endianess -_big_endian = struct.pack('i',1)[0] != '\x01' - -# and define appropriate constants -if(_big_endian): - _HW = 0 - _LW = 1 - - NaN = struct.unpack('d', '\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF')[0] - PosInf = struct.unpack('d', '\x7F\xF0\x00\x00\x00\x00\x00\x00')[0] - NegInf = -PosInf - -else: - _HW = 1 - _LW = 0 - - NaN = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf8\xff')[0] - PosInf = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf0\x7f')[0] - NegInf = -PosInf - -def _double_as_longs(dval): - "Use struct.unpack to decode a double precision float into two longs" - tmp = struct.unpack('ll',struct.pack('d', dval)) - return (tmp[_HW], tmp[_LW]) - - -## -## Functions to extract components of the IEEE 754 floating point format -## - -def _sign(dval): - "Extract the sign bit from a double-precision floating point value" - ll = _double_as_longs(dval) - return ll[0] >> 31 & 0x01 - -def _exponent(dval): - """Extract the exponentent bits from a double-precision floating - point value. - - Note that for normalized values, the exponentdent bits have an offset - of 1023. As a consequence, the actual exponentent is obtained - by subtracting 1023 for the value returned by this function - """ - ll = _double_as_longs(dval) - return (ll[0] >> 20) & 0x7ff - -def _mantissa(dval): - """Extract the _mantissa bits from a double-precision floating - point value.""" - - ll = _double_as_longs(dval) - mantissa0 = (ll[0] & 0x000fffffL) << 32 - mantissa1 = ll[1] - return mantissa0 + mantissa1 - -## -## Functions to test for IEEE 754 special values -## - -def isNaN(value): - "Determine if the argument is a IEEE 754 NaN (Not a Number) value." - return (_exponent(value)==0x7ff and _mantissa(value)!=0) - -def isInf(value): - """Determine if the argument is an infinite IEEE 754 value (positive - or negative inifinity)""" - return (_exponent(value)==0x7ff and _mantissa(value)== 0) - -def isFinite(value): - """Determine if the argument is an finite IEEE 754 value (i.e., is - not NaN, positive or negative inifinity)""" - return (_exponent(value)!=0x7ff) - - -def isPosInf(value): - "Determine if the argument is a IEEE 754 positive infinity value" - return (_sign(value)==0 and _exponent(value)==0x7ff and \ - _mantissa(value)== 0) - -def isNegInf(value): - "Determine if the argument is a IEEE 754 negative infinity value" - return (_sign(value)==1 and _exponent(value)==0x7ff and \ - _mantissa(value)== 0) diff --git a/packages/python/python-soappy/.mtn2git_empty b/packages/python/python-soappy/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/python/python-soappy/fix-future.patch b/packages/python/python-soappy/fix-future.patch new file mode 100644 index 0000000000..6c14e32c16 --- /dev/null +++ b/packages/python/python-soappy/fix-future.patch @@ -0,0 +1,54 @@ +Index: SOAPpy-0.11.6/SOAPpy/Client.py +=================================================================== +--- SOAPpy-0.11.6.orig/SOAPpy/Client.py ++++ SOAPpy-0.11.6/SOAPpy/Client.py +@@ -39,12 +39,11 @@ + # + ################################################################################ + """ ++from __future__ import nested_scopes + + ident = '$Id: Client.py,v 1.20 2004/04/10 04:22:52 irjudson Exp $' + from version import __version__ + +-from __future__ import nested_scopes +- + #import xml.sax + import urllib + from types import * +Index: SOAPpy-0.11.6/SOAPpy/Types.py +=================================================================== +--- SOAPpy-0.11.6.orig/SOAPpy/Types.py ++++ SOAPpy-0.11.6/SOAPpy/Types.py +@@ -32,12 +32,11 @@ + # + ################################################################################ + """ ++from __future__ import nested_scopes + + ident = '$Id: Types.py,v 1.17 2004/09/11 03:03:33 warnes Exp $' + from version import __version__ + +-from __future__ import nested_scopes +- + import UserList + import base64 + import cgi +Index: SOAPpy-0.11.6/SOAPpy/Server.py +=================================================================== +--- SOAPpy-0.11.6.orig/SOAPpy/Server.py ++++ SOAPpy-0.11.6/SOAPpy/Server.py +@@ -39,12 +39,11 @@ + # + ################################################################################ + """ ++from __future__ import nested_scopes + + ident = '$Id: Server.py,v 1.20 2004/04/28 21:47:10 warnes Exp $' + from version import __version__ + +-from __future__ import nested_scopes +- + #import xml.sax + import re + import socket diff --git a/packages/python/python-soappy/fpconst.py b/packages/python/python-soappy/fpconst.py new file mode 100644 index 0000000000..a1f8f47e3a --- /dev/null +++ b/packages/python/python-soappy/fpconst.py @@ -0,0 +1,111 @@ +"""Utilities for handling IEEE 754 floating point special values + +This python module implements constants and functions for working with +IEEE754 double-precision special values. It provides constants for +Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity +(NegInf), as well as functions to test for these values. + +The code is implemented in pure python by taking advantage of the +'struct' standard module. Care has been taken to generate proper +results on both big-endian and little-endian machines. Some efficiency +could be gained by translating the core routines into C. + +See +for reference material on the IEEE 754 floating point standard. + +Further information on this package is available at +. + +Author: Gregory R. Warnes +Date:: 2003-04-08 +Copyright: (c) 2003, Pfizer, Inc. +""" + +__version__ = "0.6.0" +ident = "$Id: fpconst.py,v 1.8 2003/05/12 15:14:00 warnes Exp $" + +import struct + +# check endianess +_big_endian = struct.pack('i',1)[0] != '\x01' + +# and define appropriate constants +if(_big_endian): + _HW = 0 + _LW = 1 + + NaN = struct.unpack('d', '\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF')[0] + PosInf = struct.unpack('d', '\x7F\xF0\x00\x00\x00\x00\x00\x00')[0] + NegInf = -PosInf + +else: + _HW = 1 + _LW = 0 + + NaN = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf8\xff')[0] + PosInf = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf0\x7f')[0] + NegInf = -PosInf + +def _double_as_longs(dval): + "Use struct.unpack to decode a double precision float into two longs" + tmp = struct.unpack('ll',struct.pack('d', dval)) + return (tmp[_HW], tmp[_LW]) + + +## +## Functions to extract components of the IEEE 754 floating point format +## + +def _sign(dval): + "Extract the sign bit from a double-precision floating point value" + ll = _double_as_longs(dval) + return ll[0] >> 31 & 0x01 + +def _exponent(dval): + """Extract the exponentent bits from a double-precision floating + point value. + + Note that for normalized values, the exponentdent bits have an offset + of 1023. As a consequence, the actual exponentent is obtained + by subtracting 1023 for the value returned by this function + """ + ll = _double_as_longs(dval) + return (ll[0] >> 20) & 0x7ff + +def _mantissa(dval): + """Extract the _mantissa bits from a double-precision floating + point value.""" + + ll = _double_as_longs(dval) + mantissa0 = (ll[0] & 0x000fffffL) << 32 + mantissa1 = ll[1] + return mantissa0 + mantissa1 + +## +## Functions to test for IEEE 754 special values +## + +def isNaN(value): + "Determine if the argument is a IEEE 754 NaN (Not a Number) value." + return (_exponent(value)==0x7ff and _mantissa(value)!=0) + +def isInf(value): + """Determine if the argument is an infinite IEEE 754 value (positive + or negative inifinity)""" + return (_exponent(value)==0x7ff and _mantissa(value)== 0) + +def isFinite(value): + """Determine if the argument is an finite IEEE 754 value (i.e., is + not NaN, positive or negative inifinity)""" + return (_exponent(value)!=0x7ff) + + +def isPosInf(value): + "Determine if the argument is a IEEE 754 positive infinity value" + return (_sign(value)==0 and _exponent(value)==0x7ff and \ + _mantissa(value)== 0) + +def isNegInf(value): + "Determine if the argument is a IEEE 754 negative infinity value" + return (_sign(value)==1 and _exponent(value)==0x7ff and \ + _mantissa(value)== 0) diff --git a/packages/python/python-soappy_0.11.3.bb b/packages/python/python-soappy_0.11.3.bb deleted file mode 100644 index 6ae59ac515..0000000000 --- a/packages/python/python-soappy_0.11.3.bb +++ /dev/null @@ -1,18 +0,0 @@ -DESCRIPTION = "Python SOAP Bindings" -SECTION = "devel/python" -PRIORITY = "optional" -LICENSE = "BSD" -RDEPENDS = "python-core python-xml python-fpconst" -SRCNAME = "SOAPpy" - -SRC_URI = "${SOURCEFORGE_MIRROR}/pywebsvcs/${SRCNAME}-${PV}.tar.gz \ - file://fpconst.py" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit distutils - -# *cough*, yes this is a bit hackish.. but for now ;) - -do_compile_prepend() { - install -m 0644 ${WORKDIR}/fpconst.py ${S}/SOAPpy/fpconst.py -} diff --git a/packages/python/python-soappy_0.11.6.bb b/packages/python/python-soappy_0.11.6.bb new file mode 100644 index 0000000000..2f156acc06 --- /dev/null +++ b/packages/python/python-soappy_0.11.6.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Python SOAP Bindings" +SECTION = "devel/python" +HOMEPAGE = "http://pywebsvcs.sourceforge.net/" +PRIORITY = "optional" +LICENSE = "BSD" +RDEPENDS = "python-xml python-fpconst" +SRCNAME = "SOAPpy" + +SRC_URI = "${SOURCEFORGE_MIRROR}/pywebsvcs/${SRCNAME}-${PV}.tar.gz \ + file://fix-future.patch;patch=1 \ + file://fpconst.py" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit distutils + +do_compile_prepend() { + install -m 0644 ${WORKDIR}/fpconst.py ${S}/SOAPpy/fpconst.py +} -- cgit v1.2.3