--- python-pqueue-0.2.orig/Makefile.pre.in +++ python-pqueue-0.2/Makefile.pre.in @@ -118,6 +118,7 @@ MACHDEP= @MACHDEP@ SO= @SO@ LDSHARED= @LDSHARED@ +BLDSHARED= @LDSHARED@ CCSHARED= @CCSHARED@ LINKFORSHARED= @LINKFORSHARED@ @SET_CCC@ @@ -165,7 +166,7 @@ .SUFFIXES: .py .pyc # Target to install scripts and modules -install: install-shmods install-scripts +install: install-shmods install-shmods: $(SHAREDMODS) @echo 'Installing shared modules...' @if [ -n "$(SHAREDMODS)" ]; then \ @@ -194,7 +195,7 @@ # Handy target to remove intermediate files and backups clean: - -rm -f *.o *~ + -rm -f *.o *~ *.pyc *.pyo # Handy target to remove everything that is easily regenerated clobber: clean --- python-pqueue-0.2.orig/README +++ python-pqueue-0.2/README @@ -105,9 +105,7 @@ pq[data] = priority - Allows the priority associated with to be - reduced. If is greater than the current - priority associated with , ValueError is raised. + Sets the priority associated with to . This call runs in O(1) amortized time if the new priority is less than or equal to the current --- python-pqueue-0.2.orig/aclocal.m4 +++ python-pqueue-0.2/aclocal.m4 @@ -49,6 +49,7 @@ py_cv_python_version="$PYTHON_VERSION" fi PYTHON_VERSION="$py_cv_python_version" +py_configdir="`python${PYTHON_VERSION}-config --configdir`" AC_MSG_RESULT($PYTHON_VERSION) VERSION=$PYTHON_VERSION AC_SUBST(VERSION) @@ -107,7 +108,7 @@ AC_REQUIRE([PY_PYTHON_EXEC_PREFIX]) AC_MSG_CHECKING(definitions in Python library makefile) AC_CACHE_VAL(py_cv_python_makefile_vars, -[py_makefile="${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/config/Makefile" +[py_makefile="$py_configdir/Makefile" dnl set defaults for these variables so they work with Python 1.4 py_cv_python_makefile_LINKCC='' py_cv_python_makefile_SGI_ABI='' @@ -192,8 +193,8 @@ AC_DEFUN(PY_CHECK_INSTALL, [AC_REQUIRE([PY_PYTHON_VERSION]) AC_REQUIRE([PY_PYTHON_EXEC_PREFIX]) -if test -x "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/install-sh"; then - INSTALL="$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/install-sh" +if test -x "$py_configdir/install-sh"; then + INSTALL="$py_configdir/install-sh" AC_SUBST(INSTALL) else AC_PATH_PROG(INSTALL, install, install) @@ -252,7 +253,7 @@ AC_OUTPUT($2 $3 $1.pre,dnl [echo creating $1 $MAKESETUP -m $1.pre -c - $2],dnl -[MAKESETUP="${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/config/makesetup" +[MAKESETUP="${py_configdir}/makesetup" ]) ]) --- python-pqueue-0.2.orig/configure +++ python-pqueue-0.2/configure @@ -612,6 +612,7 @@ py_cv_python_version="$PYTHON_VERSION" fi PYTHON_VERSION="$py_cv_python_version" +py_configdir="`python${PYTHON_VERSION}-config --configdir`" echo "$ac_t""$PYTHON_VERSION" 1>&6 VERSION=$PYTHON_VERSION @@ -630,7 +631,7 @@ PYTHON_PREFIX="$with_python_prefix" fi echo $ac_n "checking python installation prefix""... $ac_c" 1>&6 -echo "configure:634: checking python installation prefix" >&5 +echo "configure:635: checking python installation prefix" >&5 if test -z "$PYTHON_PREFIX"; then if eval "test \"`echo '$''{'py_cv_python_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -659,7 +660,7 @@ PYTHON_EXEC_PREFIX="$with_python_exec_prefix" fi echo $ac_n "checking python installation exec_prefix""... $ac_c" 1>&6 -echo "configure:663: checking python installation exec_prefix" >&5 +echo "configure:664: checking python installation exec_prefix" >&5 if test -z "$PYTHON_EXEC_PREFIX"; then if eval "test \"`echo '$''{'py_cv_python_exec_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -678,11 +679,11 @@ echo $ac_n "checking definitions in Python library makefile""... $ac_c" 1>&6 -echo "configure:682: checking definitions in Python library makefile" >&5 +echo "configure:683: checking definitions in Python library makefile" >&5 if eval "test \"`echo '$''{'py_cv_python_makefile_vars'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - py_makefile="${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/config/Makefile" + py_makefile="$py_configdir/Makefile" py_cv_python_makefile_LINKCC='' py_cv_python_makefile_SGI_ABI='' py_cv_python_makefile_LDLAST='' @@ -763,14 +764,14 @@ -if test -x "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/install-sh"; then - INSTALL="$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/install-sh" +if test -x "$py_configdir/install-sh"; then + INSTALL="$py_configdir/install-sh" else # Extract the first word of "install", so it can be a program name with args. set dummy install; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:774: checking for $ac_word" >&5 +echo "configure:775: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -808,7 +809,7 @@ echo $ac_n "checking location of python library""... $ac_c" 1>&6 -echo "configure:812: checking location of python library" >&5 +echo "configure:813: checking location of python library" >&5 if eval "test \"`echo '$''{'py_cv_python_library_dir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -829,7 +830,7 @@ echo $ac_n "checking location of python shared modules""... $ac_c" 1>&6 -echo "configure:833: checking location of python shared modules" >&5 +echo "configure:834: checking location of python shared modules" >&5 if eval "test \"`echo '$''{'py_cv_python_module_dir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -859,21 +860,21 @@ echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:863: checking for inline" >&5 +echo "configure:864: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -899,7 +900,7 @@ esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:903: checking how to run the C preprocessor" >&5 +echo "configure:904: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -914,13 +915,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -931,13 +932,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -948,13 +949,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -979,12 +980,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:983: checking for ANSI C header files" >&5 +echo "configure:984: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -992,7 +993,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1009,7 +1010,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1027,7 +1028,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1048,7 +1049,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1059,7 +1060,7 @@ exit (0); } EOF -if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1444,7 +1445,7 @@ EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF --- python-pqueue-0.2.orig/debian/changelog +++ python-pqueue-0.2/debian/changelog @@ -0,0 +1,94 @@ +python-pqueue (0.2-7.3) unstable; urgency=medium + + * Non-maintainer upload. + * Switch to debhelper compat level 10 (Closes: #817644). + * Add explicit debian/source/format. + + -- Andrey Rahmatullin Wed, 30 Nov 2016 23:13:27 +0500 + +python-pqueue (0.2-7.2) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with python2.7 multiarch locations (Closes: #713214). + * Convert to dh_python2 (Closes: #617020). + + -- Luca Falavigna Sun, 07 Jul 2013 12:17:50 +0200 + +python-pqueue (0.2-7.1) unstable; urgency=low + + * NMU + * Merge from Ubuntu: + - Fix build failure with python2.5. Closes: #460359. + - Fixes for python2.5 memory management. + + -- Matthias Klose Thu, 31 Jan 2008 22:30:29 +0000 + +python-pqueue (0.2-7) unstable; urgency=low + + * Update to new Python policy. (Closes: #373339) + + -- Chris Lawrence Wed, 21 Jun 2006 02:41:14 -0400 + +python-pqueue (0.2-6) unstable; urgency=medium + + * Acknowledge NMU by Josselin Mouette; thanks! + * Fix leaks in pqueuemodule.c. (Closes: #230005) + + -- Chris Lawrence Wed, 28 Jan 2004 19:30:05 -0600 + +python-pqueue (0.2-5.1) unstable; urgency=low + + * NMU + * Removed obsolete python2-pqueue files. + * Build one version, for python 2.3 (closes: #205747). + * Move section to python. + * Standards-version is 3.6.0. + + -- Josselin Mouette Tue, 19 Aug 2003 15:14:25 +0200 + +python-pqueue (0.2-5) unstable; urgency=low + + * Fix "can't build from source" problem by specifying --with-python to + configure script. (Otherwise, "python" would need to be installed.) + (Closes: #120955) + + -- Chris Lawrence Sat, 24 Nov 2001 17:28:41 -0600 + +python-pqueue (0.2-4) unstable; urgency=low + + * Fix minor grammatical error in the description. + * Build extension module for Python 2.2 too. + * Update dependencies. (Closes: #118214) + + -- Chris Lawrence Sun, 18 Nov 2001 14:36:09 -0600 + +python-pqueue (0.2-3) unstable; urgency=low + + * Build extension module for Python 1.5 and 2.1. + * No longer build a separate python2-pqueue package. + + -- Chris Lawrence Fri, 19 Oct 2001 17:04:52 -0500 + +python-pqueue (0.2-2) unstable; urgency=low + + * Build extension module for Python 2.0 as well. + * Force installation of shared library in site-packages directory, even + if built on a machine without one. (Closes: #81816) + + -- Chris Lawrence Sat, 13 Jan 2001 12:51:46 -0600 + +python-pqueue (0.2-1) unstable; urgency=low + + * New upstream release. + + -- Chris Lawrence Sun, 30 Jul 2000 00:09:46 -0500 + +python-pqueue (0.1a-1) unstable; urgency=low + + * Initial Release. + * Applied patch from upstream author to avoid segfaults when using + PQueue with complex objects. + + -- Chris Lawrence Sun, 16 Jan 2000 13:05:09 -0600 + + --- python-pqueue-0.2.orig/debian/compat +++ python-pqueue-0.2/debian/compat @@ -0,0 +1 @@ +10 --- python-pqueue-0.2.orig/debian/control +++ python-pqueue-0.2/debian/control @@ -0,0 +1,18 @@ +Source: python-pqueue +Section: python +Priority: optional +Maintainer: Chris Lawrence +Standards-Version: 3.7.2 +Build-Depends: python-all-dev (>= 2.6.6-3~), debhelper (>= 10) + +Package: python-pqueue +Architecture: any +Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} +Provides: ${python:Provides} +Description: a priority queue extension for Python + This C extension implements a priority-queue object using a Fibonacci + heap as the underlying data structure. It supports insertion, + deletion, and reprioritization of entries. + . + All operations are O(log N) or faster; insertion and finding the + lowest-priority item are O(1). --- python-pqueue-0.2.orig/debian/copyright +++ python-pqueue-0.2/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Chris Lawrence on +Tue, 4 Jan 2000 02:49:37 -0600. + +It was downloaded from http://www.pigpond.com/~earthpig/PQueue-0.2.tar.bz2 + +Upstream Author: Andrew Snare + +Copyright and License: LGPL. + +See /usr/share/common-licenses/LGPL-2 for the complete text. --- python-pqueue-0.2.orig/debian/docs +++ python-pqueue-0.2/debian/docs @@ -0,0 +1,2 @@ +AUTHORS +README --- python-pqueue-0.2.orig/debian/rules +++ python-pqueue-0.2/debian/rules @@ -0,0 +1,69 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PYVERS=$(shell pyversions -r debian/control) + +build: build-stamp +build-stamp: + dh_testdir + + (set -e; for v in $(PYVERS); do mkdir build-$$v; cd build-$$v; ../configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-python=/usr/bin/$$v; $(MAKE); cd ..; done) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -(for v in $(PYVERS); do cd build-$$v; $(MAKE) distclean; cd ..; rm -rf build-$$v; done) + rm -f *.pyc + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + (set -e; for v in $(PYVERS); do dh_installdirs /usr/lib/$$v/site-packages; cd build-$$v; $(MAKE) install exec_prefix=`pwd`/../debian/python-pqueue/usr PY_MOD_DIR=`pwd`/../debian/python-pqueue/usr/lib/$$v/site-packages; cd ..; done) + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples benchmark.py pq3.py + dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit + dh_installcron + dh_installmanpages + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_python2 + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- python-pqueue-0.2.orig/debian/source/format +++ python-pqueue-0.2/debian/source/format @@ -0,0 +1 @@ +1.0 --- python-pqueue-0.2.orig/pqueuemodule.c +++ python-pqueue-0.2/pqueuemodule.c @@ -255,7 +255,7 @@ Py_DECREF(pqp->dict); if(pqp->min != NULL) children_dealloc(pqp->min); - PyMem_DEL(pqp); + PyObject_Del(pqp); } static PyObject * @@ -716,6 +716,20 @@ } static int +pqueue_insert_build(pqp, data, priority) + pqueueobject *pqp; + PyObject *data, *priority; +{ + PyObject *args = Py_BuildValue("OO", priority, data); + PyObject *ret = pqueue_insert(pqp, args); + Py_DECREF(args); + if (ret == NULL) + return -1; + Py_DECREF(ret); + return 0; +} + +static int pqueue_ass_sub(pqp, data, priority) pqueueobject *pqp; PyObject *data, *priority; @@ -733,14 +747,7 @@ return -1; } else { /* Setting non-existent node */ /* Turn the set into an insert() */ - PyObject *ret = - pqueue_insert(pqp, - Py_BuildValue("OO", priority, - data)); - if (ret == NULL) - return -1; - Py_DECREF(ret); - return 0; + return pqueue_insert_build(pqp, data, priority); } } @@ -761,15 +768,8 @@ int ret = delete_key(pqp, hp); if (ret != 0) return ret; - else { - PyObject *ret = - pqueue_insert(pqp, - Py_BuildValue("OO", priority, - data)); - if (ret == NULL) - return -1; - Py_DECREF(ret); - return 0; + else { + return pqueue_insert_build(pqp, data, priority); } } #ifdef DEBUG