diff options
author | Rob Cakebread <pythonhead@gentoo.org> | 2007-04-14 17:54:00 +0000 |
---|---|---|
committer | Rob Cakebread <pythonhead@gentoo.org> | 2007-04-14 17:54:00 +0000 |
commit | 1ef3826575f093a177c4e685ac8b023efec38bdd (patch) | |
tree | 9494f403e872e039adceba45796c583fa0287d98 /dev-python/pygments | |
parent | Add built_with_use check thanks to Johannes Hirte <johannes-hirte@web.de> in ... (diff) | |
download | historical-1ef3826575f093a177c4e685ac8b023efec38bdd.tar.gz historical-1ef3826575f093a177c4e685ac8b023efec38bdd.tar.bz2 historical-1ef3826575f093a177c4e685ac8b023efec38bdd.zip |
Initial commit.
Package-Manager: portage-2.1.2.3
Diffstat (limited to 'dev-python/pygments')
-rw-r--r-- | dev-python/pygments/ChangeLog | 13 | ||||
-rw-r--r-- | dev-python/pygments/Manifest | 38 | ||||
-rw-r--r-- | dev-python/pygments/files/digest-pygments-0.7.1 | 3 | ||||
-rw-r--r-- | dev-python/pygments/files/pygments-0.7.1-_mapping.py-ebuild.patch | 11 | ||||
-rw-r--r-- | dev-python/pygments/files/pygments-0.7.1-html_formatter.patch | 86 | ||||
-rw-r--r-- | dev-python/pygments/files/pygments-0.7.1-other.py-ebuild.patch | 11 | ||||
-rw-r--r-- | dev-python/pygments/metadata.xml | 6 | ||||
-rw-r--r-- | dev-python/pygments/pygments-0.7.1.ebuild | 41 |
8 files changed, 209 insertions, 0 deletions
diff --git a/dev-python/pygments/ChangeLog b/dev-python/pygments/ChangeLog new file mode 100644 index 000000000000..928370e26c62 --- /dev/null +++ b/dev-python/pygments/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for dev-python/pygments +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pygments/ChangeLog,v 1.1 2007/04/14 17:54:00 pythonhead Exp $ + +*pygments-0.7.1 (14 Apr 2007) + + 14 Apr 2007; Rob Cakebread <pythonhead@gentoo.org> + +files/pygments-0.7.1-_mapping.py-ebuild.patch, + +files/pygments-0.7.1-html_formatter.patch, + +files/pygments-0.7.1-other.py-ebuild.patch, +metadata.xml, + +pygments-0.7.1.ebuild: + Initial commit. Thanks Georg Brandl <g.brandl@gmx.net> bug #167115 + diff --git a/dev-python/pygments/Manifest b/dev-python/pygments/Manifest new file mode 100644 index 000000000000..6512317944f9 --- /dev/null +++ b/dev-python/pygments/Manifest @@ -0,0 +1,38 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX pygments-0.7.1-_mapping.py-ebuild.patch 1043 RMD160 684881215c8be4af0b9568d4459105b56cc16f6d SHA1 7865e6fe854169ee588549e936b3d583102a6256 SHA256 d223874c43fb62171908a1a222328ac688357b760567e3739cc4fa31995ead5f +MD5 f4c1df65543ec79c9b9506a5d8a8b00b files/pygments-0.7.1-_mapping.py-ebuild.patch 1043 +RMD160 684881215c8be4af0b9568d4459105b56cc16f6d files/pygments-0.7.1-_mapping.py-ebuild.patch 1043 +SHA256 d223874c43fb62171908a1a222328ac688357b760567e3739cc4fa31995ead5f files/pygments-0.7.1-_mapping.py-ebuild.patch 1043 +AUX pygments-0.7.1-html_formatter.patch 3196 RMD160 4e5e43356a457e58f49085ac26af8aeb3f571d1a SHA1 1775516adf17d8fcead0de9bb2248f0abf881b88 SHA256 14bad70101fc4c225a2626a0459a3929d447d9033e32e37895baff0572da2ff9 +MD5 37a210e6df740c2edbab2b9fe2e59148 files/pygments-0.7.1-html_formatter.patch 3196 +RMD160 4e5e43356a457e58f49085ac26af8aeb3f571d1a files/pygments-0.7.1-html_formatter.patch 3196 +SHA256 14bad70101fc4c225a2626a0459a3929d447d9033e32e37895baff0572da2ff9 files/pygments-0.7.1-html_formatter.patch 3196 +AUX pygments-0.7.1-other.py-ebuild.patch 350 RMD160 967b38bf2b6969cd9bf311f0542b97fa07dfff93 SHA1 68bd75593271e46b28bd961ee0bdb59d03f615df SHA256 a81336c004cc000b247f88836fe9e8cfdcb056269ca1e3c729b0b57ce93121ad +MD5 010c3d12aab4183773a9ce3076561883 files/pygments-0.7.1-other.py-ebuild.patch 350 +RMD160 967b38bf2b6969cd9bf311f0542b97fa07dfff93 files/pygments-0.7.1-other.py-ebuild.patch 350 +SHA256 a81336c004cc000b247f88836fe9e8cfdcb056269ca1e3c729b0b57ce93121ad files/pygments-0.7.1-other.py-ebuild.patch 350 +DIST Pygments-0.7.1.tar.gz 664696 RMD160 5bf587c4496ff5330d16e1c73265d653b6ddf9b5 SHA1 740de095ce71d1b36a72b2df98207a22ead57690 SHA256 932866bde0019c370c36232d877c223a5f1d275c3161806552cb123d6f5d3638 +EBUILD pygments-0.7.1.ebuild 1228 RMD160 739d9d3e0e41d15c9863f3a7353b78dd5429c2c1 SHA1 7597a13a37a81389bbb1b86b79dccbefd629fb2a SHA256 57ad336985fb769cc95a1a451e10d68d03ee9ba2ed0c09a2dac8a8527597f42b +MD5 1e5748ab09574caab9277de20276a710 pygments-0.7.1.ebuild 1228 +RMD160 739d9d3e0e41d15c9863f3a7353b78dd5429c2c1 pygments-0.7.1.ebuild 1228 +SHA256 57ad336985fb769cc95a1a451e10d68d03ee9ba2ed0c09a2dac8a8527597f42b pygments-0.7.1.ebuild 1228 +MISC ChangeLog 553 RMD160 57c55c891ab78a8241b2b001a34cff44f2edd9f8 SHA1 d507bd896c48e3a4d600a528b3437b1fd70ccfa2 SHA256 5f6fa4ae629b4e85f4e52fa4eb451349b8124747069b7d72fab691fac8bdc70f +MD5 95762aa110e37a2475d717e6c87aada5 ChangeLog 553 +RMD160 57c55c891ab78a8241b2b001a34cff44f2edd9f8 ChangeLog 553 +SHA256 5f6fa4ae629b4e85f4e52fa4eb451349b8124747069b7d72fab691fac8bdc70f ChangeLog 553 +MISC metadata.xml 324 RMD160 e99bd87525fcbccf3a5b10eae160832ae26a013c SHA1 330d20ed94f6607bb7293f935789dcf3f1151cc7 SHA256 83404c337ddbe4445d64859a64e352d02b7e3fd9929e4a265c06880d7938da3e +MD5 8c5b007ef421db1269be4805edab4240 metadata.xml 324 +RMD160 e99bd87525fcbccf3a5b10eae160832ae26a013c metadata.xml 324 +SHA256 83404c337ddbe4445d64859a64e352d02b7e3fd9929e4a265c06880d7938da3e metadata.xml 324 +MD5 79d62f4dcc90b31eac8cc4a8ed996054 files/digest-pygments-0.7.1 244 +RMD160 6f7fda0f129385cdd4ddbb61861a479f0addd7f4 files/digest-pygments-0.7.1 244 +SHA256 8f19e938f346b5b99fd1dc5fff933e7548c593edb0d24db8e37d925277c13dda files/digest-pygments-0.7.1 244 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.3 (GNU/Linux) + +iD8DBQFGIRVL96cFzIajWwkRAn1CAKCQi8E+s+NbaZlhLn1EdcsBtk1/MgCePc1G +of1P6y/mZtAMDRUMWkuWsFg= +=5Aur +-----END PGP SIGNATURE----- diff --git a/dev-python/pygments/files/digest-pygments-0.7.1 b/dev-python/pygments/files/digest-pygments-0.7.1 new file mode 100644 index 000000000000..43b4d28f17fb --- /dev/null +++ b/dev-python/pygments/files/digest-pygments-0.7.1 @@ -0,0 +1,3 @@ +MD5 8b5b50fb53ce39f94dbcf7040c0a441a Pygments-0.7.1.tar.gz 664696 +RMD160 5bf587c4496ff5330d16e1c73265d653b6ddf9b5 Pygments-0.7.1.tar.gz 664696 +SHA256 932866bde0019c370c36232d877c223a5f1d275c3161806552cb123d6f5d3638 Pygments-0.7.1.tar.gz 664696 diff --git a/dev-python/pygments/files/pygments-0.7.1-_mapping.py-ebuild.patch b/dev-python/pygments/files/pygments-0.7.1-_mapping.py-ebuild.patch new file mode 100644 index 000000000000..0b4a7d5e0fc6 --- /dev/null +++ b/dev-python/pygments/files/pygments-0.7.1-_mapping.py-ebuild.patch @@ -0,0 +1,11 @@ +--- pygments/lexers/_mapping.py.orig 2007-04-14 10:37:23.000000000 -0700 ++++ pygments/lexers/_mapping.py 2007-04-14 10:38:18.000000000 -0700 +@@ -16,7 +16,7 @@ + LEXERS = { + 'ApacheConfLexer': ('pygments.lexers.text', 'ApacheConf', ('apacheconf', 'aconf', 'apache'), ('.htaccess', 'apache.conf', 'apache2.conf'), ('text/x-apacheconf',)), + 'BBCodeLexer': ('pygments.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)), +- 'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh'), ('*.sh',), ('application/x-sh', 'application/x-shellscript')), ++ 'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh', 'ebuild'), ('*.sh','*.ebuild',), ('application/x-sh', 'application/x-shellscript')), + 'BatchLexer': ('pygments.lexers.other', 'Batchfile', ('bat',), ('*.bat', '*.cmd'), ('application/x-dos-batch',)), + 'BefungeLexer': ('pygments.lexers.other', 'Befunge', ('befunge',), ('*.befunge',), ('application/x-befunge',)), + 'BooLexer': ('pygments.lexers.dotnet', 'Boo', ('boo',), ('*.boo',), ('text/x-boo',)), diff --git a/dev-python/pygments/files/pygments-0.7.1-html_formatter.patch b/dev-python/pygments/files/pygments-0.7.1-html_formatter.patch new file mode 100644 index 000000000000..8ddb6e8610c6 --- /dev/null +++ b/dev-python/pygments/files/pygments-0.7.1-html_formatter.patch @@ -0,0 +1,86 @@ +Index: /pygments/trunk/tests/test_html_formatter.py
+===================================================================
+--- tests/test_html_formatter.py (revision 2849)
++++ tests/test_html_formatter.py (revision 2850)
+@@ -94,2 +94,16 @@
+
+ os.unlink(pathname)
++
++ def test_get_style_defs(self):
++ fmt = HtmlFormatter()
++ sd = fmt.get_style_defs()
++ self.assert_(sd.startswith('.'))
++
++ fmt = HtmlFormatter(cssclass='foo')
++ sd = fmt.get_style_defs()
++ self.assert_(sd.startswith('.foo'))
++ sd = fmt.get_style_defs('.bar')
++ self.assert_(sd.startswith('.bar'))
++ sd = fmt.get_style_defs(['.bar', '.baz'])
++ fl = sd.splitlines()[0]
++ self.assert_('.bar' in fl and '.baz' in fl)
+Index: /pygments/trunk/pygments/formatters/html.py
+===================================================================
+--- pygments/formatters/html.py (revision 2839)
++++ pygments/formatters/html.py (revision 2850)
+@@ -182,4 +182,6 @@
+ `cssclass`
+ CSS class for the wrapping ``<div>`` tag (default: ``'highlight'``).
++ If you set this option, the default selector for `get_style_defs()`
++ will be this class.
+
+ `cssstyles`
+@@ -314,10 +316,12 @@
+ c2s[name] = (style[:-2], ttype, len(ttype))
+
+- def get_style_defs(self, arg=''):
+- """
+- Return CSS style definitions for the classes produced by the
+- current highlighting style. ``arg`` can be a string of selectors
+- to insert before the token type classes.
+- """
++ def get_style_defs(self, arg=None):
++ """
++ Return CSS style definitions for the classes produced by the current
++ highlighting style. ``arg`` can be a string or list of selectors to
++ insert before the token type classes.
++ """
++ if arg is None:
++ arg = ('cssclass' in self.options and '.'+self.cssclass or '')
+ if isinstance(arg, basestring):
+ args = [arg]
+@@ -326,7 +330,9 @@
+
+ def prefix(cls):
++ if cls:
++ cls = '.' + cls
+ tmp = []
+ for arg in args:
+- tmp.append((arg and arg + ' ' or '') + '.' + cls)
++ tmp.append((arg and arg + ' ' or '') + cls)
+ return ', '.join(tmp)
+
+@@ -343,5 +349,5 @@
+ text_style = ' ' + self.class2style[self.ttype2class[Text]][0]
+ lines.insert(0, '%s { background: %s;%s }' %
+- (arg, self.style.background_color, text_style))
++ (prefix(''), self.style.background_color, text_style))
+ return '\n'.join(lines)
+
+Index: /pygments/trunk/CHANGES
+===================================================================
+--- CHANGES (revision 2844)
++++ CHANGES (revision 2850)
+@@ -1,4 +1,12 @@
+ Pygments changelog
+ ==================
++
++Version 0.8
++-----------
++(codename to be selected, released Apr XX, 2007)
++
++- The `get_style_defs` method of HTML formatters now uses the `cssclass`
++ option as the default selector if it was given.
++
+
+ Version 0.7.1
diff --git a/dev-python/pygments/files/pygments-0.7.1-other.py-ebuild.patch b/dev-python/pygments/files/pygments-0.7.1-other.py-ebuild.patch new file mode 100644 index 000000000000..e988a11577c6 --- /dev/null +++ b/dev-python/pygments/files/pygments-0.7.1-other.py-ebuild.patch @@ -0,0 +1,11 @@ +--- pygments/lexers/other.py.orig 2007-04-14 10:37:15.000000000 -0700 ++++ pygments/lexers/other.py 2007-04-14 10:37:46.000000000 -0700 +@@ -205,7 +205,7 @@ + """ + + name = 'Bash' +- aliases = ['bash', 'sh'] ++ aliases = ['bash', 'sh', 'ebuild'] + filenames = ['*.sh'] + mimetypes = ['application/x-sh', 'application/x-shellscript'] + diff --git a/dev-python/pygments/metadata.xml b/dev-python/pygments/metadata.xml new file mode 100644 index 000000000000..30765bad9cd1 --- /dev/null +++ b/dev-python/pygments/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <longdescription>Pygments is a syntax highlighting package written in Python. Pygments can output to html, bbcode, latex, rtf and other formats.</longdescription> +</pkgmetadata> diff --git a/dev-python/pygments/pygments-0.7.1.ebuild b/dev-python/pygments/pygments-0.7.1.ebuild new file mode 100644 index 000000000000..e30d775bcfe1 --- /dev/null +++ b/dev-python/pygments/pygments-0.7.1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pygments/pygments-0.7.1.ebuild,v 1.1 2007/04/14 17:54:00 pythonhead Exp $ + +inherit eutils distutils + +MY_PN="Pygments" +MY_P="${MY_PN}-${PV}" +NEED_PYTHON=2.3 + +DESCRIPTION="Pygments is a syntax highlighting package written in Python." +HOMEPAGE="http://pygments.org/" +SRC_URI="http://cheeseshop.python.org/packages/source/P/${MY_PN}/${MY_P}.tar.gz" +LICENSE="BSD" +KEYWORDS="~x86" +SLOT="0" +IUSE="doc" +S=${WORKDIR}/${MY_P} +PYTHON_MODNAME="pygments" +DOCS="CHANGES" + +src_unpack() { + unpack ${A} + cd ${S} + #Patch from upstream trunk, can be removed in 0.8 bump + epatch ${FILESDIR}/${P}-html_formatter.patch || die "Patch failed" + #Gentoo patches to make lexer recognize ebuilds as bash input + epatch ${FILESDIR}/${P}-other.py-ebuild.patch || die "Patch failed" + epatch ${FILESDIR}/${P}-_mapping.py-ebuild.patch || die "Patch failed" +} + +src_install(){ + distutils_src_install + use doc && dohtml -r docs/build/. +} + +src_test() { + #Doesn't play nicely in portage sandbox, check if fixed in 0.8 + rm tests/test_html_formatter.py + PYTHONPATH=. "${python}" tests/run.py || die "tests failed" +} |