[Python-apps-commits] r1838 - in packages/pyflakes/trunk/debian (9 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Sat Sep 20 19:09:12 UTC 2008


    Date: Saturday, September 20, 2008 @ 19:09:02
  Author: morph
Revision: 1838

* debian/control
  - changed my email address
* Update to a recent SVN checkout
* Strip whitespace in debian/rules
* Refresh patches
* Fixed installation with debian/patches/install_scripts_package.diff

Added:
  packages/pyflakes/trunk/debian/patches/install_scripts_package.diff
Modified:
  packages/pyflakes/trunk/debian/changelog
  packages/pyflakes/trunk/debian/control
  packages/pyflakes/trunk/debian/patches/add_main_function.diff
  packages/pyflakes/trunk/debian/patches/always_close_fd.diff
  packages/pyflakes/trunk/debian/patches/check_encoding_errors.diff
  packages/pyflakes/trunk/debian/patches/series
  packages/pyflakes/trunk/debian/patches/set_exit_status.diff
  packages/pyflakes/trunk/debian/rules

Modified: packages/pyflakes/trunk/debian/changelog
===================================================================
--- packages/pyflakes/trunk/debian/changelog	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/changelog	2008-09-20 19:09:02 UTC (rev 1838)
@@ -1,4 +1,4 @@
-pyflakes (0.2.1+svn14502-3) UNRELEASED; urgency=low
+pyflakes (0.2.1+svn16699-1) UNRELEASED; urgency=low
 
   [ Tristan Seligmann ]
   * Remove redundant/broken python_unicode patch.
@@ -7,9 +7,17 @@
   [ Sandro Tosi ]
   * debian/watch
     - added
+  * debian/control
+    - changed my email address
 
- -- Sandro Tosi <matrixhasu at gmail.com>  Sun, 13 Jul 2008 20:22:59 +0200
+  [ Hervé Cauwelier ]
+  * Update to a recent SVN checkout
+  * Strip whitespace in debian/rules
+  * Refresh patches
+  * Fixed installation with debian/patches/install_scripts_package.diff
 
+ -- Sandro Tosi <morph at debian.org>  Sat, 20 Sep 2008 21:02:26 +0200
+
 pyflakes (0.2.1+svn14502-2) unstable; urgency=low
 
   [ Varun Hiremath ]

Modified: packages/pyflakes/trunk/debian/control
===================================================================
--- packages/pyflakes/trunk/debian/control	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/control	2008-09-20 19:09:02 UTC (rev 1838)
@@ -2,7 +2,7 @@
 Section: python
 Priority: optional
 Maintainer: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
-Uploaders: Tristan Seligmann <mithrandi at mithrandi.net>, Varun Hiremath <varun at debian.org>, Sandro Tosi <matrixhasu at gmail.com>
+Uploaders: Tristan Seligmann <mithrandi at mithrandi.net>, Varun Hiremath <varun at debian.org>, Sandro Tosi <morph at debian.org>
 Build-Depends: debhelper (>= 5.0.37.2), cdbs (>= 0.4.43), python-central (>= 0.6), python, quilt
 XS-Python-Version: current
 Standards-Version: 3.7.3

Modified: packages/pyflakes/trunk/debian/patches/add_main_function.diff
===================================================================
--- packages/pyflakes/trunk/debian/patches/add_main_function.diff	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/patches/add_main_function.diff	2008-09-20 19:09:02 UTC (rev 1838)
@@ -2,39 +2,23 @@
 ===================================================================
 --- a/bin/pyflakes
 +++ b/bin/pyflakes
-@@ -32,18 +32,21 @@
-     if os.path.exists(filename):
-         return check(file(filename, 'U').read(), filename)
+@@ -1,4 +1,5 @@
+ #!/usr/bin/python
  
--warnings = 0
--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'):
--                        warnings += checkPath(os.path.join(dirpath, filename))
--        else:
--            warnings += checkPath(arg)
--else:
--    warnings += check(sys.stdin.read(), '<stdin>')
-+def main(args):
-+    warnings = 0
-+    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'):
-+                            warnings += checkPath(os.path.join(dirpath, filename))
-+            else:
-+                warnings += checkPath(arg)
-+    else:
-+        warnings += check(sys.stdin.read(), '<stdin>')
-+    
-+    raise SystemExit(warnings > 0)
++import sys
+ from pyflakes.scripts.pyflakes import main
+-main()
++main(sys.argv[1:])
+--- a/pyflakes/scripts/pyflakes.py
++++ b/pyflakes/scripts/pyflakes.py
+@@ -37,9 +37,8 @@
+         return check(file(filename, 'U').read() + '\n', filename)
  
--raise SystemExit(warnings > 0)
-+if __name__ == '__main__':
-+    main(sys.argv[1:])
+ 
+-def main():
++def main(args):
+     warnings = 0
+-    args = sys.argv[1:]
+     if args:
+         for arg in args:
+             if os.path.isdir(arg):

Modified: packages/pyflakes/trunk/debian/patches/always_close_fd.diff
===================================================================
--- packages/pyflakes/trunk/debian/patches/always_close_fd.diff	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/patches/always_close_fd.diff	2008-09-20 19:09:02 UTC (rev 1838)
@@ -1,12 +1,12 @@
 Index: b/bin/pyflakes
 ===================================================================
---- a/bin/pyflakes
-+++ b/bin/pyflakes
-@@ -30,7 +30,11 @@
+--- a/pyflakes/scripts/pyflakes.py
++++ b/pyflakes/scripts/pyflakes.py
+@@ -34,7 +34,11 @@
  
  def checkPath(filename):
      if os.path.exists(filename):
--        return check(file(filename, 'U').read(), filename)
+-        return check(file(filename, 'U').read() + '\n', filename)
 +        fd = file(filename, 'U')
 +        try:
 +            return check(fd.read(), filename)

Modified: packages/pyflakes/trunk/debian/patches/check_encoding_errors.diff
===================================================================
--- packages/pyflakes/trunk/debian/patches/check_encoding_errors.diff	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/patches/check_encoding_errors.diff	2008-09-20 19:09:02 UTC (rev 1838)
@@ -1,14 +1,14 @@
 Index: b/bin/pyflakes
 ===================================================================
---- a/bin/pyflakes
-+++ b/bin/pyflakes
+--- a/pyflakes/scripts/pyflakes.py
++++ b/pyflakes/scripts/pyflakes.py
 @@ -24,6 +24,9 @@
          print >> sys.stderr, line
          print >> sys.stderr, " " * (offset-2), "^"
-         status = 2
+         return 1
 +    except UnicodeError, msg:
 +        print >> sys.stderr, 'encoding error at %r: %s' % (filename, msg)
-+        status = 2
++        return 1
      else:
          w = checker.Checker(tree, filename)
          w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))

