debian/0000755000000000000000000000000012162373054007171 5ustar debian/rules0000755000000000000000000000175712162373022010256 0ustar #!/usr/bin/make -f export PYTHONWARNINGS=d PYVERS := $(shell pyversions -r) PY3VERS := $(shell py3versions -r) %: dh $@ --with python2,python3 override_dh_auto_build: set -ex; \ for python in $(PYVERS) $(PY3VERS); do \ $$python setup.py build; \ done override_dh_auto_clean: rm -rf build dh_auto_clean override_dh_auto_install: # Remove tests to not pollute namespace. rm -rf build/lib*/geopy/tests set -ex; \ for python in $(PYVERS); do \ $$python setup.py install --skip-build --root debian/python-geopy \ --install-layout deb; \ done set -ex; \ for python in $(PY3VERS); do \ $$python setup.py install --skip-build --root debian/python3-geopy \ --install-layout deb; \ done override_dh_installchangelogs: dh_installchangelogs RELEASES override_dh_auto_test: ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" "" # Run tests only for Python2 since upstream is using Beautiful Soup 3. set -e; \ for python in $(PYVERS); do \ $$python /usr/bin/nosetests; \ done endif debian/compat0000644000000000000000000000000212162373022010362 0ustar 9 debian/copyright0000644000000000000000000000265612162373022011130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: geopy Upstream-Contact: Mike Tigas Source: http://pypi.python.org/pypi/geopy Files: * Copyright: 2006-2010, Brian Beck 2010-2012, GeoPy Project and individual contributors License: Expat Files: debian/* Copyright: 2012, Daniele Tricoli License: Expat License: Expat 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. debian/clean0000644000000000000000000000002112162373022010162 0ustar geopy.egg-info/* debian/control0000644000000000000000000000350212162373022010567 0ustar Source: geopy Maintainer: Debian Python Modules Team Uploaders: Daniele Tricoli Section: python Priority: optional Build-Depends: debhelper (>= 9), python-all (>= 2.6.6-3), python-beautifulsoup, python-nose, python-setuptools (>= 0.6b3), python3-all, python3-setuptools Standards-Version: 3.9.4 X-Python-Version: >= 2.5 Homepage: http://code.google.com/p/geopy/ Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/geopy/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/geopy/trunk/ Package: python-geopy Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-beautifulsoup Description: geocoding toolbox for Python geopy makes it easy for developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other sources of data, such as wikis. It also comes with the necessary means for parsing geographical coordinates and geodesic distance calculation (using great-circle distance or Vincenty distance). The distance module also contains useful routines for converting between length and angle units. Package: python3-geopy Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, Description: geocoding toolbox for Python3 geopy makes it easy for developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other sources of data, such as wikis. It also comes with the necessary means for parsing geographical coordinates and geodesic distance calculation (using great-circle distance or Vincenty distance). The distance module also contains useful routines for converting between length and angle units. . This package contains the Python 3 version of the library. debian/watch0000644000000000000000000000011512162373022010212 0ustar version=3 http://pypi.python.org/packages/source/g/geopy/geopy-(.*)\.tar\.gz debian/patches/0000755000000000000000000000000012162373022010613 5ustar debian/patches/03_fix_typo.patch0000644000000000000000000000233512162373022014002 0ustar Description: Fix typos Author: Daniele Tricoli Last-Update: 2013-06-23 --- a/geopy/geocoders/wiki_semantic.py +++ b/geopy/geocoders/wiki_semantic.py @@ -99,10 +99,10 @@ relations = self.get_relations(thing) for relation, resource in relations: url = things.get(resource, resource) - if url in tried: # Avoid cyclic relationships. + if url in attempted: # Avoid cyclic relationships. continue - tried.add(url) - name, (latitude, longitude) = self.geocode_url(url, tried) + attempted.add(url) + name, (latitude, longitude) = self.geocode_url(url, attempted) if None not in (name, latitude, longitude): break --- a/geopy/geohash.py +++ b/geopy/geohash.py @@ -45,7 +45,7 @@ try: byte = self.DECODE_MAP[char] except KeyError: - raise ValueError("Invalid hash: unexpected character %r." % (c,)) + raise ValueError("Invalid hash: unexpected character %r." % (char,)) else: for bit in (16, 8, 4, 2, 1): if odd_bit: debian/patches/01_add_missing_test_file.patch0000644000000000000000000007457212162373022016472 0ustar Description: Added missing file required by unittests Origin: https://github.com/geopy/geopy/blob/master/geopy/tests/fells_loop.gpx --- /dev/null +++ b/geopy/tests/fells_loop.gpx @@ -0,0 +1,1110 @@ + + + + + + + + + 44.586548 + + 5066 + + Crossing + + + + 57.607200 + + 5067 + + Dot + + + + 44.826904 + + 5096 + + Dot + + + + 50.594727 + + 5142 + + Dot + + + + 127.711200 + + 5156 + + Dot + + + + 96.926400 + + 5224 + + Dot + + + + 82.600800 + + 5229 + + Dot + + + + 82.905600 + + 5237 + + Dot + + + + 66.696655 + + 5254 + + Dot + + + + 74.627442 + + 5258 + + Dot + + + + 65.254761 + + 5264 + + Dot + + + + 77.419200 + + 526708 + + Dot + + + + 74.676000 + + 526750 + + Dot + + + + 78.713135 + + 527614 + + Dot + + + + 78.713135 + + 527631 + + Dot + + + + 68.275200 + + 5278 + + Dot + + + + 64.008000 + + 5289 + + Dot + + + + 52.997925 + + 5374FIRE + + Dot + + + + 56.388000 + + 5376 + + Dot + + + + 56.388000 + + 6006 + + Dot + + + + 46.028564 + + 6006BLUE + + Dot + + + + 37.616943 + + 6014MEADOW + + Dot + + + + 56.388000 + + 6029 + + Dot + + + + 50.292000 + + 6053 + + Dot + + + + 25.603200 + + 6066 + + Dot + + + + 34.442400 + + 6067 + + Dot + + + + 30.480000 + + 6071 + + Dot + + + + 15.240000 + + 6073 + + Dot + + + + 37.795200 + + 6084 + + Dot + + + + 64.008000 + + 6130 + + Dot + + + + 64.008000 + + 6131 + + Dot + + + + 62.788800 + + 6153 + + Dot + + + + 55.473600 + + 6171 + + Dot + + + + 62.484000 + + 6176 + + Dot + + + + 62.179200 + + 6177 + + Dot + + + + 69.799200 + + 6272 + + Dot + + + + 73.152000 + + 6272 + + Dot + + + + 70.104000 + + 6278 + + Dot + + + + 57.564209 + + 6280 + + Dot + + + + 66.696655 + + 6283 + + Dot + + + + 72.945191 + + 6289 + + Dot + + + + 72.847200 + + 6297 + + Dot + + + + 53.644800 + + 6328 + + Dot + + + + 43.891200 + + 6354 + + Dot + + + + 48.768000 + + 635722 + + Dot + + + + 49.072800 + + 635783 + + Dot + + + + 62.484000 + + 6373 + + Dot + + + + 3.962400 + + 6634 + + Dot + + + + 13.411200 + + 6979 + + Dot + + + + 34.012085 + + 6997 + + Dot + + + + 87.782400 + + BEAR HILL + BEAR HILL TOWER + + Tall Tower + + + + 23.469600 + + BELLEVUE + BELLEVUE + + Parking Area + + + + 43.384766 + + 6016 + + Trailhead + + + + 89.916000 + + 5236BRIDGE + + Bridge + + + + 55.473600 + + 5376BRIDGE + + Bridge + + + + 52.730400 + + 6181CROSS + + Crossing + + + + 45.110400 + + 6042CROSS + + Crossing + + + + DARKHOLLPO + + Fishing Area + + + 56.083200 + + 6121DEAD + + Danger Area + + + + 117.043200 + + 5179DEAD + + Danger Area + + + + 69.494400 + + 5299DEAD + + Danger Area + + + + 56.997600 + + 5376DEAD + + Danger Area + + + + 46.939200 + + 6353DEAD + + Danger Area + + + + 61.264800 + + 6155DEAD + + Danger Area + + + + 110.947200 + + GATE14 + + Truck Stop + + + + 77.724000 + + GATE16 + + Truck Stop + + + + 65.836800 + + GATE17 + + Truck Stop + + + + 57.302400 + + GATE19 + + Truck Stop + + + + 49.377600 + + GATE21 + + Truck Stop + + + + 81.076800 + + GATE24 + + Truck Stop + + + + 21.515015 + + GATE5 + + Truck Stop + + + + 26.561890 + + GATE6 + + Trailhead + + + + 32.004000 + + 6077LOGS + + Amusement Park + + + + 119.809082 + + 5148NANEPA + + Trailhead + + + + 73.761600 + + 5267OBSTAC + + Amusement Park + + + + 45.307495 + + PANTHRCAVE + + Tunnel + + + + 77.992066 + + 5252PURPLE + + Summit + + + + 67.970400 + + 5287WATER + + Swimming Area + + + + 81.076800 + + 5239ROAD + + Truck Stop + + + + 67.360800 + + 5278ROAD + + Truck Stop + + + + 53.949600 + + 5058ROAD + ROAD CROSSING + + Dot + + + + 69.799200 + + SHEEPFOLD + + Parking Area + + + + 64.008000 + + SOAPBOX + + Cemetery + + + + 64.533692 + + 5376STREAM + + Bridge + + + + 61.649902 + + 5144SUMMIT + + Summit + + + + 67.360800 + + 5150TANK + WATER TANK + + Museum + + + + BELLEVUE (first three waypoints) + + 1 + + 23.469600 + + BELLEVUE + BELLEVUE + + Parking Area + + + + 26.561890 + + GATE6 + + Trailhead + + + + 45.307495 + + PANTHRCAVE + + Tunnel + + + + + BELLEVUE + + 1 + + 23.469600 + + BELLEVUE + BELLEVUE + + Parking Area + + + + 26.561890 + + GATE6 + + Trailhead + + + + 45.307495 + + PANTHRCAVE + + Tunnel + + + + 37.616943 + + 6014MEADOW + + Dot + + + + 56.388000 + + 6006 + + Dot + + + + 46.028564 + + 6006BLUE + + Dot + + + + 44.826904 + + 5096 + + Dot + + + + 44.586548 + + 5066 + + Crossing + + + + 57.607200 + + 5067 + + Dot + + + + 53.949600 + + 5058ROAD + ROAD CROSSING + + Dot + + + + 67.360800 + + 5150TANK + WATER TANK + + Museum + + + + 50.594727 + + 5142 + + Dot + + + + 61.649902 + + 5144SUMMIT + + Summit + + + + 127.711200 + + 5156 + + Dot + + + + 119.809082 + + 5148NANEPA + + Trailhead + + + + 74.627442 + + 5258 + + Dot + + + + 77.992066 + + 5252PURPLE + + Summit + + + + 78.713135 + + 527631 + + Dot + + + + 78.713135 + + 527614 + + Dot + + + + 73.761600 + + 5267OBSTAC + + Amusement Park + + + + 68.275200 + + 5278 + + Dot + + + + 64.008000 + + 5289 + + Dot + + + + 52.997925 + + 5374FIRE + + Dot + + + + 56.388000 + + 5376 + + Dot + + + + 64.533692 + + 5376STREAM + + Bridge + + + + 53.644800 + + 6328 + + Dot + + + + 48.768000 + + 635722 + + Dot + + + + 49.072800 + + 635783 + + Dot + + + + 62.484000 + + 6373 + + Dot + + + + 87.782400 + + BEAR HILL + BEAR HILL TOWER + + Tall Tower + + + + 72.945191 + + 6289 + + Dot + + + + 72.847200 + + 6297 + + Dot + + + + 66.696655 + + 6283 + + Dot + + + + 57.564209 + + 6280 + + Dot + + + + 62.179200 + + 6177 + + Dot + + + + 62.484000 + + 6176 + + Dot + + + + 62.788800 + + 6153 + + Dot + + + + 55.473600 + + 6171 + + Dot + + + + 64.008000 + + 6131 + + Dot + + + + 64.008000 + + 6130 + + Dot + + + + 56.388000 + + 6029 + + Dot + + + + 56.388000 + + 6006 + + Dot + + + + 37.616943 + + 6014MEADOW + + Dot + + + + 45.307495 + + PANTHRCAVE + + Tunnel + + + + 26.561890 + + GATE6 + + Trailhead + + + + 23.469600 + + BELLEVUE + BELLEVUE + + Parking Area + + + + debian/patches/series0000644000000000000000000000016412162373022012031 0ustar 01_add_missing_test_file.patch 02_fix_missing_imports.patch 03_fix_typo.patch 04_use_lt_and_eq_instead_of_cmp.patch debian/patches/02_fix_missing_imports.patch0000644000000000000000000000150512162373022016232 0ustar Description: Fix missing imports Author: Daniele Tricoli Last-Update: 2013-06-23 --- a/geopy/geocoders/wiki_gis.py +++ b/geopy/geocoders/wiki_gis.py @@ -3,6 +3,14 @@ import xml from xml.parsers.expat import ExpatError +from geopy import util + +try: + from BeautifulSoup import BeautifulSoup +except ImportError: + util.logger.warn("BeautifulSoup was not found. " + "The MediaWiki geocoder will not work.") + from geopy.geocoders.base import Geocoder,GeocoderError,GeocoderResultError from geopy import Point, Location, util --- a/geopy/geocoders/wiki_semantic.py +++ b/geopy/geocoders/wiki_semantic.py @@ -1,4 +1,5 @@ import xml.dom.minidom +from urllib2 import urlopen from geopy.geocoders.base import Geocoder from geopy.point import Point from geopy.location import Location debian/patches/04_use_lt_and_eq_instead_of_cmp.patch0000644000000000000000000000151012162373022017770 0ustar Description: Use __lt__() and __eq__() instead of __cmp__() and cmp() Author: Daniele Tricoli Last-Update: 2013-06-24 --- a/geopy/distance.py +++ b/geopy/distance.py @@ -77,11 +77,17 @@ def __str__(self): return '%s km' % self.__kilometers - def __cmp__(self, other): + def __lt__(self, other): if isinstance(other, Distance): - return cmp(self.kilometers, other.kilometers) + return self.kilometers < other.kilometers else: - return cmp(self.kilometers, other) + return self.kilometers < other + + def __eq__(self, other): + if isinstance(other, Distance): + return self.kilometers == other.kilometers + else: + return self.kilometers == other @property def kilometers(self): debian/source/0000755000000000000000000000000012162373022010464 5ustar debian/source/format0000644000000000000000000000001412162373022011672 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000225512162373022011042 0ustar geopy (0.95.1-1) unstable; urgency=low [ Jakub Wilk ] * Use canonical URIs for Vcs-* fields. * Run tests only if DEB_BUILD_OPTIONS=nocheck is not set. [ Daniele Tricoli ] * New upstream release (Closes: #711532) - With Python3 support * Builded Python3 package * debian/compat - Bumped debhelper compatibility level to 9 * debian/control - Bumped debhelper B-D to (>= 9) - Bumped Standards-Version to 3.9.4 (no changes needed) - Added python3-all and python3-setuptools to BD - Added python3-geopy stanza - Updated Homepage * debian/patches/01_add_missing_test_file.patch - Added missing file required by unittests * debian/patches/02_fix_missing_imports.patch - Fix missing imports * debian/patches/03_fix_typo.patch - Fix some typos * debian/patches/04_use_lt_and_eq_instead_of_cmp.patch - Use __lt__() and __eq__() instead of __cmp__() and cmp() * debian/rules - Reworked for Python3 package -- Daniele Tricoli Mon, 24 Jun 2013 23:00:56 +0200 geopy (0.94.2-1) unstable; urgency=low * Initial release (Closes: #452093) -- Daniele Tricoli Tue, 13 Mar 2012 07:30:35 +0100