[Python-modules-commits] r5273 - in packages/pygments/trunk/debian (6 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Wed May 7 20:52:53 UTC 2008


    Date: Wednesday, May 7, 2008 @ 20:52:51
  Author: piotr
Revision: 5273

* New upstream release
* Add make_utf8_default patch - useful while using pygmentize with pipes
  (use: pygmentize -P 'encoding=ascii' if you want old behaviour)
* Install debian/pygmentize instead of script created by setuptools
* Change Debian packaging licence to match upstream

Added:
  packages/pygments/trunk/debian/patches/make_utf8_default.patch
  packages/pygments/trunk/debian/pygmentize
Modified:
  packages/pygments/trunk/debian/changelog
  packages/pygments/trunk/debian/copyright
  packages/pygments/trunk/debian/patches/series
  packages/pygments/trunk/debian/rules

Modified: packages/pygments/trunk/debian/changelog
===================================================================
--- packages/pygments/trunk/debian/changelog	2008-05-07 20:28:39 UTC (rev 5272)
+++ packages/pygments/trunk/debian/changelog	2008-05-07 20:52:51 UTC (rev 5273)
@@ -1,3 +1,13 @@
+pygments (0.10-1) unstable; urgency=low
+
+  * New upstream release
+  * Add make_utf8_default patch - useful while using pygmentize with pipes
+    (use: pygmentize -P 'encoding=ascii' if you want old behaviour)
+  * Install debian/pygmentize instead of script created by setuptools
+  * Change Debian packaging licence to match upstream
+
+ -- Piotr Ożarowski <piotr at debian.org>  Wed, 07 May 2008 20:38:26 +0200
+
 pygments (0.9-3) unstable; urgency=low
 
   [ Sandro Tosi ]

Modified: packages/pygments/trunk/debian/copyright
===================================================================
--- packages/pygments/trunk/debian/copyright	2008-05-07 20:28:39 UTC (rev 5272)
+++ packages/pygments/trunk/debian/copyright	2008-05-07 20:52:51 UTC (rev 5273)
@@ -5,7 +5,7 @@
 
 Upstream Author: Georg Brandl <g.brandl at gmx.net>
 
-Copyright: 2006-2007 by Georg Brandl, Armin Ronacher, Lukas Meuser and others
+Copyright: 2006-2008 by Georg Brandl, Armin Ronacher, Lukas Meuser and others
 (see AUTHORS file)
 
 License:
@@ -41,9 +41,5 @@
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-The Debian packaging is (C) 2006-2007, Piotr Ożarowski <piotr at debian.org> and
-is licensed under the GPL.
-
-On Debian systems, the complete text of the GNU General Public License
-can be found in `/usr/share/common-licenses/GPL'.
-
+The Debian packaging is (C) 2006-2008, Piotr Ożarowski <piotr at debian.org> and
+is licensed under the same licence as pygments.

Added: packages/pygments/trunk/debian/patches/make_utf8_default.patch
===================================================================
--- packages/pygments/trunk/debian/patches/make_utf8_default.patch	                        (rev 0)
+++ packages/pygments/trunk/debian/patches/make_utf8_default.patch	2008-05-07 20:52:51 UTC (rev 5273)
@@ -0,0 +1,60 @@
+Index: pygments-0.10/pygments/cmdline.py
+===================================================================
+--- pygments-0.10.orig/pygments/cmdline.py
++++ pygments-0.10/pygments/cmdline.py
+@@ -351,17 +351,17 @@ def main(args=sys.argv):
+             return 2
+         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:
+             # use terminal encoding
+-            lexer.encoding = getattr(sys.stdin, 'encoding', None) or 'ascii'
+-            fmter.encoding = getattr(sys.stdout, 'encoding', None) or 'ascii'
++            lexer.encoding = getattr(sys.stdin, 'encoding', None) or 'utf-8'
++            fmter.encoding = getattr(sys.stdout, 'encoding', None) or 'utf-8'
+ 
+     # ... and do it!
+     try:
+Index: pygments-0.10/pygments/formatters/latex.py
+===================================================================
+--- pygments-0.10.orig/pygments/formatters/latex.py
++++ pygments-0.10/pygments/formatters/latex.py
+@@ -236,6 +236,6 @@ class LatexFormatter(Formatter):
+                 dict(docclass  = self.docclass,
+                      preamble  = self.preamble,
+                      title     = self.title,
+-                     encoding  = self.encoding or 'latin1',
++                     encoding  = self.encoding or 'utf-8',
+                      styledefs = self.get_style_defs(),
+                      code      = outfile.getvalue()))
+Index: pygments-0.10/pygments/lexer.py
+===================================================================
+--- pygments-0.10.orig/pygments/lexer.py
++++ pygments-0.10/pygments/lexer.py
+@@ -56,7 +56,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
+-        string (default: ``'latin1'``).
++        string (default: ``'utf-8'``).
+         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):
+         self.stripnl = get_bool_opt(options, 'stripnl', True)
+         self.stripall = get_bool_opt(options, 'stripall', False)
+         self.tabsize = get_int_opt(options, 'tabsize', 0)
+-        self.encoding = options.get('encoding', 'latin1')
++        self.encoding = options.get('encoding', 'utf-8')
+         # self.encoding = options.get('inencoding', None) or self.encoding
+         self.filters = []
+         for filter_ in get_list_opt(options, 'filters', ()):

Modified: packages/pygments/trunk/debian/patches/series
===================================================================
--- packages/pygments/trunk/debian/patches/series	2008-05-07 20:28:39 UTC (rev 5272)
+++ packages/pygments/trunk/debian/patches/series	2008-05-07 20:52:51 UTC (rev 5273)
@@ -1 +1,2 @@
+make_utf8_default.patch
 disable_ez_setup.patch

Added: packages/pygments/trunk/debian/pygmentize
===================================================================
--- packages/pygments/trunk/debian/pygmentize	                        (rev 0)
+++ packages/pygments/trunk/debian/pygmentize	2008-05-07 20:52:51 UTC (rev 5273)
@@ -0,0 +1,3 @@
+#! /usr/bin/python
+import pygments.cmdline
+pygments.cmdline.main()

Modified: packages/pygments/trunk/debian/rules
===================================================================
--- packages/pygments/trunk/debian/rules	2008-05-07 20:28:39 UTC (rev 5272)
+++ packages/pygments/trunk/debian/rules	2008-05-07 20:52:51 UTC (rev 5273)
@@ -33,7 +33,7 @@
 	dh_installchangelogs -i CHANGES
 	dh_installdocs -i
 	dh_installman -i
-	dh_install -i pygmentize /usr/bin/
+	dh_install -i debian/pygmentize /usr/bin/
 	dh_pysupport -i
 	dh_compress -i -X.py
 	dh_fixperms -i




More information about the Python-modules-commits mailing list