debian/0000755000000000000000000000000012302376222007165 5ustar debian/docs0000644000000000000000000000005612052744165010050 0ustar HISTORY.txt TODO.txt src/pycountry/README.txt debian/copyright0000644000000000000000000000760312052744165011135 0ustar Format: http://dep.debian.net/deps/dep5 Files: * Copyright: © 2008-2010, gocept gmbh & co. kg License: LGPL-2.1+ Files: bootstrap.py Copyright: © 2006, Zope Corporation and Contributors License: ZPL-2.1 Files: debian/* Copyright: © 2010-2011, David Paleino License: MIT License: LGPL-2.1+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. X-Comment: on Debian systems, the complete text of the GNU Lesser General Public License can be found in "/usr/share/common-licenses/LGPL-2.1". License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: ZPL-2.1 Zope Public License (ZPL) Version 2.1 . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. . Disclaimer . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED 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 HOLDERS 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. debian/changelog0000644000000000000000000000245012302376222011040 0ustar pycountry (0.14.1+ds1-3build1) trusty; urgency=medium * Rebuild to drop files installed into /usr/share/pyshared. -- Matthias Klose Sun, 23 Feb 2014 13:50:10 +0000 pycountry (0.14.1+ds1-3) unstable; urgency=low * Support "common_name" attribute for languages, thanks to Jerome Flesch (Closes: #693739). -- David Paleino Tue, 20 Nov 2012 19:14:08 +0100 pycountry (0.14.1+ds1-2) unstable; urgency=low * Oops, install README.txt in the appropriate place (Closes: #644348) -- David Paleino Wed, 05 Oct 2011 09:40:34 +0200 pycountry (0.14.1+ds1-1) unstable; urgency=low * New upstream version * Package switched from pysupport to dh_python2 * Refreshed patches * Updated copyright file -- David Paleino Tue, 13 Sep 2011 08:38:23 +0200 pycountry (0.12.1+ds1-2) unstable; urgency=low * Bump Standards-Version to 3.9.2, no changes needed * Added dependency on python-lxml (Closes: #626395) * Prevent logger warning when importing, thanks to Johannes Weißl (Closes: #599369) -- David Paleino Wed, 11 May 2011 23:31:44 +0200 pycountry (0.12.1+ds1-1) unstable; urgency=low * Initial release (Closes: #586130) -- David Paleino Thu, 24 Jun 2010 14:06:22 +0200 debian/compat0000644000000000000000000000000212052744165010372 0ustar 7 debian/patches/0000755000000000000000000000000012052744165010623 5ustar debian/patches/02-support_language_common-name.patch0000644000000000000000000000131612052744165017731 0ustar From: Jerome Flesch Subject: support "common_name" attribute for languages Origin: vendor, http://bugs.debian.org/693739 Bug-Debian: http://bugs.debian.org/693739 Forwarded: no --- src/pycountry/__init__.py | 1 + 1 file changed, 1 insertion(+) --- pycountry.orig/src/pycountry/__init__.py +++ pycountry/src/pycountry/__init__.py @@ -52,6 +52,7 @@ class Languages(pycountry.db.Database): field_map = dict(iso_639_2B_code='bibliographic', iso_639_2T_code='terminology', iso_639_1_code='alpha2', + common_name='common_name', name='name') data_class_name = 'Language' xml_tag = 'iso_639_entry' debian/patches/01-prevent_logger_warning.patch0000644000000000000000000000157512052744165016641 0ustar From: Johannes Weißl Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599369 Origin: vendor Forwarded: https://intra.gocept.com/projects/issues/8081 --- src/pycountry/db.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- pycountry.orig/src/pycountry/db.py +++ pycountry/src/pycountry/db.py @@ -7,8 +7,17 @@ import logging from xml.dom import minidom -logger = logging.getLogger('pycountry.db') +# NullHandler is only defined for python >= 2.7 +if 'NullHandler' not in dir(logging): + class NullHandler(logging.Handler): + def emit(self, record): + pass + logging.NullHandler = NullHandler +logger = logging.getLogger('pycountry.db') +# Prevent warning, see +# http://docs.python.org/library/logging.html#configuring-logging-for-a-library +logger.addHandler(logging.NullHandler()) class Data(object): debian/patches/00-use_system_iso-codes.patch0000644000000000000000000000347612052744165016240 0ustar From: David Paleino Subject: use system-wide iso-codes Forwarded: not-needed --- src/pycountry/README.txt | 2 +- src/pycountry/__init__.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) --- pycountry.orig/src/pycountry/__init__.py +++ pycountry/src/pycountry/__init__.py @@ -9,8 +9,8 @@ import os.path import pycountry.db -LOCALES_DIR = os.path.join(os.path.dirname(__file__), 'locales') -DATABASE_DIR = os.path.join(os.path.dirname(__file__), 'databases') +LOCALES_DIR = '/usr/share/locale' +DATABASE_DIR = '/usr/share/xml/iso-codes' class Countries(pycountry.db.Database): @@ -98,8 +98,8 @@ class Subdivisions(pycountry.db.Database divs.add(subdivision) -countries = Countries(os.path.join(DATABASE_DIR, 'iso3166.xml')) -scripts = Scripts(os.path.join(DATABASE_DIR, 'iso15924.xml')) -currencies = Currencies(os.path.join(DATABASE_DIR, 'iso4217.xml')) -languages = Languages(os.path.join(DATABASE_DIR, 'iso639.xml')) -subdivisions = Subdivisions(os.path.join(DATABASE_DIR, 'iso3166_2.xml')) +countries = Countries(os.path.join(DATABASE_DIR, 'iso_3166.xml')) +scripts = Scripts(os.path.join(DATABASE_DIR, 'iso_15924.xml')) +currencies = Currencies(os.path.join(DATABASE_DIR, 'iso_4217.xml')) +languages = Languages(os.path.join(DATABASE_DIR, 'iso_639.xml')) +subdivisions = Subdivisions(os.path.join(DATABASE_DIR, 'iso_3166_2.xml')) --- pycountry.orig/src/pycountry/README.txt +++ pycountry/src/pycountry/README.txt @@ -181,7 +181,7 @@ to Python's gettext module. Here is an example translating language names: >>> import gettext - >>> german = gettext.translation('iso3166', pycountry.LOCALES_DIR, + >>> german = gettext.translation('iso_3166', pycountry.LOCALES_DIR, ... languages=['de']) >>> german.install() >>> _('Germany') debian/patches/series0000644000000000000000000000014412052744165012037 0ustar 00-use_system_iso-codes.patch 01-prevent_logger_warning.patch 02-support_language_common-name.patch debian/control0000644000000000000000000000131312052744165010575 0ustar Source: pycountry Section: python Priority: extra Maintainer: David Paleino Build-Depends: debhelper (>= 7.0.50~) , python (>= 2.6.6-3~) , python-setuptools , iso-codes Standards-Version: 3.9.2 Homepage: http://pypi.python.org/pypi/pycountry/ Vcs-Git: git://git.debian.org/collab-maint/pycountry.git Vcs-Browser: http://git.debian.org/?p=collab-maint/pycountry.git;a=summary Package: python-pycountry Architecture: all Depends: ${python:Depends} , ${misc:Depends} , iso-codes , python-lxml Description: ISO databases accessible from Python pycountry provides ISO country, subdivision, language, currency and script definitions and their translations, taken from the iso-codes package. debian/rules0000755000000000000000000000150112052744165010251 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CURVER=$(shell dpkg-parsechangelog | grep ^Version | cut -d\ -f2) DEBVER=$(shell echo $(CURVER) | cut -d- -f1) UPVER=$(shell echo $(DEBVER) | cut -d+ -f1) %: dh -Spython_distutils $@ \ --with python2 override_dh_auto_install: dh_auto_install rm -vrf $(CURDIR)/debian/python-pycountry/usr/lib/python*/*-packages/pycountry/README.txt get-orig-source: uscan --verbose \ --download-version $(UPVER) \ --force-download \ --destdir . tar xvf pycountry-$(UPVER).tar.gz rm -vrf pycountry-$(UPVER)/src/pycountry/databases rm -vrf pycountry-$(UPVER)/src/pycountry/locales tar cf pycountry_$(DEBVER).orig.tar pycountry-$(UPVER) gzip -9 pycountry_$(DEBVER).orig.tar rm -vrf pycountry-$(UPVER)/ pycountry-$(UPVER).tar.gz debian/source/0000755000000000000000000000000012052744165010474 5ustar debian/source/format0000644000000000000000000000001412052744165011702 0ustar 3.0 (quilt) debian/README.source0000644000000000000000000000026112052744165011352 0ustar pycountry for Debian -------------------- The original tarball has been repacked to remove the embedded copy of iso-codes. To get it, run: $ debian/rules get-orig-source debian/watch0000644000000000000000000000017112052744165010224 0ustar version=3 opts=dversionmangle=s/\+ds.*// \ http://pypi.python.org/packages/source/p/pycountry/pycountry-(\d+.*)\.tar\.gz