[Python-modules-commits] r20739 - in packages/pygments/trunk/debian (4 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Sun Mar 11 17:26:16 UTC 2012


    Date: Sunday, March 11, 2012 @ 17:26:13
  Author: piotr
Revision: 20739

* New upstream release
* debian/pygmentize no longer needed, upstream now ships the script in the
  tarball (and it returns correct exit codes, closes: 628881)

Modified:
  packages/pygments/trunk/debian/changelog
  packages/pygments/trunk/debian/patches/make_utf8_default.patch
  packages/pygments/trunk/debian/rules
Deleted:
  packages/pygments/trunk/debian/pygmentize

Modified: packages/pygments/trunk/debian/changelog
===================================================================
--- packages/pygments/trunk/debian/changelog	2012-03-11 14:09:19 UTC (rev 20738)
+++ packages/pygments/trunk/debian/changelog	2012-03-11 17:26:13 UTC (rev 20739)
@@ -1,9 +1,12 @@
-pygments (1.4+dfsg-2) UNRELEASED; urgency=low
+pygments (1.5+dfsg-1) unstable; urgency=low
 
+  * New upstream release
   * make_utf8_default patch: do not change the encoding guessing part in
-    pygments/lexer.py 
+    pygments/lexer.py; updated to new upstream version
+  * debian/pygmentize no longer needed, upstream now ships the script in the
+    tarball (and it returns correct exit codes, closes: 628881)
 
- -- Piotr Ożarowski <piotr at debian.org>  Wed, 23 Feb 2011 21:30:53 +0100
+ -- Piotr Ożarowski <piotr at debian.org>  Sun, 11 Mar 2012 18:22:42 +0100
 
 pygments (1.4+dfsg-1) unstable; urgency=low
 

Modified: packages/pygments/trunk/debian/patches/make_utf8_default.patch
===================================================================
--- packages/pygments/trunk/debian/patches/make_utf8_default.patch	2012-03-11 14:09:19 UTC (rev 20738)
+++ packages/pygments/trunk/debian/patches/make_utf8_default.patch	2012-03-11 17:26:13 UTC (rev 20739)
@@ -4,40 +4,11 @@
 upstream knows about this patch (will not apply it as not all distributions are
 using UTF-8 by defauly, like Debian does)
 
-Index: Pygments-1.4/pygments/cmdline.py
+Index: pygments-1.5/pygments/formatters/latex.py
 ===================================================================
---- Pygments-1.4.orig/pygments/cmdline.py
-+++ Pygments-1.4/pygments/cmdline.py
-@@ -394,20 +394,20 @@ def main(args=sys.argv):
-         else:
-             code = sys.stdin.read()
- 
--    # No encoding given? Use latin1 if output file given,
-+    # No encoding given? Use utf-8 if output file given,
-     # stdin/stdout encoding otherwise.
-     # (This is a compromise, I'm not too happy with it...)
-     if 'encoding' not in parsed_opts and 'outencoding' not in parsed_opts:
-         if outfn:
-             # encoding pass-through
--            fmter.encoding = 'latin1'
-+            fmter.encoding = 'utf-8'
-         else:
-             if sys.version_info < (3,):
-                 # use terminal encoding; Python 3's terminals already do that
-                 lexer.encoding = getattr(sys.stdin, 'encoding',
--                                         None) or 'ascii'
-+                                         None) or 'utf-8'
-                 fmter.encoding = getattr(sys.stdout, 'encoding',
--                                         None) or 'ascii'
-+                                         None) or 'utf-8'
- 
-     # ... and do it!
-     try:
-Index: Pygments-1.4/pygments/formatters/latex.py
-===================================================================
---- Pygments-1.4.orig/pygments/formatters/latex.py
-+++ Pygments-1.4/pygments/formatters/latex.py
-@@ -358,6 +358,6 @@ class LatexFormatter(Formatter):
+--- pygments-1.5.orig/pygments/formatters/latex.py
++++ pygments-1.5/pygments/formatters/latex.py
+@@ -367,6 +367,6 @@ class LatexFormatter(Formatter):
                  dict(docclass  = self.docclass,
                       preamble  = self.preamble,
                       title     = self.title,
@@ -45,11 +16,11 @@
 +                     encoding  = self.encoding or 'utf-8',
                       styledefs = self.get_style_defs(),
                       code      = outfile.getvalue()))
-Index: Pygments-1.4/pygments/lexer.py
+Index: pygments-1.5/pygments/lexer.py
 ===================================================================
---- Pygments-1.4.orig/pygments/lexer.py
-+++ Pygments-1.4/pygments/lexer.py
-@@ -55,7 +55,7 @@ class Lexer(object):
+--- pygments-1.5.orig/pygments/lexer.py
++++ pygments-1.5/pygments/lexer.py
+@@ -61,7 +61,7 @@ class Lexer(object):
      ``encoding``
          If given, must be an encoding name. This encoding will be used to
          convert the input string to Unicode, if it is not already a Unicode
