--- pyflakes-0.2.1.orig/debian/rules +++ pyflakes-0.2.1/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_PYTHON_SYSTEM=pycentral + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk + +DEB_PYTHON_INSTALL_ARGS_ALL += --prefix=/usr + +#DEB_INSTALL_PYTHON_gnue-common = /usr/lib/gnue/python + +clean:: + find . -name \*pyc -exec rm '{}' \; + #find . -name '.svn' -type d -exec rm -rf '{}' \; --- pyflakes-0.2.1.orig/debian/compat +++ pyflakes-0.2.1/debian/compat @@ -0,0 +1 @@ +4 --- pyflakes-0.2.1.orig/debian/control +++ pyflakes-0.2.1/debian/control @@ -0,0 +1,21 @@ +Source: pyflakes +Section: python +Priority: optional +Maintainer: Andrew Mitchell +Build-Depends: debhelper (>= 5.0.37.2), cdbs (>= 0.4.43), python-central (>= 0.5), python, python-dev +XS-Python-Version: current +Standards-Version: 3.7.2 + +Package: pyflakes +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends} +Description: simple python source checker + Pyflakes is a simple program which checks Python source files for errors. + It is similar to PyChecker in scope, but differs in that it does not execute + the modules to check them. This is both safer and faster, although it does + not perform as many checks. Unlike PyLint, Pyflakes checks only for logical + errors in programs; it does not perform any checks on style. + + + --- pyflakes-0.2.1.orig/debian/copyright +++ pyflakes-0.2.1/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by Andrew Mitchell on +Fri Sep 30 00:52:30 NZST 2005 from sources obtained from: + +http://divmod.org/projects/pyflakes + +Copyright: + +Copyright (c) 2005 Divmod, Inc., http://www.divmod.com/ + +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. + + --- pyflakes-0.2.1.orig/debian/changelog +++ pyflakes-0.2.1/debian/changelog @@ -0,0 +1,31 @@ +pyflakes (0.2.1-2build1) feisty; urgency=low + + * Rebuild for python2.5 as the default python version. + + -- Andrew Mitchell Mon, 5 Feb 2007 13:35:51 +1300 + +pyflakes (0.2.1-2) unstable; urgency=low + + * Update for new python policy (Closes: #380903) + + -- Andrew Mitchell Sat, 22 Jul 2006 15:56:22 +1200 + +pyflakes (0.2.1-1) unstable; urgency=low + + * Initial Debian release (Closes: #330896) + + -- Andrew Mitchell Wed, 3 May 2006 18:12:15 +1200 + +pyflakes (0.2.1-0ubuntu1) breezy; urgency=low + + * New upstream release + * Changed Section to python + + -- Andrew Mitchell Thu, 13 Oct 2005 02:37:05 +1300 + +pyflakes (0.2.0-0ubuntu1) breezy; urgency=low + + * Initial release + + -- Andrew Mitchell Fri, 30 Sep 2005 00:54:25 +1200 + --- pyflakes-0.2.1.orig/debian/pycompat +++ pyflakes-0.2.1/debian/pycompat @@ -0,0 +1 @@ +2 \ No newline at end of file --- pyflakes-0.2.1.orig/build/scripts-2.3/pyflakes +++ pyflakes-0.2.1/build/scripts-2.3/pyflakes @@ -0,0 +1,40 @@ +#!/usr/bin/python + +import compiler, sys +import os +import pyflakes + + +def check(codeString, filename): + try: + tree = compiler.parse(codeString) + except (SyntaxError, IndentationError): + value = sys.exc_info()[1] + (lineno, offset, line) = value[1][1:] + if line.endswith("\n"): + line = line[:-1] + print >> sys.stderr, 'could not compile %r:%d:' % (filename, lineno) + print >> sys.stderr, line + print >> sys.stderr, " " * (offset-2), "^" + else: + w = pyflakes.Checker(tree, filename) + w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno)) + for warning in w.messages: + print warning + + +def checkPath(filename): + return check(file(filename).read(), filename) + +args = sys.argv[1:] +if args: + for arg in args: + if os.path.isdir(arg): + for dirpath, dirnames, filenames in os.walk(arg): + for filename in filenames: + if filename.endswith('.py'): + checkPath(os.path.join(dirpath, filename)) + else: + checkPath(arg) +else: + check(sys.stdin.read(), '')