[Pkg-isocodes-devel] r1545 - in trunk/iso-codes: . iso_3166

toddy at alioth.debian.org toddy at alioth.debian.org
Mon Aug 4 14:18:25 UTC 2008


Author: toddy
Date: 2008-08-04 14:18:24 +0000 (Mon, 04 Aug 2008)
New Revision: 1545

Removed:
   trunk/iso-codes/iso_3166/iso3166tab.py
Modified:
   trunk/iso-codes/ChangeLog
   trunk/iso-codes/iso_3166/Makefile.am
Log:
Do no longer install the file iso_3166.tab in /usr/share/iso-codes


Modified: trunk/iso-codes/ChangeLog
===================================================================
--- trunk/iso-codes/ChangeLog	2008-08-04 13:30:21 UTC (rev 1544)
+++ trunk/iso-codes/ChangeLog	2008-08-04 14:18:24 UTC (rev 1545)
@@ -2,6 +2,9 @@
 ---------------
 UNRELEASED
 
+  [ General ]
+  * Do no longer install the file iso_3166.tab in /usr/share/iso-codes
+
   [ ISO-3166 translations ]
   * Portuguese updated by Miguel Figueiredo
 

Modified: trunk/iso-codes/iso_3166/Makefile.am
===================================================================
--- trunk/iso-codes/iso_3166/Makefile.am	2008-08-04 13:30:21 UTC (rev 1544)
+++ trunk/iso-codes/iso_3166/Makefile.am	2008-08-04 14:18:24 UTC (rev 1545)
@@ -5,14 +5,6 @@
 xmldir = $(datadir)/xml/iso-codes
 xml_DATA = $(DOMAIN).xml
 
-tabdir = $(datadir)/iso-codes
-tab_DATA = $(DOMAIN).tab
-
-iso_3166.tab: iso_3166.xml
-	$(srcdir)/iso3166tab.py $< > iso_3166.tab.new
-	LC_ALL=C sort < iso_3166.tab.new > iso_3166.tab
-	rm -f iso_3166.tab.new
-
 pofiles = $(wildcard $(srcdir)/*.po)
 mofiles = $(patsubst $(srcdir)/%.po,%.mo, $(pofiles))
 noinst_DATA = $(mofiles) $(xml_DATA:.xml=.pot)
@@ -24,12 +16,10 @@
 EXTRA_DIST = \
 	$(pofiles)	\
 	$(xml_DATA)	\
-	iso_3166.pot 	\
-	iso3166tab.py
+	iso_3166.pot
 
 MOSTLYCLEANFILES = \
-	$(mofiles) \
-	$(tab_DATA)
+	$(mofiles)
 
 check-local: check-content
 

Deleted: trunk/iso-codes/iso_3166/iso3166tab.py
===================================================================
--- trunk/iso-codes/iso_3166/iso3166tab.py	2008-08-04 13:30:21 UTC (rev 1544)
+++ trunk/iso-codes/iso_3166/iso3166tab.py	2008-08-04 14:18:24 UTC (rev 1545)
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-#
-# Read iso-codes data file and output a .tab file
-# 
-# Copyright (C) 2004,2005 Alastair McKinstry <mckinstry at debian.org>
-# Released under the GPL.
-# $Id$
-
-from xml.sax import make_parser, SAXException, SAXParseException
-from xml.sax.handler import feature_namespaces, ContentHandler
-import sys, os, getopt, urllib2
-
-class printLines(ContentHandler):
-	def __init__(self, ofile):
-		self.ofile = ofile
-
-	def startElement(self, name, attrs):
-		if name != 'iso_3166_entry':
-			return
-		code = attrs.get('alpha_2_code', None)
-		if code == None:
-			raise RunTimeError, "Bad file"	
-		if type(code) == unicode:
-			code = code.encode('UTF-8')
-		name = attrs.get('name', None)
-		if name == None:
-			raise RunTimeError, " BadFile"
-		if type(name) == unicode:
-			name = name.encode('UTF-8')
-		common_name = attrs.get('common_name', None)
-		if common_name != None:
-			if type(common_name) == unicode:
-				name = common_name.encode('UTF-8')
-			else:
-				name = common_name
-		self.ofile.write (code + '\t' + name + '\n')
-
-
-## 
-## MAIN
-##
-
-
-ofile = sys.stdout
-p = make_parser()
-try:
-	dh = printLines(ofile)
-	p.setContentHandler(dh)
-	p.parse(sys.argv[1])
-except SAXParseException, e:
-	sys.stderr.write('%s:%s:%s: %s\n' % (e.getSystemId(),
-		     e.getLineNumber(),
-		     e.getColumnNumber(),
-		     e.getMessage()))
-	sys.exit(1)
-except Exception, e:
-	sys.stderr.write('<unknown>: %s\n' % str(e))
-	sys.exit(1)
-ofile.close()




More information about the Pkg-isocodes-devel mailing list