[Python-modules-commits] r31155 - in packages/pygments/trunk/debian (16 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Sun Oct 19 21:56:52 UTC 2014


    Date: Sunday, October 19, 2014 @ 21:56:51
  Author: piotr
Revision: 31155

* New upstream release
  - Bump X-Python-Version to 2.6
* Documentation moved to new binary package: python-pygments-doc
* Add dh-python and python-sphinx to Build-Depends
* Switch debhelper compat level to 9
* Standards-Version bumped to 3.9.6 (no changes needed)

Added:
  packages/pygments/trunk/debian/patches/change_docs_theme.patch
  packages/pygments/trunk/debian/python-pygments-doc.dirs
  packages/pygments/trunk/debian/python-pygments-doc.docs
  packages/pygments/trunk/debian/python-pygments-doc.examples
  packages/pygments/trunk/debian/python-pygments-doc.install
  packages/pygments/trunk/debian/python-pygments-doc.links
Modified:
  packages/pygments/trunk/debian/changelog
  packages/pygments/trunk/debian/compat
  packages/pygments/trunk/debian/control
  packages/pygments/trunk/debian/dirs
  packages/pygments/trunk/debian/manpages
  packages/pygments/trunk/debian/patches/make_utf8_default.patch
  packages/pygments/trunk/debian/patches/series
  packages/pygments/trunk/debian/rules
Deleted:
  packages/pygments/trunk/debian/docs
  packages/pygments/trunk/debian/examples

Modified: packages/pygments/trunk/debian/changelog
===================================================================
--- packages/pygments/trunk/debian/changelog	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/changelog	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1,4 +1,4 @@
-pygments (1.6+dfsg-2) UNRELEASED; urgency=low
+pygments (2.0~rc1.a2bc2bd+dfsg-1) unstable; urgency=medium
 
   [ Jakub Wilk ]
   * Use canonical URIs for Vcs-* fields.
@@ -8,8 +8,16 @@
     and python[3]-all (to run tests for all supported Python versions).
     Closes: #740166.
 
- -- Jakub Wilk <jwilk at debian.org>  Sun, 05 May 2013 16:01:45 +0200
+  [ Piotr Ożarowski ]
+  * New upstream release
+    - Bump X-Python-Version to 2.6
+  * Documentation moved to new binary package: python-pygments-doc
+  * Add dh-python and python-sphinx to Build-Depends
+  * Switch debhelper compat level to 9
+  * Standards-Version bumped to 3.9.6 (no changes needed)
 
+ -- Piotr Ożarowski <piotr at debian.org>  Sun, 19 Oct 2014 23:00:26 +0200
+
 pygments (1.6+dfsg-1) experimental; urgency=low
 
   * New upstream release

Modified: packages/pygments/trunk/debian/compat
===================================================================
--- packages/pygments/trunk/debian/compat	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/compat	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1 +1 @@
-5
+9

Modified: packages/pygments/trunk/debian/control
===================================================================
--- packages/pygments/trunk/debian/control	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/control	2014-10-19 21:56:51 UTC (rev 31155)
@@ -3,19 +3,19 @@
 Priority: optional
 Maintainer: Piotr Ożarowski <piotr at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 5)
-Build-Depends-Indep: python-all (>= 2.6.6-3), python3-all, python3-setuptools,
- python-setuptools (>= 0.6b3), python-docutils, python-jinja2
-Standards-Version: 3.9.4
+Build-Depends: debhelper (>= 9)
+Build-Depends-Indep: dh-python, python-all (>= 2.6.6-3), python3-all, python3-setuptools,
+ python-setuptools (>= 0.6b3), python-docutils, python-jinja2, python-sphinx
+Standards-Version: 3.9.6
 Homepage: http://pygments.org/
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/pygments/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/pygments/trunk/
-X-Python-Version: >= 2.4
+X-Python-Version: >= 2.6
 XS-Testsuite: autopkgtest
 
 Package: python-pygments
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
+Depends: ${python:Depends}, ${misc:Depends}, ${sphinxdoc:Depends}
 Recommends: python-chardet, python-pkg-resources
 Suggests: ttf-bitstream-vera
 Description: syntax highlighting package written in Python
@@ -46,3 +46,16 @@
    * support for new languages and formats are added easily
    * a number of output formats, presently HTML, LaTeX and ANSI sequences
    * it is usable as a command-line tool and as a library
+
+Package: python-pygments-doc
+Section: doc
+Architecture: all
+Priority: extra
+Depends: ${misc:Depends}, ${sphinxdoc:Depends}
+Recommends: python-pygments
+Conflicts: python-pygments (<= 2.0~)
+Description: documentation for the Pygments
+ Pygments is syntax highlighting package.
+ .
+ This package contains the documentation for Pygments in HTML and
+ reStructuredText format.

