diff -Nru python-pyepsg-0.3.1/debian/changelog python-pyepsg-0.3.2/debian/changelog --- python-pyepsg-0.3.1/debian/changelog 2017-05-26 10:47:02.000000000 +0000 +++ python-pyepsg-0.3.2/debian/changelog 2017-06-08 08:56:38.000000000 +0000 @@ -1,3 +1,11 @@ +python-pyepsg (0.3.2-1) unstable; urgency=medium + + * New upstream version 0.3.2 + * Drop the patch queue, applied upstream + * Move extend-diff-ignore to d/s/options + + -- Ghislain Antony Vaillant Thu, 08 Jun 2017 09:56:38 +0100 + python-pyepsg (0.3.1-1) unstable; urgency=low * Initial release. (Closes: #863305) diff -Nru python-pyepsg-0.3.1/debian/patches/Add-install-requirements.patch python-pyepsg-0.3.2/debian/patches/Add-install-requirements.patch --- python-pyepsg-0.3.1/debian/patches/Add-install-requirements.patch 2017-05-26 10:47:02.000000000 +0000 +++ python-pyepsg-0.3.2/debian/patches/Add-install-requirements.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -From: Ghislain Antony Vaillant -Date: Thu, 25 May 2017 14:22:21 +0100 -Subject: Add install requirements - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 6860bbc..60466ef 100644 ---- a/setup.py -+++ b/setup.py -@@ -33,6 +33,6 @@ setup( - 'Topic :: Scientific/Engineering :: GIS'], - description='Easy access to the EPSG database via http://epsg.io/', - long_description=open('README.rst').read(), -- -+ install_requires=['requests'], - py_modules=['pyepsg'], - ) diff -Nru python-pyepsg-0.3.1/debian/patches/Fix-the-test-suite.patch python-pyepsg-0.3.2/debian/patches/Fix-the-test-suite.patch --- python-pyepsg-0.3.1/debian/patches/Fix-the-test-suite.patch 2017-05-26 10:47:02.000000000 +0000 +++ python-pyepsg-0.3.2/debian/patches/Fix-the-test-suite.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -From: Ghislain Antony Vaillant -Date: Thu, 25 May 2017 14:15:29 +0100 -Subject: Fix the test suite - -This is a squash commit of the following pull requests: -- https://github.com/rhattersley/pyepsg/pull/6 -- https://github.com/rhattersley/pyepsg/pull/7 ---- - pyepsg.py | 25 ++++++++++++------------- - 1 file changed, 12 insertions(+), 13 deletions(-) - -diff --git a/pyepsg.py b/pyepsg.py -index 658c5e7..466f119 100644 ---- a/pyepsg.py -+++ b/pyepsg.py -@@ -189,31 +189,30 @@ class CRS(EPSG): - For example:: - - >>> print(get(21781).domain_of_validity()) -- [5.97, 10.49, 45.83, 47.81] -+ [5.96, 10.49, 45.82, 47.81] - - - """ -- # TODO: Check for gmd:EX_GeographicBoundingBox and blow up otherwise. - # TODO: Generalise interface to return a polygon? (Can we find - # something that uses a polygon instead?) - domain = self.element.find(GML_NS + 'domainOfValidity') - domain_href = domain.attrib[XLINK_NS + 'href'] - url = '{prefix}{code}.gml?download'.format(prefix=EPSG_IO_URL, - code=domain_href) -- xml = requests.get(url).text -- gml = ET.fromstring(xml.encode('UTF-8')) -+ xml = requests.get(url).content -+ gml = ET.fromstring(xml) - -- def extract_bound(i, tag): -- # TODO: Figure out if this is our problem or ET's. -- # `find` isn't returning anything :( -- # ns = '{http://www.isotc211.org/2005/gmd}' -- # bound = gml.find(ns + tag) -- bound = gml[1][0][1][0][i] -- return float(bound[0].text) -+ def extract_bound(tag): -+ ns = '{http://www.isotc211.org/2005/gmd}' -+ xpath = './/{ns}EX_GeographicBoundingBox/{ns}{tag}/'.format( -+ ns=ns, -+ tag=tag) -+ bound = gml.find(xpath) -+ return float(bound.text) - - tags = ('westBoundLongitude', 'eastBoundLongitude', - 'southBoundLatitude', 'northBoundLatitude') -- bounds = [extract_bound(i, tag) for i, tag in enumerate(tags)] -+ bounds = [extract_bound(tag) for tag in tags] - return bounds - - -@@ -272,7 +271,7 @@ def get(code): - if instance is None: - url = '{prefix}{code}.gml?download'.format(prefix=EPSG_IO_URL, - code=code) -- xml = requests.get(url).text -+ xml = requests.get(url).content - root = ET.fromstring(xml) - class_for_tag = { - GML_NS + 'CartesianCS': CartesianCS, diff -Nru python-pyepsg-0.3.1/debian/patches/series python-pyepsg-0.3.2/debian/patches/series --- python-pyepsg-0.3.1/debian/patches/series 2017-05-26 10:47:02.000000000 +0000 +++ python-pyepsg-0.3.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -Fix-the-test-suite.patch -Add-install-requirements.patch diff -Nru python-pyepsg-0.3.1/debian/source/options python-pyepsg-0.3.2/debian/source/options --- python-pyepsg-0.3.1/debian/source/options 1970-01-01 00:00:00.000000000 +0000 +++ python-pyepsg-0.3.2/debian/source/options 2017-06-08 08:56:38.000000000 +0000 @@ -0,0 +1 @@ +extend-diff-ignore="^[^/]+\.egg-info/" diff -Nru python-pyepsg-0.3.1/docs/conf.py python-pyepsg-0.3.2/docs/conf.py --- python-pyepsg-0.3.1/docs/conf.py 2016-06-06 19:57:53.000000000 +0000 +++ python-pyepsg-0.3.2/docs/conf.py 2017-06-08 08:40:45.000000000 +0000 @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.3.1' +version = '0.3.2' # The full version, including alpha/beta/rc tags. -release = '0.3.1' +release = '0.3.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -Nru python-pyepsg-0.3.1/PKG-INFO python-pyepsg-0.3.2/PKG-INFO --- python-pyepsg-0.3.1/PKG-INFO 2016-06-06 20:02:45.000000000 +0000 +++ python-pyepsg-0.3.2/PKG-INFO 2017-06-08 08:41:30.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyepsg -Version: 0.3.1 +Version: 0.3.2 Summary: Easy access to the EPSG database via http://epsg.io/ Home-page: https://github.com/rhattersley/pyepsg Author: Richard Hattersley diff -Nru python-pyepsg-0.3.1/pyepsg.egg-info/PKG-INFO python-pyepsg-0.3.2/pyepsg.egg-info/PKG-INFO --- python-pyepsg-0.3.1/pyepsg.egg-info/PKG-INFO 2016-06-06 20:02:41.000000000 +0000 +++ python-pyepsg-0.3.2/pyepsg.egg-info/PKG-INFO 2017-06-08 08:41:29.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyepsg -Version: 0.3.1 +Version: 0.3.2 Summary: Easy access to the EPSG database via http://epsg.io/ Home-page: https://github.com/rhattersley/pyepsg Author: Richard Hattersley diff -Nru python-pyepsg-0.3.1/pyepsg.egg-info/requires.txt python-pyepsg-0.3.2/pyepsg.egg-info/requires.txt --- python-pyepsg-0.3.1/pyepsg.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-pyepsg-0.3.2/pyepsg.egg-info/requires.txt 2017-06-08 08:41:29.000000000 +0000 @@ -0,0 +1 @@ +requests diff -Nru python-pyepsg-0.3.1/pyepsg.egg-info/SOURCES.txt python-pyepsg-0.3.2/pyepsg.egg-info/SOURCES.txt --- python-pyepsg-0.3.1/pyepsg.egg-info/SOURCES.txt 2016-06-06 20:02:41.000000000 +0000 +++ python-pyepsg-0.3.2/pyepsg.egg-info/SOURCES.txt 2017-06-08 08:41:30.000000000 +0000 @@ -12,4 +12,5 @@ pyepsg.egg-info/PKG-INFO pyepsg.egg-info/SOURCES.txt pyepsg.egg-info/dependency_links.txt +pyepsg.egg-info/requires.txt pyepsg.egg-info/top_level.txt \ No newline at end of file diff -Nru python-pyepsg-0.3.1/pyepsg.py python-pyepsg-0.3.2/pyepsg.py --- python-pyepsg-0.3.1/pyepsg.py 2016-05-12 17:49:52.000000000 +0000 +++ python-pyepsg-0.3.2/pyepsg.py 2017-06-08 08:40:45.000000000 +0000 @@ -1,4 +1,4 @@ -# (C) British Crown Copyright 2014, Met Office +# (C) British Crown Copyright 2014 - 2016, Met Office # # This file is part of pyepsg. # @@ -22,6 +22,7 @@ """ from __future__ import print_function +import sys import weakref import xml.etree.ElementTree as ET @@ -189,31 +190,30 @@ For example:: >>> print(get(21781).domain_of_validity()) - [5.97, 10.49, 45.83, 47.81] + [5.96, 10.49, 45.82, 47.81] """ - # TODO: Check for gmd:EX_GeographicBoundingBox and blow up otherwise. # TODO: Generalise interface to return a polygon? (Can we find # something that uses a polygon instead?) domain = self.element.find(GML_NS + 'domainOfValidity') domain_href = domain.attrib[XLINK_NS + 'href'] url = '{prefix}{code}.gml?download'.format(prefix=EPSG_IO_URL, code=domain_href) - xml = requests.get(url).text - gml = ET.fromstring(xml.encode('UTF-8')) + xml = requests.get(url).content + gml = ET.fromstring(xml) - def extract_bound(i, tag): - # TODO: Figure out if this is our problem or ET's. - # `find` isn't returning anything :( - # ns = '{http://www.isotc211.org/2005/gmd}' - # bound = gml.find(ns + tag) - bound = gml[1][0][1][0][i] - return float(bound[0].text) + def extract_bound(tag): + ns = '{http://www.isotc211.org/2005/gmd}' + xpath = './/{ns}EX_GeographicBoundingBox/{ns}{tag}/'.format( + ns=ns, + tag=tag) + bound = gml.find(xpath) + return float(bound.text) tags = ('westBoundLongitude', 'eastBoundLongitude', 'southBoundLatitude', 'northBoundLatitude') - bounds = [extract_bound(i, tag) for i, tag in enumerate(tags)] + bounds = [extract_bound(tag) for tag in tags] return bounds @@ -272,7 +272,7 @@ if instance is None: url = '{prefix}{code}.gml?download'.format(prefix=EPSG_IO_URL, code=code) - xml = requests.get(url).text + xml = requests.get(url).content root = ET.fromstring(xml) class_for_tag = { GML_NS + 'CartesianCS': CartesianCS, @@ -290,4 +290,5 @@ if __name__ == '__main__': import doctest - doctest.testmod() + failure_count, test_count = doctest.testmod() + sys.exit(failure_count) diff -Nru python-pyepsg-0.3.1/setup.py python-pyepsg-0.3.2/setup.py --- python-pyepsg-0.3.1/setup.py 2016-06-06 19:57:53.000000000 +0000 +++ python-pyepsg-0.3.2/setup.py 2017-06-08 08:40:45.000000000 +0000 @@ -19,7 +19,7 @@ setup( name='pyepsg', - version='0.3.1', + version='0.3.2', url='https://github.com/rhattersley/pyepsg', author='Richard Hattersley', author_email='rhattersley@gmail.com', @@ -33,6 +33,6 @@ 'Topic :: Scientific/Engineering :: GIS'], description='Easy access to the EPSG database via http://epsg.io/', long_description=open('README.rst').read(), - + install_requires=['requests'], py_modules=['pyepsg'], )