diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/htmlgen | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/htmlgen')
-rw-r--r-- | dev-python/htmlgen/Manifest | 1 | ||||
-rw-r--r-- | dev-python/htmlgen/files/htmlgen-2.2.2-python-2.5.patch | 145 | ||||
-rw-r--r-- | dev-python/htmlgen/files/htmlgen-pillow.patch | 53 | ||||
-rw-r--r-- | dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild | 60 | ||||
-rw-r--r-- | dev-python/htmlgen/metadata.xml | 5 |
5 files changed, 264 insertions, 0 deletions
diff --git a/dev-python/htmlgen/Manifest b/dev-python/htmlgen/Manifest new file mode 100644 index 000000000000..4b3a8916389a --- /dev/null +++ b/dev-python/htmlgen/Manifest @@ -0,0 +1 @@ +DIST HTMLgen.tgz 316415 SHA256 f3b39b4b07b5dd318780ad0e9b8b3c524a54138537697dd7966223f314d2177d SHA512 8301d4a28c29f477f07eedee2bffd6d07e345f08c056402098fa966f0e61895ed4dea60b653793b30d8457a7d692e3af772514d86ae440950fd52719bbadf942 WHIRLPOOL c3cef973b39a893026050a969cf1d433a18916a0340667436ce53b7dfc19d643809e48feaa3985faf6dc392f3c84c53c04f98b9e8a0c2773c4bb6c8f0131dd72 diff --git a/dev-python/htmlgen/files/htmlgen-2.2.2-python-2.5.patch b/dev-python/htmlgen/files/htmlgen-2.2.2-python-2.5.patch new file mode 100644 index 000000000000..7bdff6815011 --- /dev/null +++ b/dev-python/htmlgen/files/htmlgen-2.2.2-python-2.5.patch @@ -0,0 +1,145 @@ +--- HTMLcalendar.py ++++ HTMLcalendar.py +@@ -212,12 +212,12 @@ + return value + else: + raise TypeError, ('cannot convert to int', value) +-import regex +-datepat = regex.compile('^ *\([0-9*][0-9]?\)[/-]' #first 2 char date field ++import re ++datepat = re.compile('^ *\([0-9*][0-9]?\)[/-]' #first 2 char date field + '\([0-9][0-9]?\)[/-]?' #second 2 char date field + '\([12][0-9][0-9][0-9]\)?[ \t]*:') #optional year field +-daypat = regex.compile('^ *\('+string.join(day_name,'\|')+'\)') +-timepat = regex.compile('\([0-9][0-9]?\):\([0-9][0-9]\)') ++daypat = re.compile('^ *\('+string.join(day_name,'\|')+'\)') ++timepat = re.compile('\([0-9][0-9]?\):\([0-9][0-9]\)') + + def read_appt_file(filename): + """Parsing function. +--- HTMLgen.py ++++ HTMLgen.py +@@ -924,7 +924,7 @@ + def antispam(self, address): + """Process a string with HTML encodings to defeat address spiders. + """ +- from whrandom import choice ++ from random import choice + buffer = map(None, address) + for i in range(0, len(address), choice((2,3,4))): + buffer[i] = '&#%d;' % ord(buffer[i]) +--- HTMLtest.py ++++ HTMLtest.py +@@ -2,7 +2,7 @@ + + """Test script which generates the online documentation for HTMLgen. + """ +-import string, regex, regsub, os, time, glob ++import string, re, re, os, time, glob + from HTMLcolors import * + from HTMLgen import * + import HTMLgen #only so I can pick off the __version__ +@@ -232,11 +232,11 @@ + doc.email = 'jefferson@montecello.virginia.gov' + doc.logo = ('../image/eagle21.gif', 64, 54) + # parse Declaration of Independence +- re_hline = regex.compile('^--+$') +- re_title = regex.compile('^Title:\(.*$\)') ++ re_hline = re.compile('^--+$') ++ re_title = re.compile('^Title:\(.*$\)') + font2 = Font(size='+2') + s = open(os.path.join(datadir, 'DoI.txt')).read() +- paragraphs = regsub.split(s, '\n\([\t ]*\n\)+') ++ paragraphs = re.split(s, '\n\([\t ]*\n\)+') + for para in paragraphs: + if not para: continue + if re_title.search(para) > -1: +@@ -263,7 +263,7 @@ + #Ok parse that file + f = open(mpath(os.path.join(datadir, 'parrot.txt'))) + line = f.readline() +- re_dialog = regex.compile('\(^[OC].*:\)\(.*\)') ++ re_dialog = re.compile('\(^[OC].*:\)\(.*\)') + while line: + if re_dialog.search(line) > -1: + role, prose = re_dialog.group(1,2) +--- HTMLutil.py ++++ HTMLutil.py +@@ -19,7 +19,7 @@ + # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + # PERFORMANCE OF THIS SOFTWARE. + __version__ = '$Id: HTMLutil.py,v 1.3 1998/05/28 20:14:52 friedric Exp $' +-import string, regex, os ++import string, re, os + import HTMLgen, HTMLcolors + from types import * + +@@ -79,7 +79,7 @@ + """Determine if the text have been marked by a previous gsub. + (ugly hack but it works) + """ +- if regex.search('\(</?FONT\)\|\(</?STRONG\)', text) > -1: ++ if re.search('\(</?FONT\)\|\(</?STRONG\)', text) > -1: + return 1 + else: + return 0 +@@ -125,13 +125,13 @@ + not_backslash = "[^\\\\]" + triple_single = "'''" + triple_double = '"""' +-_doc_start_re = regex.compile( ++_doc_start_re = re.compile( + "\(^\|" + not_backslash + "\)" # bol or not backslash + + "\(" + triple_single + "\|" + triple_double + "\)" ) + single_re = not_backslash + triple_single + double_re = not_backslash + triple_double +-_triple_re = { triple_single : regex.compile(single_re), +- triple_double : regex.compile(double_re) } ++_triple_re = { triple_single : re.compile(single_re), ++ triple_double : re.compile(double_re) } + + del not_backslash, triple_single, triple_double, \ + single_re, double_re +@@ -150,13 +150,13 @@ + return (None, None) + return startquote, quotefinder.regs[0][1] + +-string_re = regex.compile('\(\(\'[^\'\n]*\'\)\|\("[^"\n]"\)\)') ++string_re = re.compile('\(\(\'[^\'\n]*\'\)\|\("[^"\n]"\)\)') + def find_string_literal( s, begin=0 ): + if string_re.search(s, begin) > -1: + return string_re.regs[1] + return (None, None) + +-comment_re = regex.compile('#.*$') ++comment_re = re.compile('#.*$') + def find_comment( s, begin=0 ): + while comment_re.search(s, begin) > -1: + if been_marked(comment_re.group(0)): +@@ -166,13 +166,13 @@ + return (None, None) + + Name = '[a-zA-Z_][a-zA-Z0-9_]*' +-func_re = regex.compile('\(^[ \t]*def[ \t]+' +Name+ '\)[ \t]*(') ++func_re = re.compile('\(^[ \t]*def[ \t]+' +Name+ '\)[ \t]*(') + def find_function( s, begin=0 ): + if func_re.search(s, begin) > -1: + return func_re.regs[1] + return (None, None) + +-class_re = regex.compile('\(^[ \t]*class[ \t]+' +Name+ '\)[ \t]*[(:]') ++class_re = re.compile('\(^[ \t]*class[ \t]+' +Name+ '\)[ \t]*[(:]') + def find_class( s, begin=0 ): + if class_re.search(s, begin) > -1: + return class_re.regs[1] +--- ImagePaletteH.py ++++ ImagePaletteH.py +@@ -70,7 +70,7 @@ + return ImagePalette(mode, palette * len(mode)) + + def random(mode = "RGB"): +- from whrandom import randint ++ from random import randint + palette = map(lambda a: randint(0, 255), [0]*256*len(mode)) + return ImagePalette(mode, palette) + diff --git a/dev-python/htmlgen/files/htmlgen-pillow.patch b/dev-python/htmlgen/files/htmlgen-pillow.patch new file mode 100644 index 000000000000..0c4f3daa27f4 --- /dev/null +++ b/dev-python/htmlgen/files/htmlgen-pillow.patch @@ -0,0 +1,53 @@ +Fix PIL imports for Pillow compat +https://bugs.gentoo.org/show_bug.cgi?id=471506 +--- HTMLgen/ImageH.py 1999-04-20 22:40:28.000000000 -0400 ++++ HTMLgen/ImageH.py 2013-06-08 14:00:49.261734532 -0400 +@@ -576,7 +576,7 @@ + "Display image (for debug purposes only)" + + try: +- import ImageTk ++ from PIL import ImageTk + ImageTk._show(self, title) + # note: caller must enter mainloop + except: +--- HTMLgen/ImagePaletteH.py 2013-06-08 13:56:03.476318926 -0400 ++++ HTMLgen/ImagePaletteH.py 2013-06-08 14:01:26.564871622 -0400 +@@ -87,7 +87,7 @@ + + if not lut: + try: +- import GimpPaletteFile ++ from PIL import GimpPaletteFile + fp.seek(0) + p = GimpPaletteFile.GimpPaletteFile(fp) + lut = p.getpalette() +@@ -96,7 +96,7 @@ + + if not lut: + try: +- import GimpGradientFile ++ from PIL import GimpGradientFile + fp.seek(0) + p = GimpGradientFile.GimpGradientFile(fp) + lut = p.getpalette() +@@ -105,7 +105,7 @@ + + if not lut: + try: +- import PaletteFile ++ from PIL import PaletteFile + fp.seek(0) + p = PaletteFile.PaletteFile(fp) + lut = p.getpalette() +--- HTMLgen/imgsize.py 1998-05-25 13:56:37.000000000 -0400 ++++ HTMLgen/imgsize.py 2013-06-08 14:01:48.731358969 -0400 +@@ -15,7 +15,7 @@ + + try: #Following switcheroo ensures that if PIL is installed it's used instead + # of the HTMLgen-bundled copies. +- import Image ++ from PIL import Image + except ImportError: + import ImageH + Image = ImageH diff --git a/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild b/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild new file mode 100644 index 000000000000..c58dbf1e9527 --- /dev/null +++ b/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +inherit eutils python-r1 + +MY_P="HTMLgen" +DESCRIPTION="HTMLgen - Python modules for the generation of HTML documents" +HOMEPAGE="http://starship.python.net/crew/friedrich/HTMLgen/html/main.html" +SRC_URI="http://starship.python.net/crew/friedrich/${MY_P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ia64 ppc x86" +IUSE="doc" + +DEPEND="${PYTHON_DEPS} + virtual/python-imaging[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${P}-python-2.5.patch" + epatch "${FILESDIR}/${PN}-pillow.patch" +} + +src_compile() { + return 0 +} + +src_install() { + # doing this manually because their build scripts suck + local files="HTMLgen.py HTMLcolors.py HTMLutil.py HTMLcalendar.py + barchart.py colorcube.py imgsize.py NavLinks.py Formtools.py + ImageH.py ImageFileH.py ImagePaletteH.py GifImagePluginH.py + JpegImagePluginH.py PngImagePluginH.py" + + mkdir htmlgen || die + touch htmlgen/__init__.py || die + ln ${files} htmlgen/ || die + python_parallel_foreach_impl python_domodule htmlgen + + if use doc; then + # fix the image locations in the docs + sed -i -e "s;../image/;image/;g" html/* || die "sed failed" + dohtml html/* + dohtml -r image + fi + dodoc README +} + +pkg_postinst() { + ewarn "htmlgen now resides in its own subdirectory" + ewarn "so you need to do \"from htmlgen import HTMLgen\" instead of \"import HTMLgen\"" +} diff --git a/dev-python/htmlgen/metadata.xml b/dev-python/htmlgen/metadata.xml new file mode 100644 index 000000000000..de483c53568f --- /dev/null +++ b/dev-python/htmlgen/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>python</herd> +</pkgmetadata> |