debian/0000755000000000000000000000000012133614531007165 5ustar debian/docs0000644000000000000000000000000711633476157010053 0ustar README debian/copyright0000644000000000000000000000406211633476157011140 0ustar This package was debianized by Yaroslav Halchenko on Sun, 4 Feb 2007 21:15:08 -0500. It was downloaded from http://guppy-pe.sourceforge.net/ Upstream Author: Sverker Nilsson Copyright: 2005-2009 Sverker Nilsson, S. Nilsson Computer System AB License (provided from http://www.opensource.org/licenses/mit-license.php since upstream package is missing full terms): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gsl-mode*.el: Copyright (C) 2005 Sverker Nilsson 1992,1993,1994 Tim Peters Author: 2005 Sverker Nilsson 1995-1997 Barry A. Warsaw 1992-1994 Tim Peters License: This software is provided as-is, without express or implied warranty. Permission to use, copy, modify, distribute or sell this software, without fee, for any purpose and by any individual or organization, is hereby granted, provided that the above copyright notice and this paragraph appear in all copies. The Debian packaging is (C) 2007-2009, Yaroslav Halchenko and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. debian/changelog0000644000000000000000000000416712133614531011047 0ustar guppy (0.1.9-2ubuntu4) raring; urgency=low * No change rebuild for Python issue #17703, trashcan mechanism segfault during interpreter finalization -- Matthias Klose Wed, 17 Apr 2013 23:51:09 +0200 guppy (0.1.9-2ubuntu3) precise; urgency=low * Rebuild to drop python2.6 dependencies and provides. -- Matthias Klose Sat, 14 Apr 2012 13:42:41 +0000 guppy (0.1.9-2ubuntu2) oneiric; urgency=low * Disable tests which are incompatible with Python 2.7 on amd64. (LP: #770882) -- Barry Warsaw Mon, 12 Sep 2011 18:14:03 -0400 guppy (0.1.9-2ubuntu1) natty; urgency=low * Unreleased upstream changes to support Python 2.7. (LP: #685127) 2010-06-08 Sverker Nilsson * guppy/heapy/test/test_Part.py (MixedCase.test_1): Changed the test result if sys.version >= 2.7; because the size of strings was optimized 8 bytes. (How ? ) * src/sets/bitset.c (mutbitset_iop_PyLongObject): Used _PyLong_Frexp instead of _PyLong_AsScaledDouble if PY_VERSION_HEX >= 0x02070000 . (_PyLong_AsScaledDouble disappeared but I think I should complain, couldn't figure out how to add an issue with the tracker.) 2010-02-16 Sverker Nilsson * guppy/sets/test.py (Test.test16.tsv): Expected OverflowError instead of ValueError, an inconsequential change to do with possiboe test error reporting. -- Barry Warsaw Mon, 06 Dec 2010 18:14:02 -0500 guppy (0.1.9-2build1) natty; urgency=low * Rebuild to add support for python 2.7. -- Matthias Klose Fri, 03 Dec 2010 00:01:18 +0000 guppy (0.1.9-2) unstable; urgency=low * Boosted policy compliance to 3.8.4.0 -- no changes seems to be due. * Incorporated tentative upstream fix to make heapy compatible with big-endian architectures (Closes: #544767). -- Yaroslav Halchenko Sat, 13 Feb 2010 22:10:34 -0500 guppy (0.1.9-1) unstable; urgency=low * Initial release (Closes: #409740) -- Yaroslav Halchenko Mon, 15 Jun 2009 20:44:25 -0400 debian/emacsen-install0000644000000000000000000000230611633476157012206 0ustar #! /bin/sh -e # /usr/lib/emacsen-common/packages/install/gsl # Written by Jim Van Zandt , borrowing heavily # from the install scripts for gettext by Santiago Vila # and octave by Dirk Eddelbuettel . FLAVOR=$1 PACKAGE=gsl if [ ${FLAVOR} = emacs ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} #FLAVORTEST=`echo $FLAVOR | cut -c-6` #if [ ${FLAVORTEST} = xemacs ] ; then # SITEFLAG="-no-site-file" #else # SITEFLAG="--no-site-file" #fi FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} # Install-info-altdir does not actually exist. # Maybe somebody will write it. if test -x /usr/sbin/install-info-altdir; then echo install/${PACKAGE}: install Info links for ${FLAVOR} install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz fi install -m 755 -d ${ELCDIR} cd ${ELDIR} FILES=`echo *.el` cp ${FILES} ${ELCDIR} cd ${ELCDIR} cat << EOF > path.el (setq load-path (cons "." load-path) byte-compile-warnings nil) EOF ${FLAVOR} ${FLAGS} ${FILES} rm -f *.el path.el exit 0 debian/pycompat0000644000000000000000000000000211633476157010752 0ustar 2 debian/compat0000644000000000000000000000000211633476157010401 0ustar 5 debian/emacsen-remove0000644000000000000000000000070511633476157012036 0ustar #!/bin/sh -e # /usr/lib/emacsen-common/packages/remove/gsl FLAVOR=$1 PACKAGE=gsl if [ ${FLAVOR} != emacs ]; then if test -x /usr/sbin/install-info-altdir; then echo remove/${PACKAGE}: removing Info links for ${FLAVOR} install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/gsl.info.gz fi echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} fi debian/patches/0000755000000000000000000000000011633505237010622 5ustar debian/patches/python27-compat-upstream0000644000000000000000000000447311633476157015376 0ustar --- a/guppy/heapy/test/test_Part.py +++ b/guppy/heapy/test/test_Part.py @@ -88,16 +88,24 @@ class MixedCase(support.TestCase): def test_1(self): + import sys x = self.iso(1, 2, 1.0, 2.0, '1', '2') if self.allocation_behaves_as_originally: - self.aseq(str(x), """\ + if sys.version < '2.7': + self.aseq(str(x), """\ Partition of a set of 6 objects. Total size = 112 bytes. Index Count % Size % Cumulative % Kind (class / dict of class) 0 2 33 56 50 56 50 str 1 2 33 32 29 88 79 float 2 2 33 24 21 112 100 int""") - - + else: + self.aseq(str(x), """\ +Partition of a set of 6 objects. Total size = 104 bytes. + Index Count % Size % Cumulative % Kind (class / dict of class) + 0 2 33 48 46 48 46 str + 1 2 33 32 31 80 77 float + 2 2 33 24 23 104 100 int""") + for row in x.partition.get_rows(): self.assert_(row.set <= row.kind) --- a/guppy/sets/test.py +++ b/guppy/sets/test.py @@ -892,7 +892,7 @@ except OverflowError: pass else: - raise 'expected ValueError' + raise 'expected OverflowError' tsv(bitset([maxint]), 1) tsv(bitset([minint]), -1) --- a/src/sets/bitset.c +++ b/src/sets/bitset.c @@ -2017,7 +2017,11 @@ int cpl = 0; PyObject *w = 0; - x = _PyLong_AsScaledDouble(v, &e); +#if PY_VERSION_HEX >= 0x02070000 + x = _PyLong_Frexp(v, &e); +#else + x = _PyLong_AsScaledDouble(v, &e); +#endif if (x == -1 && PyErr_Occurred()) return -1; if (x < 0) { @@ -2026,15 +2030,24 @@ w = PyNumber_Invert(v); if (!w) return -1; v = w; +#if PY_VERSION_HEX >= 0x02070000 + x = _PyLong_Frexp(v, &e); +#else x = _PyLong_AsScaledDouble(v, &e); +#endif if (x == -1 && PyErr_Occurred()) return -1; assert(x >= 0); } - if (x != 0) - num_bits = 1.0 * e * SHIFT + log(x)/log(2) + 1; + if (x != 0) { + num_bits = e; +#if PY_VERSION_HEX < 0x02070000 + num_bits *= SHIFT; +#endif + num_bits += log(x)/log(2) + 1; + } else - num_bits = 0; + num_bits = 0; num_poses = (long)(num_bits / NyBits_N + 1); /* fprintf(stderr, "x %f e %d num_bits %f num_poses %ld\n", x, e, num_bits, num_poses); */ debian/patches/debian-changes-0.1.9-2ubuntu10000644000000000000000000000723511633476157015542 0ustar Description: Upstream changes introduced in version 0.1.9-2ubuntu1 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . guppy (0.1.9-2ubuntu1) natty; urgency=low . * Unreleased upstream changes to support Python 2.7. (LP: #685127) . 2010-06-08 Sverker Nilsson . * guppy/heapy/test/test_Part.py (MixedCase.test_1): Changed the test result if sys.version >= 2.7; because the size of strings was optimized 8 bytes. (How ? ) . * src/sets/bitset.c (mutbitset_iop_PyLongObject): Used _PyLong_Frexp instead of _PyLong_AsScaledDouble if PY_VERSION_HEX >= 0x02070000 . (_PyLong_AsScaledDouble disappeared but I think I should complain, couldn't figure out how to add an issue with the tracker.) . 2010-02-16 Sverker Nilsson . * guppy/sets/test.py (Test.test16.tsv): Expected OverflowError instead of ValueError, an inconsequential change to do with possiboe test error reporting. . The person named in the Author field signed this changelog entry. Author: Barry Warsaw Bug-Ubuntu: https://bugs.launchpad.net/bugs/685127 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- guppy-0.1.9.orig/src/sets/bitset.h +++ guppy-0.1.9/src/sets/bitset.h @@ -32,6 +32,32 @@ typedef unsigned long NyBits; #endif +/* Assume __BYTE_ORDER is defined on all big-endian archs and that they + have byteswap.h. Little-endian archs don't include byteswap.h, so + it should still work with eg MSC. +*/ + +#ifdef __BYTE_ORDER +#if __BYTE_ORDER==__BIG_ENDIAN + +#define NyBits_IS_BIG_ENDIAN 1 + +#include "byteswap.h" + +#if (NyBits_N==64) +#define NyBits_BSWAP(x) bswap_64(x) +#elif (NyBits_N==32) +#define NyBits_BSWAP(x) bswap_32(x) +#else +#error "Unsupported NyBits_N" +#endif + +#endif +#endif + + + + typedef Py_intptr_t NyBit; /* Largest positive value of type NyBit. */ --- guppy-0.1.9.orig/src/sets/bitset.c +++ guppy-0.1.9/src/sets/bitset.c @@ -2063,6 +2063,15 @@ mutbitset_iop_PyLongObject(NyMutBitSetOb 1, /* little_endian */ 0 /* is_signed */); if (r == -1) goto Err1; +#if NyBits_IS_BIG_ENDIAN + { + int pos; + for (pos = 0; pos < num_poses; pos++) { + buf[pos] = NyBits_BSWAP(buf[pos]); + } + } +#endif + r = mutbitset_iop_bits(ms, op, 0, buf, num_poses); if (!r && cpl) r = mutbitset_iop_complement(ms); @@ -3139,7 +3148,10 @@ immbitset_long(NyImmBitSetObject *v) } for (pos = 0; pos < num_poses; pos++) { if (pos == f->pos) { - bits = f->bits; /* xxx may want to byte-swap here */ + bits = f->bits; +#if NyBits_IS_BIG_ENDIAN + bits = NyBits_BSWAP(bits); +#endif f++; } else { bits = NyBits_EMPTY; @@ -3148,7 +3160,7 @@ immbitset_long(NyImmBitSetObject *v) } r = _PyLong_FromByteArray((unsigned char *)buf, /* bytes */ num_poses * sizeof(NyBits), /* n = number of bytes*/ - 1, /* Always little endian here (xxx?) */ + 1, /* Always little endian here */ 0); /* not is_signed, never here */ PyMem_Del(buf); return r; debian/patches/python27-disable-test0000644000000000000000000000257411633505215014621 0ustar Author: Barry Warsaw Description: Disable tests which fail under Python 2.7 on amd64. Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/guppy/+bug/770882 Bug: https://sourceforge.net/tracker/?func=detail&aid=3408228&group_id=105577&atid=641821 --- a/guppy/sets/test.py +++ b/guppy/sets/test.py @@ -345,7 +345,9 @@ print >>f,bitset([-1]) | bitset([4]) #print >>f,long(bitset([-1])) - assert f.getvalue() == """\ + # LP: #770882 + if sys.hexversion < 0x2070000: + assert f.getvalue() == """\ (ImmBitSet([]), ImmBitSet([]), ImmBitSet([]), ImmBitSet([]), ImmBitSet([]), ImmBitSet([])) ImmBitSet([15]) ImmBitSet([4]) @@ -412,6 +414,9 @@ tr.append(~ta ^ ~tb) ts.append(tr) + # LP: #770882 + if sys.hexversion >= 0x2070000: + continue for tr in ts[1:]: for r, x in zip(tr, ts[0]): assert long(r) == x @@ -448,6 +453,9 @@ tr.append(long(tb)) ts.append(tr) + # LP: #770882 + if sys.hexversion >= 0x2070000: + return for tr in ts[1:]: #print tr for r, x in zip(tr, ts[0]): @@ -556,6 +564,9 @@ def test6(self): # Comparisons + # LP: #770882 + if sys.hexversion >= 0x2070000: + return for a in (randlong(),): for b in (a, ~a, randlong()): assert ((bitset(a) == bitset(b)) == (a == b)) debian/patches/series0000644000000000000000000000011511633505067012035 0ustar python27-compat-upstream debian-changes-0.1.9-2ubuntu1 python27-disable-test debian/emacsen-startup0000644000000000000000000000211511633476157012240 0ustar ;; -*-emacs-lisp-*- ;; ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50gsl.el ;; for the Debian gsl package ;; ;; Originally contributed by Nils Naumann ;; Modified by Dirk Eddelbuettel ;; Adapted for dh-make by Jim Van Zandt ;; The gsl package follows the Debian/GNU Linux 'emacsen' policy and ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, ;; xemacs19, emacs20, xemacs20...). The compiled code is then ;; installed in a subdirectory of the respective site-lisp directory. ;; We have to add this to the load-path: (let ((package-dir (concat "/usr/share/" (symbol-name flavor) "/site-lisp/gsl"))) ;; If package-dir does not exist, the gsl package must have ;; removed but not purged, and we should skip the setup. (when (file-directory-p package-dir) (setq load-path (cons package-dir load-path)) (autoload 'gsl-mode "gsl-mode" "Major mode for editing gsl files." t) (add-to-list 'auto-mode-alist '("\\.gsl$" . gsl-mode)))) debian/control0000644000000000000000000000446411633476157010616 0ustar Source: guppy Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Yaroslav Halchenko Build-Depends: debhelper (>= 5.0.38), python-all-dev (>=2.3.5-11), python-all-dbg (>=2.3.5-11), python-support (>=0.6), cdbs Standards-Version: 3.8.4.0 Vcs-Browser: http://git.onerussian.com/?p=deb/guppy.git Vcs-Git: git://git.onerussian.com/deb/guppy.git Homepage: http://guppy-pe.sourceforge.net Package: python-guppy Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-guppy-lib (>= ${source:Version}) Provides: ${python:Provides} XB-Python-Version: ${python:Versions} Description: Python programming environment Guppy-PE Guppy-PE is a programming environment providing object and heap memory sizing, profiling and analysis. It includes a prototypical specification language that can be used to formally specify aspects of Python programs and generate tests and documentation from a common source. . Modules which constitute the environment: - Heapy: debugging and optimization regarding memory related issues in Python programs - GSL (Guppy Specification Language): describes aspects of a system, especially its API, in a way that can be automatically converted to tests as well as to documents - Guppy: umbrella package combining Heapy and GSL with support utilities such as the Glue module that keeps things together Package: python-guppy-lib Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} Provides: ${python:Provides} Suggests: python-guppy-lib-dbg XB-Python-Version: ${python:Versions} Description: Dynamic libraries for Guppy-PE This package contains dynamic architecuture-dependent libraries for Guppy-PE Python programming environment which is shipped within python-guppy package. Package: python-guppy-lib-dbg Architecture: any Section: debug Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-dbg, python-guppy-lib (= ${binary:Version}) Provides: ${python:Provides} XB-Python-Version: ${python:Versions} Description: Debug Build of Dynamic libraries for Guppy-PE This package contains unstripped and built with python-dbg dynamic architecuture-dependent libraries for Guppy-PE Python programming environment. debian/rules0000755000000000000000000000455311633476157010272 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk DEB_PYTHON_SYSTEM = pysupport DEB_PYTHON_MODULE_PACKAGES = python-guppy python-guppy-lib python-guppy-lib-dbg include /usr/share/cdbs/1/class/python-distutils.mk # Add here any variable or target overrides you need. # install directly into package directory (despite multiple packages) DEB_DESTDIR = $(CURDIR)/debian/python-guppy # # Main and -lib # install/python-guppy-lib:: # Run tests before moving .so's away ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) for buildver in $(cdbs_python_build_versions); do \ echo "I: Running guppy unittests using python$$buildver"; \ cd $(CURDIR) && cd $(DEB_SRCDIR)/build/lib.*-$$buildver && \ PYTHONPATH=. \ $(call cdbs_python_binary,python$$buildver) \ -c 'from guppy import hpy; hpy().test()'; \ done endif # move libraries into the python-guppy-lib package # mkdir -p debian/python-guppy-lib/usr/ find $(DEB_DESTDIR) -iname *so | \ while read so; do \ d=$$(dirname $$so); \ d=$$(echo $$d | sed -e 's,python-guppy/,python-guppy-lib/,g'); \ ddbg=$$(echo $$d | sed -e 's,python-guppy/,python-guppy-lib-dbg/,g'); \ mkdir -p $$d $$ddbg; cp -p $$so $$ddbg; mv $$so $$d; \ done # we need to move libraries away first, hence dependence on -lib # Also without this step, movemodules from pysupport would not # move arch-indep part of the module under pyshared install/python-guppy:: install/python-guppy-lib # Install emacs mode manually install/python-guppy:: install -D --mode 644 gsl-mode-*.el \ $(DEB_DESTDIR)/usr/share/emacs/site-lisp/gsl/gsl-mode.el # # Debugging version -lib-dbg # # Re-build using python-dbg install/python-guppy-lib-dbg :: for i in $(cdbs_python_build_versions); do \ python$$i-dbg ./setup.py install $(DEB_PYTHON_INSTALL_ARGS_ALL) \ --root $(DEB_DESTDIR)-lib-dbg; \ done find $(DEB_DESTDIR)-lib-dbg \ ! -type d ! -name '*_d.so' | xargs rm -f # Prune empty directories find $(DEB_DESTDIR)-lib-dbg -depth -empty -exec rmdir \{\} \; binary-predeb/python-guppy-lib-dbg:: rm -rf $(DEB_DESTDIR)-lib-dbg/usr/share/doc/python-guppy-lib-dbg ln -s python-guppy-lib \ $(DEB_DESTDIR)-lib-dbg/usr/share/doc/python-guppy-lib-dbg # immediately useable documentation # and exemplar data (they are small excerpts anyways) DEB_COMPRESS_EXCLUDE := .py .pdf .html .css .jpg .txt .js .json .rtc .par .bin debian/source/0000755000000000000000000000000011633505237010473 5ustar debian/source/format0000644000000000000000000000001411633476157011711 0ustar 3.0 (quilt) debian/pyversions0000644000000000000000000000000511633476157011342 0ustar 2.3- debian/watch0000644000000000000000000000016711633476157010240 0ustar # Compulsory line, this is a version 3 file version=3 http://guppy-pe.sourceforge.net/ guppy-(.*)\.tar\.gz svn-upgrade