From 8ed595388c524092c8ba77b373d2be908530ec2f Mon Sep 17 00:00:00 2001 From: Jonas Geduldig Date: Fri, 15 Feb 2013 07:11:51 -0500 Subject: [PATCH] Default geocode.cache in cwd --- setup.py | 2 +- twittergeo/Geocoder.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index ccb069e..10d3a45 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ author='Jonas Geduldig', author_email='boxnumber03@gmail.com', packages=['twittergeo'], - package_data={'': ['credentials.txt', 'geocode.cache']}, + package_data={'': []}, url='https://github.com/geduldig/twittergeo', download_url = 'https://github.com/gedldig/twittergeo/tarball/master', license='MIT', diff --git a/twittergeo/Geocoder.py b/twittergeo/Geocoder.py index 06b2e97..7b84556 100755 --- a/twittergeo/Geocoder.py +++ b/twittergeo/Geocoder.py @@ -47,8 +47,9 @@ def __init__(self, cache_file=None): self.last_exec = None # time updated at each geocode request if cache_file is None: - path = os.path.dirname(__file__) - cache_file = os.path.join(path, DEFAULT_CACHE_FILE) + #path = os.path.dirname(__file__) + #cache_file = os.path.join(path, DEFAULT_CACHE_FILE) + cache_file = DEFAULT_CACHE_FILE # cache is a persistent dict with place address as key and lat/lng and count as value self.cache = fridge.Fridge(cache_file)