Package: agtl
Version: 0.5.1-1
Severity: important
User: [email protected]
Usertags: python2.6

Hello,

Your package harcodes 2.5 as the Python version. However, we expect Python 2.6 to be the default version in Debian soon. The attached, not very well tested patch, seems to fix this problem.

--
Jakub Wilk
diff -u agtl-0.5.1/debian/control agtl-0.5.1/debian/control
--- agtl-0.5.1/debian/control
+++ agtl-0.5.1/debian/control
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Heiko Stuebner <[email protected]>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 5.0.38), cdbs (>= 0.4.49), python2.5-dev (>= 2.3.5-11), python-support (>= 0.5.3), python-setuptools, cython
+Build-Depends: debhelper (>= 5.0.38), cdbs (>= 0.4.49), python (>= 2.5), python-support (>= 0.5.3), python-setuptools, cython
 Standards-Version: 3.8.3
 Homepage: http://wiki.openmoko.org/wiki/Advanced_Geocaching_Tool_for_Linux
 Vcs-git: git://git.debian.org/pkg-fso/advancedcaching.git
@@ -12,7 +12,7 @@
 XB-Python-Version: ${python:Versions}
 Provides: ${python:Provides}
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-gtk2, python-simplejson
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-gtk2, python (>= 2.6) | python-simplejson
 Description: Tool for paperless geocaching
  AGTL downloads cache locations in the area visible on the map
  including their description, hints, difficulty levels and images.
