debian/0000775000000000000000000000000012303373114007165 5ustar debian/watch0000664000000000000000000000023212103554725010222 0ustar version=3 opts=dversionmangle=s/\+dfsg//,uversionmangle=s/(beta|rc|a|b|c)/~$1/ \ http://pypi.python.org/packages/source/P/Pygments/Pygments-(.*)\.tar\.gz debian/README.source0000664000000000000000000000015111526565205011353 0ustar This package uses the patch management system quilt as documented in /usr/share/doc/quilt/README.source. debian/source/0000775000000000000000000000000011727146537010505 5ustar debian/source/format0000664000000000000000000000001411526565204011704 0ustar 3.0 (quilt) debian/rules0000775000000000000000000000336212051002565010250 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 PYVERS ?= $(shell pyversions -vr) $(shell py3versions -vr) pkgdir = $(CURDIR)/debian/python$(if $(patsubst 3.%,,$(1)),,3)-pygments clean: dh_testdir dh_testroot rm -rf build Pygments.egg-info find . -name "*\.py[co]" -delete dh_clean build-indep install-stamp $(PYVERS:%=install-python%-stamp) build: build-indep build-arch: build-indep: dh_testdir dh_installdirs PYTHONPATH='.' python docs/generate.py html debian/python-pygments/usr/share/doc/python-pygments/ touch $@ install: build install-stamp $(PYVERS:%=install-python%-stamp) install-stamp: dh_installdirs install -m 644 external/pygments.bashcomp debian/python-pygments/etc/bash_completion.d/pygmentize touch $@ install-python%-stamp: python$* setup.py install --single-version-externally-managed \ --root $(call pkgdir,$*) --install-layout=deb touch $@ binary-indep: build install dh_testdir dh_testroot dh_installchangelogs -i CHANGES dh_installexamples -i dh_installdocs -i dh_installman -i dh_install -i -p python-pygments pygmentize /usr/bin/ rm -rf debian/python3-pygments/usr/bin/ dh_python2 -i dh_python3 -i dh_compress -i -X.py -X.inv dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i -- -Z bzip2 binary-arch: binary: binary-indep binary-arch get-orig-source: 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;\ rm -f ./pygments_$$VER.orig.tar.gz;\ rm -rf Pygments-$$VER .PHONY: build clean binary-indep binary-arch binary install debian/tests/0000775000000000000000000000000012303373103010325 5ustar debian/tests/control0000664000000000000000000000021412303373101011723 0ustar Tests: python-pygments Depends: python-pygments, python-nose, patch Tests: python3-pygments Depends: python3-pygments, python3-nose, patch debian/tests/python3-pygments0000775000000000000000000000034712051002565013530 0ustar #!/bin/sh set -eu cp -r tests "$ADTTMP" cat debian/patches/disable_example_files_test.patch | (cd "$ADTTMP/tests" && patch -p2) cd "$ADTTMP/tests" for python in $(py3versions -i); do PYTHONWARNINGS=d $python ./run.py 2>&1 done debian/tests/python-pygments0000775000000000000000000000034612051002565013444 0ustar #!/bin/sh set -eu cp -r tests "$ADTTMP" cat debian/patches/disable_example_files_test.patch | (cd "$ADTTMP/tests" && patch -p2) cd "$ADTTMP/tests" for python in $(pyversions -i); do PYTHONWARNINGS=d $python ./run.py 2>&1 done debian/dirs0000664000000000000000000000006611526565205010065 0ustar /usr/share/doc/python-pygments /etc/bash_completion.d debian/control0000664000000000000000000000425412303373120010572 0ustar Source: pygments Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Piotr Ożarowski Uploaders: Debian Python Modules Team 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 Homepage: http://pygments.org/ Vcs-Svn: svn://svn.debian.org/python-modules/packages/pygments/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pygments/trunk/ X-Python-Version: >= 2.4 XS-Testsuite: autopkgtest Package: python-pygments Architecture: all Depends: ${python:Depends}, ${misc:Depends} Recommends: python-chardet, python-pkg-resources Suggests: ttf-bitstream-vera Description: syntax highlighting package written in Python Pygments aims to be a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. . Highlights are: * a wide range of common languages and markup formats is supported * special attention is paid to details, increasing quality by a fair amount * 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: python3-pygments Architecture: all Depends: ${python3:Depends}, ${misc:Depends} Recommends: python3-pkg-resources Suggests: ttf-bitstream-vera Description: syntax highlighting package written in Python 3 Pygments aims to be a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. . Highlights are: * a wide range of common languages and markup formats is supported * special attention is paid to details, increasing quality by a fair amount * 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 debian/patches/0000775000000000000000000000000012103554206010615 5ustar debian/patches/series0000664000000000000000000000003012103554250012022 0ustar make_utf8_default.patch debian/patches/disable_example_files_test.patch0000664000000000000000000000073612051002565017201 0ustar === modified file 'tests/test_examplefiles.py' --- a/tests/test_examplefiles.py 2012-03-11 18:22:42 +0000 +++ b/tests/test_examplefiles.py 2012-11-12 07:18:38 +0000 @@ -8,6 +8,7 @@ """ import os +import nose import pprint import difflib import cPickle as pickle @@ -19,6 +20,7 @@ STORE_OUTPUT = False # generate methods +@nose.SkipTest def test_example_files(): testdir = os.path.dirname(__file__) outdir = os.path.join(testdir, 'examplefiles', 'output') debian/patches/make_utf8_default.patch0000664000000000000000000001117112103554063015227 0ustar use UTF-8 by default `echo "Ożarowski" | pygmentize -l diff` works fine now :-) 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.6+dfsg/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): 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-1.6+dfsg/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): ``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): 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.filters = [] for filter_ in get_list_opt(options, 'filters', ()): Index: pygments-1.6+dfsg/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 if sys.version_info > (3,) and isinstance(code, bytes): # decode it, since all analyse_text functions expect unicode - code = code.decode('latin1') + code = code.decode('utf-8') def get_rating(info): cls, filename = info Index: pygments-1.6+dfsg/pygments/formatters/other.py =================================================================== --- pygments-1.6+dfsg.orig/pygments/formatters/other.py +++ pygments-1.6+dfsg/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') - 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 =================================================================== --- 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() - # 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 debian/compat0000664000000000000000000000000211526565205010375 0ustar 5 debian/examples0000664000000000000000000000001511526565205010734 0ustar external/*py debian/changelog0000664000000000000000000001722512303373114011046 0ustar pygments (1.6+dfsg-1ubuntu1) trusty; urgency=medium * Add missing "patch" test dependency. -- Martin Pitt Wed, 26 Feb 2014 15:12:20 +0100 pygments (1.6+dfsg-1build1) trusty; urgency=medium * Rebuild to drop files installed into /usr/share/pyshared. -- Matthias Klose Sun, 23 Feb 2014 13:50:15 +0000 pygments (1.6+dfsg-1) experimental; urgency=low * New upstream release * fix_makefile_re.patch removed, no longer needed * debian/watch file updated to handle rc versions correctly -- Piotr Ożarowski Sun, 03 Feb 2013 22:32:34 +0100 pygments (1.5+dfsg-2) unstable; urgency=low [ Dmitry Shachnev ] * Add DEP-8 tests (closes: #693028). * Remove unneeded build-dependency on quilt. * Bump Standards-Version to 3.9.4. + Add empty build-arch target to debian/rules. * Drop Breaks: {python:Breaks}, it is obsolete. * debian/patches/fix_makefile_re.patch: cherry-picked upstream commit that fixes Makefile highlighting. -- Piotr Ożarowski Sun, 06 Jan 2013 14:38:26 +0100 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; 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 Sun, 11 Mar 2012 18:22:42 +0100 pygments (1.4+dfsg-1) unstable; urgency=low * New upstream release * Provide python3-pygments binary package * Convert from python-support to dh_python2 * Source package format changed to 3.0 (quilt) * Standards-Version bumped to 3.9.1 (no changes needed) -- Piotr Ożarowski Tue, 04 Jan 2011 20:13:50 +0100 pygments (1.3.1+dfsg-1) unstable; urgency=low * New upstream release * Add ttf-bitstream-vera package to Suggests ("img" formatter needs it) * Homepage field updated -- Piotr Ożarowski Sat, 20 Mar 2010 20:43:06 +0100 pygments (1.3+dfsg-1) unstable; urgency=low * New upstream release - install Bash completion script for pygmentize * Standards-Version bumped to 3.8.4 (no changes needed) -- Piotr Ożarowski Tue, 02 Mar 2010 20:06:16 +0100 pygments (1.2.2+dfsg-1) unstable; urgency=low * New upstream release -- Piotr Ożarowski Sun, 03 Jan 2010 00:50:59 +0100 pygments (1.2.1+dfsg-1) unstable; urgency=low * New upstream release - minimum required Python version bumped to 2.4 -- Piotr Ożarowski Sat, 02 Jan 2010 21:40:38 +0100 pygments (1.1.1+dfsg-2) unstable; urgency=low * Add --prefix=/usr (Python >= 2.6 needs it) -- Piotr Ożarowski Fri, 13 Nov 2009 23:04:50 +0100 pygments (1.1.1+dfsg-1) unstable; urgency=low * New upstream release - upstream tarball repackaged: tests/examplefiles removed (at least one of example files is not DFSG-free and I'm too lazy to review the rest as most of them have different copyright holder and license), get-orig-source target added, debian/watch file updated * use_jinja2_to_generate_docs patch removed (incorporated upstream) * disable_ez_setup.patch no longer needed * make_utf8_default.patch updated * debian/copyright file updated * Standards-Version bumped to 3.8.3 (no changes needed) -- Piotr Ożarowski Sun, 13 Sep 2009 10:13:17 +0200 pygments (1.0-3) unstable; urgency=low * Add use_jinja2_to_generate_docs patch and replace python-jinja with python-jinja2 build dependency * Standards-Version bumped to 3.8.2 (no changes needed) -- Piotr Ożarowski Thu, 09 Jul 2009 22:30:15 +0200 pygments (1.0-2) unstable; urgency=low * Add description to the patches * Remove brainf*ck from long description (LP: #302898) * Upload to unstable -- Piotr Ożarowski Tue, 10 Feb 2009 19:14:36 +0100 pygments (1.0-1) experimental; urgency=low [ Sandro Tosi ] * Switch Vcs-Browser field to viewsvn [ Piotr Ożarowski ] * New upstream release (upload to experimental due to Lenny freeze, to ease testing rev. dependencies) * Install scripts from external directory as examples (closes: #497532) * debian/copyright: list of copyright holders updated -- Piotr Ożarowski Sun, 23 Nov 2008 20:14:31 +0100 pygments (0.11.1-1) experimental; urgency=low * New upstream release (upload to experimental due to Lenny freeze, to ease testing rev. dependencies) * Standards-Version bumped to 3.8.0: + debian/README.source file added -- Piotr Ożarowski Sun, 31 Aug 2008 16:48:09 +0200 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 Wed, 07 May 2008 20:38:26 +0200 pygments (0.9-3) unstable; urgency=low [ Sandro Tosi ] * debian/control - uniforming Vcs-Browser field [ Piotr Ożarowski ] * Switch to python-support * Replace python-setuptools runtime dependency with new python-pkg-resources (closes: 468710) * Compress binary package with bzip2 * Strip the "-1" from quilt's and setuptools' required build versions -- Piotr Ożarowski Sat, 01 Mar 2008 13:37:39 +0100 pygments (0.9-2) unstable; urgency=low * Install original pygmentize script (not touched by setuptools) (closes: 455222) * Bump Standards-Version to 3.7.3 (no changes needed) -- Piotr Ożarowski Mon, 10 Dec 2007 19:59:55 +0100 pygments (0.9-1) unstable; urgency=low * New upstream release * Add patch that disables ez_setup at build time - quilt added to Build-Depends * Homepage field added * Rename XS-Vcs-* fields to Vcs-* (dpkg supports them now) -- Piotr Ożarowski Mon, 15 Oct 2007 22:37:08 +0200 pygments (0.8.1-1) unstable; urgency=low * New upstream release -- Piotr Ożarowski Thu, 28 Jun 2007 15:08:22 +0200 pygments (0.8-1) unstable; urgency=low * New upstream release * Bump required Jinja version (build dependency) * Added python-setuptools to Recommends -- Piotr Ożarowski Wed, 30 May 2007 19:33:29 +0200 pygments (0.7.1-2) unstable; urgency=low * Upload to unstable * debian/copyright file updated * Changed my address to piotr@debian.org -- Piotr Ożarowski Mon, 09 Apr 2007 20:18:54 +0200 pygments (0.7.1-1) experimental; urgency=low * New upstream release (upload to experimental due to Etch freeze) -- Piotr Ozarowski Thu, 15 Feb 2007 21:17:10 +0100 pygments (0.7-1) experimental; urgency=low * New upstream release (upload to experimental due to Etch freeze) * Some debian/rules cleanups -- Piotr Ozarowski Wed, 14 Feb 2007 21:52:50 +0100 pygments (0.6-1) experimental; urgency=low * New upstream release (upload to experimental due to Etch freeze) * Added XS-Vcs-Svn and XS-Vcs-Browser fields to debian/control * Added python-chardet to Recommends: (guessing input encoding added) * debian/copyright updated (license change to BSD) * Removed debian/pygmentize.1 manpage (it's in upstream sources now) -- Piotr Ozarowski Thu, 21 Dec 2006 16:20:10 +0100 pygments (0.5.1-1) unstable; urgency=low * Initial release (closes: #395064) -- Piotr Ozarowski Mon, 30 Oct 2006 17:19:10 +0100 debian/copyright0000664000000000000000000000353411526565205011137 0ustar This package was debianized by Piotr Ożarowski on Tue, 24 Oct 2006 17:54:36 +0200. It was downloaded from http://pygments.pocoo.org/download/ Upstream Author: Georg Brandl Copyright: 2006-2009 by the Pygments team, see AUTHORS License: Copyright (c) 2006-2009 by the respective authors (see AUTHORS file). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. File with different copyright holders: scripts/vim2pygments.py: 2006 by Armin Ronacher. The Debian packaging is © 2006-2009, Piotr Ożarowski and is licensed under the same licence as Pygments. debian/manpages0000664000000000000000000000002211526565205010707 0ustar docs/pygmentize.1 debian/docs0000664000000000000000000000001511526565205010046 0ustar AUTHORS TODO