@@ -58,7 +29,7 @@
          Can also be ``'guess'`` to use a simple UTF-8 / Latin1 detection, or
          ``'chardet'`` to use the chardet library, if it is installed.
      """
-@@ -83,7 +83,7 @@ class Lexer(object):
+@@ -89,7 +89,7 @@ class Lexer(object):
          self.stripall = get_bool_opt(options, 'stripall', False)
          self.ensurenl = get_bool_opt(options, 'ensurenl', True)
          self.tabsize = get_int_opt(options, 'tabsize', 0)
@@ -67,10 +38,10 @@
          # self.encoding = options.get('inencoding', None) or self.encoding
          self.filters = []
          for filter_ in get_list_opt(options, 'filters', ()):
-Index: Pygments-1.4/pygments/lexers/__init__.py
+Index: pygments-1.5/pygments/lexers/__init__.py
 ===================================================================
---- Pygments-1.4.orig/pygments/lexers/__init__.py
-+++ Pygments-1.4/pygments/lexers/__init__.py
+--- pygments-1.5.orig/pygments/lexers/__init__.py
++++ pygments-1.5/pygments/lexers/__init__.py
 @@ -101,7 +101,7 @@ def get_lexer_for_filename(_fn, code=Non
  
      if sys.version_info > (3,) and isinstance(code, bytes):
@@ -78,12 +49,12 @@
 -        code = code.decode('latin1')
 +        code = code.decode('utf-8')
  
-     def get_rating(cls):
-         # The class _always_ defines analyse_text because it's included in
-Index: Pygments-1.4/pygments/formatters/other.py
+     def get_rating(info):
+         cls, filename = info
+Index: pygments-1.5/pygments/formatters/other.py
 ===================================================================
---- Pygments-1.4.orig/pygments/formatters/other.py
-+++ Pygments-1.4/pygments/formatters/other.py
+--- pygments-1.5.orig/pygments/formatters/other.py
++++ pygments-1.5/pygments/formatters/other.py
 @@ -64,7 +64,7 @@ class RawTokenFormatter(Formatter):
          if self.encoding:
              raise OptionError('the raw formatter does not support the '
@@ -93,3 +64,32 @@
          self.compress = get_choice_opt(options, 'compress',
                                         ['', 'none', 'gz', 'bz2'], '')
          self.error_color = options.get('error_color', None)
+Index: pygments-1.5/pygments/cmdline.py
+===================================================================
+--- pygments-1.5.orig/pygments/cmdline.py
++++ pygments-1.5/pygments/cmdline.py
+@@ -394,20 +394,20 @@ def main(args=sys.argv):
+         else:
+             code = sys.stdin.read()
+ 
+-    # No encoding given? Use latin1 if output file given,
++    # No encoding given? Use utf-8 if output file given,
+     # stdin/stdout encoding otherwise.
+     # (This is a compromise, I'm not too happy with it...)
+     if 'encoding' not in parsed_opts and 'outencoding' not in parsed_opts:
+         if outfn:
+             # encoding pass-through
+-            fmter.encoding = 'latin1'
++            fmter.encoding = 'utf-8'
+         else:
+             if sys.version_info < (3,):
+                 # use terminal encoding; Python 3's terminals already do that
+                 lexer.encoding = getattr(sys.stdin, 'encoding',
+-                                         None) or 'ascii'
++                                         None) or 'utf-8'
+                 fmter.encoding = getattr(sys.stdout, 'encoding',
+-                                         None) or 'ascii'
++                                         None) or 'utf-8'
+     elif not outfn and sys.version_info > (3,):
+         # output to terminal with encoding -> use .buffer
+         outfile = sys.stdout.buffer

Deleted: packages/pygments/trunk/debian/pygmentize
===================================================================
--- packages/pygments/trunk/debian/pygmentize	2012-03-11 14:09:19 UTC (rev 20738)
+++ packages/pygments/trunk/debian/pygmentize	2012-03-11 17:26:13 UTC (rev 20739)
@@ -1,3 +0,0 @@
-#! /usr/bin/python
-import pygments.cmdline
-pygments.cmdline.main()

Modified: packages/pygments/trunk/debian/rules
===================================================================
--- packages/pygments/trunk/debian/rules	2012-03-11 14:09:19 UTC (rev 20738)
+++ packages/pygments/trunk/debian/rules	2012-03-11 17:26:13 UTC (rev 20739)
@@ -39,7 +39,7 @@
 	dh_installexamples -i
 	dh_installdocs -i
 	dh_installman -i
-	dh_install -i -p python-pygments debian/pygmentize /usr/bin/
+	dh_install -i -p python-pygments pygmentize /usr/bin/
 	rm -rf debian/python3-pygments/usr/bin/
 	dh_python2 -i
 	dh_python3 -i




More information about the Python-modules-commits mailing list