--- python-repoze.what-plugins-20090531.orig/setup.py +++ python-repoze.what-plugins-20090531/setup.py @@ -0,0 +1,28 @@ +#!/usr/bin/python +# Multiplexer for invoking multiple setup.py in subdir +# Copyright (C) 2009 Stefano Zacchiroli +# License: GNU GPL version 3 or above + +# Created: Sat, 30 May 2009 14:47:04 +0200 +# Last-Modified: Sat, 30 May 2009 14:47:04 +0200 + +import os, string, sys + +if not os.environ.has_key('SUBDIRS') or not os.environ['SUBDIRS']: + print >> sys.stderr, "Can't find subdirs, please set SUBDIRS envvar" + sys.exit(3) +else: + subdirs = os.environ['SUBDIRS'].split() +setup_cmd = "python setup.py %s" % string.join(sys.argv[1:]) + +topdir = os.getcwd() +for d in subdirs: + if not os.path.isdir(d): + print >> sys.stderr, "WARNING: can't find subdir %s" % d + continue + os.chdir(d) + retcode = os.system(setup_cmd) + if retcode: + print >> sys.stderr, "ERROR: setup.py in subdir %s failed" % d + sys.exit(retcode >> 8) + os.chdir(topdir) --- python-repoze.what-plugins-20090531.orig/debian/repoze.what.plugins.sql.watch +++ python-repoze.what-plugins-20090531/debian/repoze.what.plugins.sql.watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/(rc|a|b)\d+/~$1/" \ +http://pypi.python.org/packages/source/r/repoze.what.plugins.sql/repoze.what.plugins.sql-([0-9a-z.]+)\.tar\.gz --- python-repoze.what-plugins-20090531.orig/debian/repoze.what.plugins.xml.watch +++ python-repoze.what-plugins-20090531/debian/repoze.what.plugins.xml.watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/(rc|a|b)\d+/~$1/" \ +http://pypi.python.org/packages/source/r/repoze.what.plugins.xml/repoze.what.plugins.xml-([0-9a-z.]+)\.tar\.gz --- python-repoze.what-plugins-20090531.orig/debian/repoze.what-quickstart.watch +++ python-repoze.what-plugins-20090531/debian/repoze.what-quickstart.watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/(rc|a|b)\d+/~$1/" \ +http://pypi.python.org/packages/source/r/repoze.what-quickstart/repoze.what-quickstart-([0-9a-z.]+)\.tar\.gz --- python-repoze.what-plugins-20090531.orig/debian/rules +++ python-repoze.what-plugins-20090531/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f +DEB_PYTHON_SYSTEM = pysupport +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk + +PKG = python-repoze.what-plugins +UPSTREAMS = \ + repoze.what-pylons \ + repoze.what-quickstart \ + repoze.what.plugins.sql \ + repoze.what.plugins.xml \ + $(NULL) +export SUBDIRS = $(UPSTREAMS) + +DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed + +# avoid installing tests: useless at runtime and prone to name clashes +install/$(PKG):: + rm -rf debian/$(PKG)/usr/lib/python*/site-packages/tests/ + rm -f debian/$(PKG)/usr/lib/python*/site-packages/*.pth + +-include debian/get-orig-source.mk --- python-repoze.what-plugins-20090531.orig/debian/copyright +++ python-repoze.what-plugins-20090531/debian/copyright @@ -0,0 +1,54 @@ +This package was debianized by Stefano Zacchiroli on + Sun, 31 May 2009 23:02:19 +0200. + + +Files: * +Copyright: Copyright © 2009 Gustavo Narea +License: other + + A copyright notice accompanies this license document that identifies + the copyright holders. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions in source code must retain the accompanying + copyright notice, this list of conditions, and the following + disclaimer. + + 2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. Names of the copyright holders must not be used to endorse or + promote products derived from this software without prior + written permission from the copyright holders. + + 4. If any files are modified, you must cause the modified files to + carry prominent notices stating that you changed the files and + the date of any change. + + Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND + ANY EXPRESSED 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 COPYRIGHT + HOLDERS 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. + + +Files: debian/* +Copyright: Copyright © 2009 Stefano Zacchiroli +License: GPL-3+ + On Debian systems the full text of the GNU General Public License can + be found in the `/usr/share/common-licenses/GPL-3' file. + --- python-repoze.what-plugins-20090531.orig/debian/compat +++ python-repoze.what-plugins-20090531/debian/compat @@ -0,0 +1 @@ +7 --- python-repoze.what-plugins-20090531.orig/debian/README.source +++ python-repoze.what-plugins-20090531/debian/README.source @@ -0,0 +1,47 @@ + +Upgrade to a new upstream +========================= + +This package is a multi-upstream source package, i.e., its +.orig.tar.gz is composed by several upstream tarballs, possibly +released by independent authors. + +To obtain a new orig tarball you can invoke the get-orig-source target +of debian/rules as follows: + + $ debian/rules get-orig-source + +If all goes well, that should leave aroung a tarball called + + PACKAGE-YYYYMMDD.orig.tar.gz + +where PACKAGE is the source package name and YYYYMMDD is today's date +in year/month/day format. + +Note that the target does not check whether creating a new upstream +version is needed: invoke it only if you know that some of the +upstream parts of this package need updates. Otherwise, use "apt-get +source PACKAGE" to work on the latest uploaded upstream release. + + +Adding a new plugin +=================== + +As this is a plugin collection package, it is natural to expect that +in the future new plugins will be added. To add one to the package +follow a few simple rules: + +1) add the module name (usually the egg name) to the $(UPSTREAMS) + Makefile variable in debian/rules + +2) add the per-plugin watch file as debian/NAME.watch, where NAME is + the module name + +3) add license and copyright information about the new module to + debian/copyright + +4) run "debian/rules get-orig-source" to recreate the new tarball + + + -- Stefano Zacchiroli , Sat, 30 May 2009 14:48:39 +0200 + --- python-repoze.what-plugins-20090531.orig/debian/changelog +++ python-repoze.what-plugins-20090531/debian/changelog @@ -0,0 +1,25 @@ +python-repoze.what-plugins (20090531-2ubuntu1) precise; urgency=low + + * deal with sqlalchemy.exceptions -> sqlalchemy.exc name change + in sqlalchemy 0.7 + + -- Michael Vogt Fri, 30 Mar 2012 09:32:05 +0200 + +python-repoze.what-plugins (20090531-2) unstable; urgency=low + + [ Stefano Zacchiroli ] + * debian/control + - bump Standards-Version to 3.8.2 (no changes needed) + - add Piotr to Uploaders + * first upload to unstable + + [ Piotr Ożarowski ] + * Don't install .pth files, we don't need them + + -- Stefano Zacchiroli Sun, 02 Aug 2009 13:53:42 +0200 + +python-repoze.what-plugins (20090531-1) experimental; urgency=low + + * First release (Closes: #531208) + + -- Stefano Zacchiroli Sun, 31 May 2009 00:33:09 +0200 --- python-repoze.what-plugins-20090531.orig/debian/control +++ python-repoze.what-plugins-20090531/debian/control @@ -0,0 +1,41 @@ +Source: python-repoze.what-plugins +Section: python +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Python Modules Team +Uploaders: + Stefano Zacchiroli , + Piotr Ożarowski +Build-Depends: + debhelper (>= 7), + cdbs, + python-dev, + python-support, + python-setuptools +Standards-Version: 3.8.2 +Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-repoze.what-plugins/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-repoze.what-plugins/trunk/ + +Package: python-repoze.what-plugins +Architecture: all +Depends: + ${misc:Depends}, + ${python:Depends}, + python-repoze.what, + python-repoze.who, + python-repoze.who-plugins, + python-sqlalchemy, + python-pylons, + python-decorator +Description: authorization framework for Python WSGI applications - plugins collection + repoze.what is an authorization framework for WSGI applications, + based on repoze.who (which deals with authentication and + identification). + . + This package contains a collection of plugins for repoze.what, in + particular: + . + * repoze.what.plugins.sql - adapter plugin for SQLAlchemy + * repoze.what-pylons - integration with Pylons / TurboGears + * repoze.what-quickstart - simple authentication and authorization + * repoze.what.plugins.xml - XML adapter plugin --- python-repoze.what-plugins-20090531.orig/debian/TODO +++ python-repoze.what-plugins-20090531/debian/TODO @@ -0,0 +1,2 @@ +- ship examples and docs for every shipped plugins + (in the appropriate subdirectories) --- python-repoze.what-plugins-20090531.orig/debian/get-orig-source.mk +++ python-repoze.what-plugins-20090531/debian/get-orig-source.mk @@ -0,0 +1,36 @@ +# debian/rules snippet for creating multi-upstream tarball relying on +# several debian/*.watch files + +# Copyright © 2009 Stefano Zacchiroli +# License: GNU GPL version 3 or above +# Created: Sat, 30 May 2009 11:58:16 +0200 +# Last-Modified: Sun, 31 May 2009 00:46:12 +0200 + +# TODO: does not yet fully implement policy wrt get-orig-source: +# - the target cannot be invoked from any dir (rely on "debian/") +# - tmpdir handling is not fully safe (e.g., no "mktemp -d") + +GOSTMP = get-orig-source.tmp +ORIGNAME = $(PKG)-$(shell date +%Y%m%d) +ORIGTARBALL = $(PKG)_$(shell date +%Y%m%d).orig.tar.gz + +get-orig-source: $(patsubst %,%/get-orig-source,$(UPSTREAMS)) + cd $(GOSTMP) && \ + mkdir $(ORIGNAME) && \ + for p in $(UPSTREAMS) ; do \ + mv `readlink $$p` $(ORIGNAME) ; \ + mv $$p $(ORIGNAME) ; \ + done && \ + tar cvzf $(ORIGTARBALL) $(ORIGNAME) && \ + mv $(ORIGTARBALL) ../ && \ + cd .. && \ + rm -rf $(GOSTMP)/ +$(GOSTMP): + -mkdir $@ +%/get-orig-source: $(GOSTMP) + uscan --watchfile debian/$*.watch \ + --upstream-version 0 --package $* \ + --download --destdir $(GOSTMP)/ + cd $(GOSTMP) && \ + tar xzf $**.orig.tar.gz && \ + ln -s `tar tzf $**.orig.tar.gz | head -n1` $* --- python-repoze.what-plugins-20090531.orig/debian/pycompat +++ python-repoze.what-plugins-20090531/debian/pycompat @@ -0,0 +1 @@ +2 --- python-repoze.what-plugins-20090531.orig/debian/repoze.what-pylons.watch +++ python-repoze.what-plugins-20090531/debian/repoze.what-pylons.watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/(rc|a|b)\d+/~$1/" \ +http://pypi.python.org/packages/source/r/repoze.what-pylons/repoze.what-pylons-([0-9a-z.]+)\.tar\.gz --- python-repoze.what-plugins-20090531.orig/repoze.what.plugins.sql-1.0rc1/repoze/what/plugins/sql/adapters.py +++ python-repoze.what-plugins-20090531/repoze.what.plugins.sql-1.0rc1/repoze/what/plugins/sql/adapters.py @@ -60,7 +60,10 @@ """ -from sqlalchemy.exceptions import SQLAlchemyError +try: + from sqlalchemy.exceptions import SQLAlchemyError +except ImportError: + from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.exc import NoResultFound from repoze.what.adapters import BaseSourceAdapter, SourceError