Added: packages/pyflakes/trunk/debian/patches/install_scripts_package.diff
===================================================================
--- packages/pyflakes/trunk/debian/patches/install_scripts_package.diff	                        (rev 0)
+++ packages/pyflakes/trunk/debian/patches/install_scripts_package.diff	2008-09-20 19:09:02 UTC (rev 1838)
@@ -0,0 +1,13 @@
+Index: b/bin/pyflakes
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -12,7 +12,7 @@
+     maintainer="Moe Aboulkheir",
+     maintainer_email="moe at divmod.com",
+     url="http://www.divmod.org/projects/pyflakes",
+-    packages=["pyflakes"],
++    packages=["pyflakes", "pyflakes/scripts"],
+     scripts=["bin/pyflakes"],
+     long_description="""Pyflakes is program to analyze Python programs and detect various errors. It
+ works by parsing the source file, not importing it, so it is safe to use on

Modified: packages/pyflakes/trunk/debian/patches/series
===================================================================
--- packages/pyflakes/trunk/debian/patches/series	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/patches/series	2008-09-20 19:09:02 UTC (rev 1838)
@@ -2,3 +2,5 @@
 always_close_fd.diff
 set_exit_status.diff
 check_encoding_errors.diff
+pyflakes_unicode.diff
+install_scripts_package.diff

Modified: packages/pyflakes/trunk/debian/patches/set_exit_status.diff
===================================================================
--- packages/pyflakes/trunk/debian/patches/set_exit_status.diff	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/patches/set_exit_status.diff	2008-09-20 19:09:02 UTC (rev 1838)
@@ -2,36 +2,17 @@
 ===================================================================
 --- a/bin/pyflakes
 +++ b/bin/pyflakes
-@@ -4,7 +4,11 @@
- import os
- from pyflakes import checker
+@@ -2,4 +2,4 @@
  
-+# exit status
-+status = 0
-+
- def check(codeString, filename):
-+    global status
-     try:
-         tree = compiler.parse(codeString)
-     except (SyntaxError, IndentationError):
-@@ -19,12 +23,14 @@
-         print >> sys.stderr, '%s:%d: could not compile' % (filename, lineno)
-         print >> sys.stderr, line
-         print >> sys.stderr, " " * (offset-2), "^"
--        return 1
-+        status = 2
+ import sys
+ from pyflakes.scripts.pyflakes import main
+-main(sys.argv[1:])
++sys.exit(main(sys.argv[1:]))
+--- a/pyflakes/scripts/pyflakes.py
++++ b/pyflakes/scripts/pyflakes.py
+@@ -55,4 +61,4 @@
      else:
-         w = checker.Checker(tree, filename)
-         w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
-         for warning in w.messages:
-             print warning
-+            if status == 0 and len(w.messages) > 0:
-+                status = 1
-         return len(w.messages)
+         warnings += check(sys.stdin.read(), '<stdin>')
  
- 
-@@ -54,3 +62,4 @@
- 
- if __name__ == '__main__':
-     main(sys.argv[1:])
-+    sys.exit(status)
+-    raise SystemExit(warnings > 0)
++    return warnings

Modified: packages/pyflakes/trunk/debian/rules
===================================================================
--- packages/pyflakes/trunk/debian/rules	2008-09-19 20:23:10 UTC (rev 1837)
+++ packages/pyflakes/trunk/debian/rules	2008-09-20 19:09:02 UTC (rev 1838)
@@ -8,7 +8,7 @@
 include /usr/share/cdbs/1/class/python-distutils.mk
 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 
-DEB_PYTHON_INSTALL_ARGS_ALL += --prefix=/usr 
+DEB_PYTHON_INSTALL_ARGS_ALL += --prefix=/usr
 
 clean::
 	find . -name \*pyc -exec rm '{}' \;




More information about the Python-apps-commits mailing list