diff -u agtl-0.5.1/debian/changelog agtl-0.5.1/debian/changelog
--- agtl-0.5.1/debian/changelog
+++ agtl-0.5.1/debian/changelog
@@ -1,3 +1,10 @@
+agtl (0.5.1-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * 
+
+ -- Jakub Wilk <[email protected]>  Sat, 13 Feb 2010 20:30:34 +0100
+
 agtl (0.5.1-1) unstable; urgency=low
 
   * New upstream release
diff -u agtl-0.5.1/debian/pyversions agtl-0.5.1/debian/pyversions
--- agtl-0.5.1/debian/pyversions
+++ agtl-0.5.1/debian/pyversions
@@ -1 +1 @@
-2.5
+2.5-
diff -u agtl-0.5.1/debian/patches/0002-change-json-module-to-the-python2.5-equivalent-simpl.patch agtl-0.5.1/debian/patches/0002-change-json-module-to-the-python2.5-equivalent-simpl.patch
--- agtl-0.5.1/debian/patches/0002-change-json-module-to-the-python2.5-equivalent-simpl.patch
+++ agtl-0.5.1/debian/patches/0002-change-json-module-to-the-python2.5-equivalent-simpl.patch
@@ -6,135 +6,45 @@
----
- files/advancedcaching/core.py       |    6 +++---
- files/advancedcaching/geocaching.py |   18 +++++++++---------
- files/advancedcaching/geonames.py   |    6 +++---
- 3 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/files/advancedcaching/core.py b/files/advancedcaching/core.py
-index 5eba559..8b665ce 100755
---- a/files/advancedcaching/core.py
-+++ b/files/advancedcaching/core.py
-@@ -117,7 +117,7 @@ Just start the string with 'q:':
+diff -Nur -x '*.orig' -x '*~' agtl-0.5.1/files/advancedcaching/core.py agtl-0.5.1.new/files/advancedcaching/core.py
+--- agtl-0.5.1/files/advancedcaching/core.py	2010-02-13 20:34:56.000000000 +0100
++++ agtl-0.5.1.new/files/advancedcaching/core.py	2010-02-13 20:37:22.000000000 +0100
+@@ -117,7 +117,10 @@
  
  
  from geo import Coordinate
 -import json
-+import simplejson
++try:
++    import json
++except ImportError:
++    import simplejson as json
  import sys
  
  import downloader
-@@ -472,7 +472,7 @@ class Core():
-         string = f.read()
-         self.settings = {}
-         if string != '':
--            tmp_settings = json.loads(string)
-+            tmp_settings = simplejson.loads(string)
-             for k, v in self.DEFAULT_SETTINGS.items():
-                 if k in tmp_settings.keys() != None:
-                     self.settings[k] = tmp_settings[k]
-@@ -494,7 +494,7 @@ class Core():
-     def __write_config(self):
-         filename = os.path.join(self.SETTINGS_DIR, 'config')
-         f = file(filename, 'w')
--        f.write(json.dumps(self.settings, sort_keys=True, indent=4))
-+        f.write(simplejson.dumps(self.settings, sort_keys=True, indent=4))
- 
- 
- def determine_path ():
-diff --git a/files/advancedcaching/geocaching.py b/files/advancedcaching/geocaching.py
-index 133e371..69ad67e 100644
---- a/files/advancedcaching/geocaching.py
-+++ b/files/advancedcaching/geocaching.py
-@@ -18,7 +18,7 @@
+diff -Nur -x '*.orig' -x '*~' agtl-0.5.1/files/advancedcaching/geocaching.py agtl-0.5.1.new/files/advancedcaching/geocaching.py
+--- agtl-0.5.1/files/advancedcaching/geocaching.py	2010-02-13 20:34:56.000000000 +0100
++++ agtl-0.5.1.new/files/advancedcaching/geocaching.py	2010-02-13 20:37:05.000000000 +0100
+@@ -18,7 +18,10 @@
  #        Author: Daniel Fett [email protected]
  #
  
 -import json
-+import simplejson
++try:
++    import json
++except ImportError:
++    import simplejson as json	 
  import math
  import geo
  import os
-@@ -166,26 +166,26 @@ class GeocacheCoordinate(geo.Coordinate):
-     def get_waypoints(self):
-         if self.waypoints == None or self.waypoints == '':
-             return []
--        return json.loads(self.waypoints)
-+        return simplejson.loads(self.waypoints)
- 
-     def get_logs(self):
-         if self.logs == None or self.logs == '':
-             return []
--        return json.loads(self.logs)
-+        return simplejson.loads(self.logs)
- 
-     def get_images(self):
-         if self.images == None or self.images == '':
-             return []
--        return json.loads(self.images)
-+        return simplejson.loads(self.images)
- 
-     def set_waypoints(self, wps):
--        self.waypoints = json.dumps(wps)
-+        self.waypoints = simplejson.dumps(wps)
- 
-     def set_logs(self, ls):
--        self.logs = json.dumps(ls)
-+        self.logs = simplejson.dumps(ls)
- 
-     def set_images(self, imgs):
--        self.images = json.dumps(imgs)
-+        self.images = simplejson.dumps(imgs)
-                 
-                 
-     def was_downloaded(self):
-@@ -468,7 +468,7 @@ class CacheDownloader():
-         if match == None:
-             raise Exception('Could not load map of geocaches')
-         text = match.group(1).replace("\\'", "'")
--        a = json.loads(text.replace('\t', ' '))
-+        a = simplejson.loads(text.replace('\t', ' '))
-         points = []
- 
-         if not 'cc' in a['cs'].keys():
-@@ -630,7 +630,7 @@ class HTMLExporter():
-                 
-     def write_index(self, caches):
-         b = [{'n': c.name, 't': c.title} for c in caches]
--        caches = json.dumps(b)
-+        caches = simplejson.dumps(b)
-         f = open(os.path.join(self.path, "index.html"), 'w')
-         f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"')
-         f.write(' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>')
-diff --git a/files/advancedcaching/geonames.py b/files/advancedcaching/geonames.py
-index fb6aa8c..d94ea80 100644
---- a/files/advancedcaching/geonames.py
-+++ b/files/advancedcaching/geonames.py
-@@ -20,7 +20,7 @@
+diff -Nur -x '*.orig' -x '*~' agtl-0.5.1/files/advancedcaching/geonames.py agtl-0.5.1.new/files/advancedcaching/geonames.py
+--- agtl-0.5.1/files/advancedcaching/geonames.py	2010-02-13 20:33:46.000000000 +0100
++++ agtl-0.5.1.new/files/advancedcaching/geonames.py	2010-02-13 20:38:10.000000000 +0100
+@@ -20,7 +20,10 @@
  
  import geo
  import urllib
 -import json
-+import simplejson
++try:
++    import json
++except ImportError:
++    import simplejson as json
  
  
  class Geonames():
-@@ -39,7 +39,7 @@ class Geonames():
-     def search(self, string, nearest_street = False):
-         print "* Trying to search geonames for %s" % string
-         page = self.downloader.get_reader(url = self.URL % urllib.quote(string)).read()
--        values = json.loads(page)
-+        values = simplejson.loads(page)
-         if int(values['totalResultsCount']) == 0:
-             raise Exception('No Record found for query "%s"' % string)
-         res = values['geonames'][0]
-@@ -53,7 +53,7 @@ class Geonames():
-         print "* trying to find nearest street..."
-         url = self.URL_STREETS % (c.lat, c.lon)
-         page= self.downloader.get_reader(url).read()
--        values = json.loads(page)
-+        values = simplejson.loads(page)
-         if (len(values) == 0):
-             print "* Could NOT find nearest intersection to %s, using this" % c
-             return c
--- 
-1.6.5
-
reverted:
--- agtl-0.5.1/debian/patches/0003-set-shebang-to-python2.5.patch
+++ agtl-0.5.1.orig/debian/patches/0003-set-shebang-to-python2.5.patch
@@ -1,22 +0,0 @@
-From 96e3065d2b9ec2393fa18a3b42d7a6810a6ae15e Mon Sep 17 00:00:00 2001
-From: Heiko Stuebner <[email protected]>
-Date: Fri, 11 Sep 2009 19:48:59 +0200
-Subject: [PATCH] set shebang to python2.5
-
----
- files/agtl |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/files/agtl b/files/agtl
-index 32fc673..990763d 100755
---- a/files/agtl
-+++ b/files/agtl
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.5
- import advancedcaching.core 
- 
- advancedcaching.core.start ()
--- 
-1.6.3.3
-

Attachment: signature.asc
Description: Digital signature

Reply via email to