summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Cakebread <pythonhead@gentoo.org>2007-04-14 17:54:00 +0000
committerRob Cakebread <pythonhead@gentoo.org>2007-04-14 17:54:00 +0000
commitbff321ab8513952eaaf2a2ba309d396b34d5c60a (patch)
tree175528ace5967a526649d8533fef3b99a96e299d /dev-python
parentAdd built_with_use check thanks to Johannes Hirte <johannes-hirte@web.de> in ... (diff)
downloadgentoo-2-bff321ab8513952eaaf2a2ba309d396b34d5c60a.tar.gz
gentoo-2-bff321ab8513952eaaf2a2ba309d396b34d5c60a.tar.bz2
gentoo-2-bff321ab8513952eaaf2a2ba309d396b34d5c60a.zip
Initial commit.
(Portage version: 2.1.2.3)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pygments/ChangeLog13
-rw-r--r--dev-python/pygments/Manifest28
-rw-r--r--dev-python/pygments/files/digest-pygments-0.7.13
-rw-r--r--dev-python/pygments/files/pygments-0.7.1-_mapping.py-ebuild.patch11
-rw-r--r--dev-python/pygments/files/pygments-0.7.1-html_formatter.patch86
-rw-r--r--dev-python/pygments/files/pygments-0.7.1-other.py-ebuild.patch11
-rw-r--r--dev-python/pygments/metadata.xml6
-rw-r--r--dev-python/pygments/pygments-0.7.1.ebuild41
8 files changed, 199 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..89b4e2b73d38
--- /dev/null
+++ b/dev-python/pygments/Manifest
@@ -0,0 +1,28 @@
+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 1121 RMD160 c6c40f7631d3c13b817ad856add34f1922e2e539 SHA1 fcd44181495578f541203ce27c3f3710a095c5c5 SHA256 ac984590571b69ccf3908e33aa3d45bd3456751510052f580515857bc5ca99f6
+MD5 2cad867e9fd0f2db2595a3a01ddcc19b pygments-0.7.1.ebuild 1121
+RMD160 c6c40f7631d3c13b817ad856add34f1922e2e539 pygments-0.7.1.ebuild 1121
+SHA256 ac984590571b69ccf3908e33aa3d45bd3456751510052f580515857bc5ca99f6 pygments-0.7.1.ebuild 1121
+MISC ChangeLog 458 RMD160 d37561a1d1745c83c1e318029e0ae7a2c70020c5 SHA1 1b1dd4bdfc43bdbe3e5082ac3eed477398c31ee9 SHA256 d00a86cabc60723ab0501b22a44722d6cd559ee3813524bcf37f290d62e3200c
+MD5 bf77534456a03c5e70be82d8bbf7636c ChangeLog 458
+RMD160 d37561a1d1745c83c1e318029e0ae7a2c70020c5 ChangeLog 458
+SHA256 d00a86cabc60723ab0501b22a44722d6cd559ee3813524bcf37f290d62e3200c ChangeLog 458
+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
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"
+}