Modified: packages/pygments/trunk/debian/dirs
===================================================================
--- packages/pygments/trunk/debian/dirs	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/dirs	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1,2 +1 @@
-/usr/share/doc/python-pygments
 /etc/bash_completion.d

Deleted: packages/pygments/trunk/debian/docs
===================================================================
--- packages/pygments/trunk/debian/docs	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/docs	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1,2 +0,0 @@
-AUTHORS
-TODO

Deleted: packages/pygments/trunk/debian/examples
===================================================================
--- packages/pygments/trunk/debian/examples	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/examples	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1 +0,0 @@
-external/*py

Modified: packages/pygments/trunk/debian/manpages
===================================================================
--- packages/pygments/trunk/debian/manpages	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/manpages	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1 +1 @@
-docs/pygmentize.1
+doc/pygmentize.1

Added: packages/pygments/trunk/debian/patches/change_docs_theme.patch
===================================================================
--- packages/pygments/trunk/debian/patches/change_docs_theme.patch	                        (rev 0)
+++ packages/pygments/trunk/debian/patches/change_docs_theme.patch	2014-10-19 21:56:51 UTC (rev 31155)
@@ -0,0 +1,13 @@
+Index: pygments-2.0rc1+a2bc2bd/doc/conf.py
+===================================================================
+--- pygments-2.0rc1+a2bc2bd.orig/doc/conf.py
++++ pygments-2.0rc1+a2bc2bd/doc/conf.py
+@@ -93,7 +93,7 @@ exclude_patterns = ['_build']
+ 
+ # The theme to use for HTML and HTML Help pages.  See the documentation for
+ # a list of builtin themes.
+-html_theme = 'pygments14'
++html_theme = 'default'
+ 
+ # Theme options are theme-specific and customize the look and feel of a theme
+ # further.  For a list of options available for each theme, see the

Modified: packages/pygments/trunk/debian/patches/make_utf8_default.patch
===================================================================
--- packages/pygments/trunk/debian/patches/make_utf8_default.patch	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/patches/make_utf8_default.patch	2014-10-19 21:56:51 UTC (rev 31155)
@@ -4,11 +4,11 @@
 upstream knows about this patch (will not apply it as not all distributions are
 using UTF-8 by default, like Debian does)
 
-Index: pygments-1.6+dfsg/pygments/formatters/latex.py
+Index: Pygments-2.0rc1/pygments/formatters/latex.py
 ===================================================================
---- pygments-1.6+dfsg.orig/pygments/formatters/latex.py
-+++ pygments-1.6+dfsg/pygments/formatters/latex.py
-@@ -373,6 +373,6 @@ class LatexFormatter(Formatter):
+--- Pygments-2.0rc1.orig/pygments/formatters/latex.py
++++ Pygments-2.0rc1/pygments/formatters/latex.py
+@@ -417,7 +417,7 @@ class LatexFormatter(Formatter):
                  dict(docclass  = self.docclass,
                       preamble  = self.preamble,
                       title     = self.title,
@@ -16,33 +16,34 @@
 +                     encoding  = self.encoding or 'utf-8',
                       styledefs = self.get_style_defs(),
                       code      = outfile.getvalue()))
-Index: pygments-1.6+dfsg/pygments/lexer.py
+ 
+Index: Pygments-2.0rc1/pygments/lexer.py
 ===================================================================
---- pygments-1.6+dfsg.orig/pygments/lexer.py
-+++ pygments-1.6+dfsg/pygments/lexer.py
-@@ -61,7 +61,7 @@ class Lexer(object):
+--- Pygments-2.0rc1.orig/pygments/lexer.py
++++ Pygments-2.0rc1/pygments/lexer.py
+@@ -71,7 +71,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.
-     """
-@@ -92,7 +92,7 @@ class Lexer(object):
+         Can also be ``'guess'`` to use a simple UTF-8 / Locale / Latin1
+         detection, or ``'chardet'`` to use the chardet library, if it is
+         installed.
+@@ -103,7 +103,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)
 -        self.encoding = options.get('encoding', 'latin1')
 +        self.encoding = options.get('encoding', 'utf-8')
-         # self.encoding = options.get('inencoding', None) or self.encoding
+         self.encoding = options.get('inencoding') or self.encoding
          self.filters = []
          for filter_ in get_list_opt(options, 'filters', ()):
-Index: pygments-1.6+dfsg/pygments/lexers/__init__.py
+Index: Pygments-2.0rc1/pygments/lexers/__init__.py
 ===================================================================
---- pygments-1.6+dfsg.orig/pygments/lexers/__init__.py
-+++ pygments-1.6+dfsg/pygments/lexers/__init__.py
-@@ -101,7 +101,7 @@ def get_lexer_for_filename(_fn, code=Non
+--- Pygments-2.0rc1.orig/pygments/lexers/__init__.py
++++ Pygments-2.0rc1/pygments/lexers/__init__.py
+@@ -116,7 +116,7 @@ def find_lexer_class_for_filename(_fn, c
  
      if sys.version_info > (3,) and isinstance(code, bytes):
          # decode it, since all analyse_text functions expect unicode
@@ -51,45 +52,68 @@
  
      def get_rating(info):
          cls, filename = info
-Index: pygments-1.6+dfsg/pygments/formatters/other.py
+Index: Pygments-2.0rc1/pygments/formatters/other.py
 ===================================================================
---- pygments-1.6+dfsg.orig/pygments/formatters/other.py
-+++ pygments-1.6+dfsg/pygments/formatters/other.py
+--- Pygments-2.0rc1.orig/pygments/formatters/other.py
++++ Pygments-2.0rc1/pygments/formatters/other.py
 @@ -64,7 +64,7 @@ class RawTokenFormatter(Formatter):
-         if self.encoding:
-             raise OptionError('the raw formatter does not support the '
-                               'encoding option')
+         Formatter.__init__(self, **options)
+         # We ignore self.encoding if it is set, since it gets set for lexer
+         # and formatter if given with -Oencoding on the command line.
 -        self.encoding = 'ascii'  # let pygments.format() do the right thing
 +        self.encoding = 'utf-8'  # let pygments.format() do the right thing
          self.compress = get_choice_opt(options, 'compress',
                                         ['', 'none', 'gz', 'bz2'], '')
          self.error_color = options.get('error_color', None)
-Index: pygments-1.6+dfsg/pygments/cmdline.py
+Index: Pygments-2.0rc1/doc/docs/cmdline.rst
 ===================================================================
---- pygments-1.6+dfsg.orig/pygments/cmdline.py
-+++ pygments-1.6+dfsg/pygments/cmdline.py
-@@ -402,20 +402,20 @@ def main(args=sys.argv):
-         else:
-             code = sys.stdin.read()
+--- Pygments-2.0rc1.orig/doc/docs/cmdline.rst
++++ Pygments-2.0rc1/doc/docs/cmdline.rst
+@@ -137,7 +137,7 @@ Pygments tries to be smart regarding enc
+   as the output encoding.
  
--    # 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
+ * If you don't give an encoding and have given an output file, the default
+-  encoding for lexer and formatter is ``latin1`` (which will pass through
++  encoding for lexer and formatter is ``utf-8`` (which will pass through
+   all non-ASCII characters).
+ 
+ * If you don't give an encoding and haven't given an output file (that means
+Index: Pygments-2.0rc1/doc/docs/lexers.rst
+===================================================================
+--- Pygments-2.0rc1.orig/doc/docs/lexers.rst
++++ Pygments-2.0rc1/doc/docs/lexers.rst
+@@ -27,7 +27,7 @@ Currently, **all lexers** support these
+ `encoding`
+     If given, must be an encoding name (such as ``"utf-8"``). This encoding
+     will be used to convert the input string to Unicode (if it is not already
+-    a Unicode string). The default is ``"latin1"``.
++    a Unicode string). The default is ``"utf-8"``.
+ 
+     If this option is set to ``"guess"``, a simple UTF-8 vs. Latin-1
+     detection is used, if it is set to ``"chardet"``, the
+Index: Pygments-2.0rc1/doc/docs/unicode.rst
+===================================================================
+--- Pygments-2.0rc1.orig/doc/docs/unicode.rst
++++ Pygments-2.0rc1/doc/docs/unicode.rst
+@@ -6,7 +6,7 @@ Since Pygments 0.6, all lexers use unico
+ you might encounter the occasional :exc:`UnicodeDecodeError` if you pass strings
+ with the wrong encoding.
+ 
+-Per default all lexers have their input encoding set to `latin1`.
++Per default all lexers have their input encoding set to `utf-8`.
+ If you pass a lexer a string object (not unicode), it tries to decode the data
+ using this encoding.
+ You can override the encoding using the `encoding` lexer option. If you have the
+Index: Pygments-2.0rc1/pygments/formatters/img.py
+===================================================================
+--- Pygments-2.0rc1.orig/pygments/formatters/img.py
++++ Pygments-2.0rc1/pygments/formatters/img.py
+@@ -295,7 +295,7 @@ class ImageFormatter(Formatter):
+             raise PilNotAvailable(
+                 'Python Imaging Library is required for this formatter')
+         Formatter.__init__(self, **options)
+-        self.encoding = 'latin1'  # let pygments.format() do the right thing
++        self.encoding = 'utf-8'  # let pygments.format() do the right thing
+         # Read the style
+         self.styles = dict(self.style)
+         if self.style.background_color is None:

Modified: packages/pygments/trunk/debian/patches/series
===================================================================
--- packages/pygments/trunk/debian/patches/series	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/patches/series	2014-10-19 21:56:51 UTC (rev 31155)
@@ -1 +1,2 @@
 make_utf8_default.patch
+change_docs_theme.patch

Added: packages/pygments/trunk/debian/python-pygments-doc.dirs
===================================================================
--- packages/pygments/trunk/debian/python-pygments-doc.dirs	                        (rev 0)
+++ packages/pygments/trunk/debian/python-pygments-doc.dirs	2014-10-19 21:56:51 UTC (rev 31155)
@@ -0,0 +1 @@
+/usr/share/doc/python-pygments/

Added: packages/pygments/trunk/debian/python-pygments-doc.docs
===================================================================
--- packages/pygments/trunk/debian/python-pygments-doc.docs	                        (rev 0)
+++ packages/pygments/trunk/debian/python-pygments-doc.docs	2014-10-19 21:56:51 UTC (rev 31155)
@@ -0,0 +1,2 @@
+AUTHORS
+TODO

Added: packages/pygments/trunk/debian/python-pygments-doc.examples
===================================================================
--- packages/pygments/trunk/debian/python-pygments-doc.examples	                        (rev 0)
+++ packages/pygments/trunk/debian/python-pygments-doc.examples	2014-10-19 21:56:51 UTC (rev 31155)
@@ -0,0 +1 @@
+external/*py

Added: packages/pygments/trunk/debian/python-pygments-doc.install
===================================================================
--- packages/pygments/trunk/debian/python-pygments-doc.install	                        (rev 0)
+++ packages/pygments/trunk/debian/python-pygments-doc.install	2014-10-19 21:56:51 UTC (rev 31155)
@@ -0,0 +1 @@
+doc/_build/html/ /usr/share/doc/python-pygments-doc/

Added: packages/pygments/trunk/debian/python-pygments-doc.links
===================================================================
--- packages/pygments/trunk/debian/python-pygments-doc.links	                        (rev 0)
+++ packages/pygments/trunk/debian/python-pygments-doc.links	2014-10-19 21:56:51 UTC (rev 31155)
@@ -0,0 +1,2 @@
+/usr/share/doc/python-pygments-doc/html/		/usr/share/doc/python-pygments/html
+/usr/share/doc/python-pygments-doc/html/_sources/	/usr/share/doc/python-pygments/rst

Modified: packages/pygments/trunk/debian/rules
===================================================================
--- packages/pygments/trunk/debian/rules	2014-10-19 21:47:54 UTC (rev 31154)
+++ packages/pygments/trunk/debian/rules	2014-10-19 21:56:51 UTC (rev 31155)
@@ -8,7 +8,7 @@
 clean:
 	dh_testdir
 	dh_testroot
-	rm -rf build Pygments.egg-info
+	rm -rf build Pygments.egg-info doc/_build
 	find . -name "*\.py[co]" -delete
 	dh_clean build-indep install-stamp $(PYVERS:%=install-python%-stamp)
 
@@ -19,7 +19,7 @@
 build-indep:
 	dh_testdir
 	dh_installdirs
-	PYTHONPATH='.' python docs/generate.py html debian/python-pygments/usr/share/doc/python-pygments/
+	PYTHONPATH=$(CURDIR):$(CURDIR)/doc make -C doc html
 	touch $@
 
 install: build install-stamp $(PYVERS:%=install-python%-stamp)
@@ -40,9 +40,11 @@
 	dh_installchangelogs -i CHANGES
 	dh_installexamples -i
 	dh_installdocs -i
+	dh_link -i
 	dh_installman -i
 	dh_install -i -p python-pygments pygmentize /usr/bin/
 	rm -rf debian/python3-pygments/usr/bin/
+	dh_sphinxdoc -i -p python-pygments-doc
 	dh_python2 -i
 	dh_python3 -i
 	dh_compress -i -X.py -X.inv
@@ -50,7 +52,7 @@
 	dh_installdeb -i
 	dh_gencontrol -i
 	dh_md5sums -i
-	dh_builddeb -i -- -Z bzip2
+	dh_builddeb -i
 
 binary-arch:
 
@@ -60,8 +62,8 @@
 	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p');\
 	uscan --force-download --rename --download-version=$$VER --destdir=.;\
 	tar -zx --exclude=tests/examplefiles --exclude=test/test_examplefiles.py -f pygments_$$VER.orig.tar.gz;\
-	tar	-zcf ./pygments_$$VER+dfsg.orig.tar.gz Pygments-$$VER;\
+	tar	-zcf ./pygments_$$VER+dfsg.orig.tar.gz Pygments-*;\
 	rm -f ./pygments_$$VER.orig.tar.gz;\
-	rm -rf Pygments-$$VER
+	rm -rf Pygments-*
 
 .PHONY: build clean binary-indep binary-arch binary install




More information about the Python-modules-commits mailing list