--- gadfly-1.0.0.orig/doc/demo/kjParsing/pylint.py +++ gadfly-1.0.0/doc/demo/kjParsing/pylint.py @@ -453,7 +453,7 @@ if type(x)==ListType: if result == []: if len(x)>0 and type(x[0])==ListType: - raise "oops", x + raise ValueError, "oops: %s" % repr(x) result = x else: for y in x: --- gadfly-1.0.0.orig/debian/rules +++ gadfly-1.0.0/debian/rules @@ -0,0 +1,112 @@ +#!/usr/bin/make -f + +# all versions +PYVERSIONS=$(shell pyversions -vs) +# default version +VER := $(shell /usr/bin/python -c 'import sys; print sys.version[:3]') + +DEFAULT_PYTHON = python$(VER) + +kjb_version=1:$(shell dpkg-parsechangelog | sed -n 's/^Version: //p') + +include /usr/share/python/python.mk + +build: build-indep build-arch + +build-indep: build-indep-stamp +build-indep-stamp: + dh_testdir + for v in $(PYVERSIONS); do \ + python$$v setup.py build || exit 1; \ + done + touch $@ + +build-arch: build-arch-stamp +build-arch-stamp: + dh_testdir + cd kjbuckets && \ + for v in $(PYVERSIONS); do \ + python$$v setup.py build || exit 1; \ + done + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-indep-stamp build-arch-stamp + for v in $(PYVERSIONS); do \ + python$$v setup.py clean --all; \ + done + cd kjbuckets && \ + for v in $(PYVERSIONS); do \ + python$$v setup.py clean --all; \ + done + dh_clean + +binary: binary-indep binary-arch + +# pythonX.Y-gadfly, python-gadfly & gadfly & python-kjbuckets (default) +binary-indep: build-indep + dh_testdir -i + dh_testroot -i + dh_clean -i -k + dh_installdirs -i + + : # python-gadfly + dh_installdocs -ppython-gadfly -Xinstallation -Xkjbuckets \ + -Xstructure -Xgfplus TODO.txt doc/*.txt + dh_installexamples -ppython-gadfly doc/demo/kjParsing/* + + for v in $(PYVERSIONS); do \ + python$$v setup.py install_lib --install-dir \ + debian/python-gadfly/usr/lib/python$$v/$(call py_sitename_sh, $$v) \ + --no-compile || exit 1; \ + done + : # gadfly + /usr/bin/python setup.py install_scripts \ + --install-dir debian/gadfly/usr/bin + dh_installdocs -pgadfly -Xinstallation -Xkjbuckets -Xstructure \ + -Xgadfly -XkwParsing TODO.txt doc/*.txt + + dh_python2 -i + + : # python-gadfly + dh_installdocs -ppython-gadfly + dh_gencontrol -ppython-gadfly + + dh_installchangelogs -i CHANGES.txt + dh_compress -i -X.py + perl debian/dh_fixpythonscripts -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# python-kjbuckets (version-specific) +binary-arch: build-arch + dh_testdir -a + dh_testroot -a + dh_clean -a -k + dh_installdirs -a + + cd kjbuckets && \ + for v in $(PYVERSIONS); do \ + python$$v setup.py install --install-layout=deb \ + --root $(CURDIR)/debian/python-kjbuckets $(py_setup_install_args) || exit 1; \ + done + dh_installchangelogs -a CHANGES.txt + dh_installdocs -a doc/kjbuckets.txt + dh_installexamples -a doc/demo/kjbuckets/* + dh_strip -a + dh_compress -a -X.py + perl debian/dh_fixpythonscripts -a + dh_fixperms -a + dh_python2 -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a -- -v'$(kjb_version)' + dh_md5sums -a + dh_builddeb -a + +.PHONY: build build-indep build-arch clean binary binary-indep binary-arch --- gadfly-1.0.0.orig/debian/control +++ gadfly-1.0.0/debian/control @@ -0,0 +1,58 @@ +Source: gadfly +Section: python +Priority: optional +Maintainer: Matthias Klose +Standards-Version: 3.9.1 +XS-Python-Version: all +Build-Depends: debhelper (>= 7), python-all-dev (>= 2.6.6-14), dpkg-dev (>= 1.16.9) + +Package: gadfly +Section: interpreters +Architecture: all +Depends: ${python:Depends}, python-gadfly (= ${binary:Version}), ${misc:Depends} +XB-Python-Version: ${python:Versions} +Description: Server and interactive shell for Gadfly SQL database + Gadfly is a relational database management system which uses a large + subset of very standard SQL as its query language. The underlying + engine consists of Python modules. Gadfly stores the active database + in memory, with logging to a file system for recovery from system or + software failures (but not for disk failures). + . + This package contains an interactive shell and a server for use with + the Gadfly SQL database. + +Package: python-gadfly +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Recommends: python-kjbuckets +Provides: ${python:Provides} +Conflicts: python-kjbuckets (<< 1.0.0-9), python2.3-gadfly, python2.4-gadfly +Replaces: python2.3-gadfly, python2.4-gadfly +XB-Python-Version: ${python:Versions} +Description: SQL database and parser generator for Python + Gadfly is a relational database management system which uses a large + subset of very standard SQL as its query language. The underlying + engine consists of Python modules. Gadfly stores the active database + in memory, with logging to a file system for recovery from system or + software failures (but not for disk failures). + . + kwParser, included as part of the Gadfly package, is a parser + generator for Python. It transforms an abstract specification of a + language grammar (for example, the CORBA Interface Definition + Language), together with "interpretation functions" that define the + semantics of the language, into a compiler or translator or + interpreter. + +Package: python-kjbuckets +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} +Conflicts: python2.3-kjbuckets, python2.4-kjbuckets +Replaces: python2.3-kjbuckets, python2.4-kjbuckets +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Description: Set and graph data types for Python + kjbuckets is a C extension to the Python interpreter which + defines set and graph data types, as well as an alternative + dictionary data type. These types are tightly coupled at + the level of C, allowing fast and powerful algebraic + combinations of container objects. --- gadfly-1.0.0.orig/debian/python-gadfly.doc-base +++ gadfly-1.0.0/debian/python-gadfly.doc-base @@ -0,0 +1,12 @@ +Document: python-gadfly +Title: Gadfly - SQL Database in Python +Author: Aaron Watters +Abstract: Gadfly is a SQL database implemented entirely in + Python, including a DB-API compatible interface, network + client and server, etc. It stores its data in memory, + which makes it unsuitable for large data sets, but quite + fast on smaller ones. +Section: Programming/Python + +Format: text +Files: /usr/share/doc/python-gadfly/*.txt --- gadfly-1.0.0.orig/debian/changelog +++ gadfly-1.0.0/debian/changelog @@ -0,0 +1,194 @@ +gadfly (1.0.0-15.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "build wrong version of the packaging during a binNMU": + - debian/rules: get binary package version from dpkg-parsechangelog + instead of using ${source:Version}; thanks to Guillem Jover for the + patch, and to Jakub Wilk for the improvement + - debian/control: build-depend on dpkg-dev (>= 1.16.9) + (cf. #690823) + (Closes: #623578) + + -- gregor herrmann Mon, 22 Oct 2012 19:10:00 +0200 + +gadfly (1.0.0-15) unstable; urgency=low + + * Build using dh_python2 instead of dh_pycentral. Closes: #616818. + * Build for python2.7, drop python2.5 support. Closes: #623578. + * Don't use string exceptions. Closes: #585293. + + -- Matthias Klose Thu, 21 Apr 2011 18:23:50 +0200 + +gadfly (1.0.0-14) unstable; urgency=low + + * Fix syntax errors with python2.6. Closes: #555537. + * gfserver.py: Add import. Closes: #559374. + + -- Matthias Klose Wed, 27 Jan 2010 09:52:26 +0100 + +gadfly (1.0.0-13.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "manipulates site-packages/ directly, failing with Python 2.6" + Applied Kumar's patch and uploaded it. (Closes: #547820) + + -- Bastian Venthur Sat, 07 Nov 2009 12:35:30 +0100 + +gadfly (1.0.0-13) unstable; urgency=low + + * Add watch file. + + -- Matthias Klose Wed, 25 Jun 2008 00:37:15 +0200 + +gadfly (1.0.0-12) unstable; urgency=low + + * Fix package description. Closes: #420780. + + -- Matthias Klose Sat, 02 Jun 2007 09:22:54 +0200 + +gadfly (1.0.0-11) unstable; urgency=medium + + * Rebuild. Closes: #392410. + + -- Matthias Klose Sat, 14 Oct 2006 02:57:15 +0200 + +gadfly (1.0.0-10) unstable; urgency=low + + * python-gadfly: Add conflict/replaces to the versioned packages. + Closes: #374225. + + -- Matthias Klose Sun, 18 Jun 2006 02:09:10 +0000 + +gadfly (1.0.0-9) unstable; urgency=low + + * Convert to updated Python policy. Closes: #373432. + + -- Matthias Klose Sat, 17 Jun 2006 00:01:31 +0000 + +gadfly (1.0.0-8) unstable; urgency=low + + * Drop python2.1, and python2.2 packages, add python2.4 packages. + + -- Matthias Klose Thu, 2 Feb 2006 20:11:24 +0000 + +gadfly (1.0.0-7) unstable; urgency=low + + * Add python as a build dependency (dh_python needs it, should really + be fixed in debhelper, hint, hint ...). + + -- Matthias Klose Tue, 22 Jun 2004 00:42:10 +0200 + +gadfly (1.0.0-6) unstable; urgency=low + + * Add python dependencies (closes: #255568). + + -- Matthias Klose Mon, 21 Jun 2004 22:46:17 +0200 + +gadfly (1.0.0-5) unstable; urgency=low + + * Fix stacktrace in gfplus (closes: #248698). + + -- Matthias Klose Thu, 13 May 2004 23:51:50 +0200 + +gadfly (1.0.0-4) unstable; urgency=low + + * Upload for python2.3 as the default python version. + + -- Matthias Klose Fri, 8 Aug 2003 07:40:26 +0200 + +gadfly (1.0.0-3) unstable; urgency=low + + * New Maintainer (closes: #113080). + * Apply patch to build versioned python packages (Graham Wilson). + Closes: #181422. + + -- Matthias Klose Sun, 13 Apr 2003 08:39:58 +0200 + +gadfly (1.0.0-2) unstable; urgency=low + + * QA upload. + * Build python-kjbuckets from this source. Closes: #164449. + * Use dh_python. + * debian/dh_fixpythonscripts: Ensure that Python scripts have + appropriately (un)versioned shebangs, and make them executable. + * Replace /usr/share/doc/python-kjbuckets with a symlink to + /usr/share/doc/python2.2-kjbuckets. + * Remove undocumented(7) symlinks. + * Conforms to Standards version 3.5.8. + + -- Matej Vela Wed, 25 Dec 2002 16:51:00 +0100 + +gadfly (1.0.0-1) unstable; urgency=high + + * QA upload. + * New upstream version. + * Updated for Python 2.2. Closes: #159178. + * Added python2.2-dev to build dependencies for distutils. + * Switched to debhelper 4. + * debian/README.Debian: Deprecated regex module is no longer used. + * debian/copyright: Update for new upstream maintainer. + * debian/doc-base: Change section to Apps/Databases. + * Conforms to Standards version 3.5.7. + + -- Matej Vela Fri, 13 Sep 2002 13:07:45 +0200 + +gadfly (1.0-7.2) unstable; urgency=low + + * Fix postinst to use Debian's python2.1 (closes: #125857). + * Fix location of sql.mar file (closes: #126338). + + -- Matthias Klose Mon, 24 Dec 2001 13:10:27 +0100 + +gadfly (1.0-7.1) unstable; urgency=low + + * gfclient.py: Reflect change in Python2.1. + + -- Matthias Klose Sat, 8 Dec 2001 03:48:00 +0100 + +gadfly (1.0-7) unstable; urgency=low + + * Abandoning. I won't write the program I planned anyway, + and gadfly needs porting to python 2.1, something I won't do. Sorry. + * Updated to the latest python policy. + + -- Tom Cato Amundsen Fri, 19 Oct 2001 22:27:14 +0200 + +gadfly (1.0-6) unstable; urgency=low + + * Adopted the package. + + -- Tom Cato Amundsen Fri, 16 Feb 2001 14:23:40 +0100 + +gadfly (1.0-5) unstable; urgency=low + + * Orphaned. + + -- Rob Tillotson Wed, 7 Jun 2000 03:08:22 -0500 + +gadfly (1.0-4) unstable; urgency=low + + * Added #DEBHELPER# sections to scripts. + * Standards-Version 3.0.0. + * Remove explicit install of doc-base control file, since dh_installdocs + does that now. + * Point doc-base at /usr/share/doc/gadfly. + + -- Rob Tillotson Thu, 28 Oct 1999 00:58:30 -0500 + +gadfly (1.0-3) unstable; urgency=low + + * Registered documentation with doc-base. + + -- Rob Tillotson Sun, 13 Dec 1998 19:10:59 -0600 + +gadfly (1.0-2) unstable; urgency=low + + * Added Conflicts: python-kwparsing. + + -- Rob Tillotson Thu, 15 Oct 1998 00:07:48 -0400 + +gadfly (1.0-1) unstable; urgency=low + + * Initial release. (Previous versions were called python-kwparsing) + + -- Rob Tillotson Thu, 8 Oct 1998 17:54:29 -0400 --- gadfly-1.0.0.orig/debian/dh_fixpythonscripts +++ gadfly-1.0.0/debian/dh_fixpythonscripts @@ -0,0 +1,44 @@ +#!/usr/bin/perl -w +# Ensure that Python scripts have appropriately (un)versioned shebangs, and +# make them executable. + +use strict; +use File::Find; +use Debian::Debhelper::Dh_Lib; + +init(); + +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmpdir=tmpdir($package); + + my $python='/usr/bin/'; + if ($package=~/^(python[\d.]*)-/) { + $python.=$1; + } elsif ($_=(glob "$tmpdir/usr/lib/python*")[0]) { + s:.*/::; + $python.=$_; + } else { + next; + } + + find sub { + return unless -f and /\.py$/; + + open IN, $_ or die "$_: $!"; + my $line=; + if (defined $line && + $line=~m,^#!\s*(\S+/)(?:env\s+)?(python[\d.]*)(\s.*),s) { + if ($1.$2 ne $python) { + open OUT, ">$_.tmp" or die "$_: $!"; + print OUT "#!$python$3" or die "$_: $!"; + while ($line=) { + print OUT $line or die "$_: $!"; + } + close OUT or die "$_: $!"; + rename "$_.tmp", $_ or die "$_: $!"; + } + chmod 0755, $_ or die "$_: $!"; + } + close IN or die "$_: $!"; + }, $tmpdir; +} --- gadfly-1.0.0.orig/debian/compat +++ gadfly-1.0.0/debian/compat @@ -0,0 +1 @@ +5 --- gadfly-1.0.0.orig/debian/README.Debian +++ gadfly-1.0.0/debian/README.Debian @@ -0,0 +1,14 @@ +gadfly for DEBIAN +----------------- + +I uploaded an older version of this package as python-kwparsing. +Since gadfly is now the main focus of the package, and it is called +that in the author's release announcements (on the Python newsgroups, +Freshmeat, etc.) I have changed the name accordingly. + +If you install python-kjbuckets, Gadfly will run much faster than +without it. However, without kjbuckets, Gadfly is +architecture-independent and should work anywhere there is a Python +interpreter. + +Rob Tillotson , Thu, 8 Oct 1998 17:54:29 -0400 --- gadfly-1.0.0.orig/debian/copyright +++ gadfly-1.0.0/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Rob Tillotson robt@debian.org on +Thu, 8 Oct 1998 17:54:29 -0400. + +It was downloaded from http://gadfly.sourceforge.net/ + +Upstream Authors: + +* Aaron Robert Watters +* Richard Jones + +Copyright: + +The gadfly and kjbuckets source is copyrighted, but you can freely use and +copy it as long as you don't change or remove the copyright: + +Copyright Aaron Robert Watters, 1994 + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. + +AARON ROBERT WATTERS DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL AARON ROBERT WATTERS BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- gadfly-1.0.0.orig/debian/watch +++ gadfly-1.0.0/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/gadfly/gadfly-([\d\.]*).tar.gz --- gadfly-1.0.0.orig/gadfly/bindings.py +++ gadfly-1.0.0/gadfly/bindings.py @@ -61,7 +61,7 @@ # create view statement stuff def createview(l, c): - [create, view, name, namelist, as, selection] = l + [create, view, name, namelist, asx, selection] = l return semantics.CreateView(name, namelist, selection) optnamelist0 = returnNone @@ -288,11 +288,11 @@ return others def trl1as(l,c): - [name, as, alias] = l + [name, asx, alias] = l return [(name, alias)] def trlnas(l,c): - [name, as, alias, comma, others] = l + [name, asx, alias, comma, others] = l others.insert(0, (name, alias)) return others @@ -546,7 +546,7 @@ return (exp, None) # no binding! def selectname(list, context): - [exp, as, alias] = list + [exp, asx, alias] = list return (exp, alias) colalias = elt0 --- gadfly-1.0.0.orig/gadfly/store.py +++ gadfly-1.0.0/gadfly/store.py @@ -864,7 +864,7 @@ if namelist is not None: target_atts = selection.attributes() if len(namelist)!=len(target_atts): - raise "select list and namelist don't match in %s"%name + raise ValueError, "select list and namelist don't match in %s"%name pairs = map(None, namelist, target_atts) self.translate = kjbuckets.kjGraph(pairs) return self @@ -1025,9 +1025,9 @@ def __setitem__(self, key, item): if not isinstance(key, types.StringType): - raise "nonstring", key + raise ValueError, "nonstring: %s" % repr(key) if item is None: - raise "none set", (key, item) + raise ValueError, "none set: (%s, %s)" % (key, item) self.touched[key] = 1 self.shadow[key] = item --- gadfly-1.0.0.orig/gadfly/kjParser.py +++ gadfly-1.0.0/gadfly/kjParser.py @@ -331,7 +331,7 @@ self.laststring= self.lastindex= self.lastresult = None def Dump(self, *k): - raise "sorry", "not implemented" + raise NotImplementedError, "sorry, not implemented" __getitem__ = Dump def keyword(self, str): --- gadfly-1.0.0.orig/gadfly/semantics.py +++ gadfly-1.0.0/gadfly/semantics.py @@ -1766,7 +1766,7 @@ for m in ms: result = result & m # preserves or/and precedence if result.__class__!=BTor_pred: - raise "what the?" + raise RuntimeError, "what the?" result = result.detrivialize() #print "or detected, returning" #print result --- gadfly-1.0.0.orig/gadfly/scripts/gfserver.py +++ gadfly-1.0.0/gadfly/scripts/gfserver.py @@ -66,6 +66,7 @@ # $Id: gfserver.py,v 1.1 2002/05/11 13:28:35 richard Exp $ import sys +from gadfly.server import Server def main(): """start up the server.""" --- gadfly-1.0.0.orig/gadfly/scripts/gfplus.py +++ gadfly-1.0.0/gadfly/scripts/gfplus.py @@ -1,4 +1,3 @@ -#!/usr/local/bin/python ''' An Interactive Shell for the Gadfly RDBMS (http://gadfly.sf.net/) @@ -74,6 +73,7 @@ prompt2 = '... ' def __init__(self): + cmd.Cmd.__init__(self) print '\ngfplus %s -- Interactive gadfly shell %s\n' %(__version__, rl) t = time.localtime(time.time()) print time.strftime("%A %B %d, %Y %I:%M %p", t)