[Pkg-running-devel] [SCM] Debian package for pytrainer branch, master, updated. debian/1.6.0.8-1-14-gfd8b57d

Christian PERRIER bubulle at debian.org
Sun Jun 19 18:52:32 UTC 2011


The following commit has been merged in the master branch:
commit fd8b57d6d5217e7c7d5a3dd69049813cc180a9bb
Author: Christian PERRIER <bubulle at debian.org>
Date:   Sun Jun 19 20:52:27 2011 +0200

    Port from python-gtkmozembed to python-webkit. GtkMozEmbed has been abandoned upstream

diff --git a/debian/changelog b/debian/changelog
index a5e69ff..a7f442e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,15 @@ pytrainer (1.8.0-2) UNRELEASED; urgency=low
   * Set XS-Python-Version: >=2.5 in debian/control as pytrainer
     needs it. Closes: #582056
   * Improve package description. Closes: #624785
-
- -- Christian Perrier <bubulle at debian.org>  Wed, 11 May 2011 13:26:23 +0200
+  * Port from python-gtkmozembed to python-webkit. GtkMozEmbed has been
+    abandoned upstream. Closes: #627793
+    Thanks to Chris Coulson for the patch, originating in Ubuntu
+    - add debian/patches/01_port_to_webkit.patch
+    - add debian/patches/series
+    - update debian/control
+    - update debian/rules
+
+ -- Christian Perrier <bubulle at debian.org>  Sun, 19 Jun 2011 20:51:43 +0200
 
 pytrainer (1.8.0-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 1e3f920..77393d5 100644
--- a/debian/control
+++ b/debian/control
@@ -1,17 +1,20 @@
 Source: pytrainer
 Section: utils
 Priority: optional
-Maintainer: Debian running development group <pkg-running-devel at lists.alioth.debian.org>
-Uploaders: Noèl Köthe <noel at debian.org>
+Maintainer: Noèl Köthe <noel at debian.org>
 Build-Depends-Indep: python (>= 2.5.3-1~), python-support (>= 1.0.0)
-Build-Depends: debhelper (>= 5.0.0)
+Build-Depends: debhelper (>= 5.0.0), quilt
 Standards-Version: 3.8.4
 Homepage: http://sourceforge.net/projects/pytrainer/
-XS-Python-Version: >= 2.5
+X-Python-Version: >=2.5
 
 Package: pytrainer
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, python-libxml2, python-lxml, python-pysqlite2, python-glade2, python-gtk2, python-matplotlib, python-scipy, python-numpy, gpsbabel, iceweasel | firefox | abrowser, python-gtkmozembed, python-soappy, zenity
-Description: tool for logging sport activities
- This package provides a logging tool for runners, cyclists, etc. It
- uses data from GPS-enabled devices that generate GPX files.
+Depends: ${misc:Depends}, python, python-libxml2, python-lxml, python-pysqlite2, python-glade2, python-gtk2, python-matplotlib, python-scipy, python-numpy, gpsbabel, iceweasel | firefox | abrowser, python-gtkmozembed, python-soappy, zenity
+Description: The Free Sport Training Center
+ Pytrainer is a tool to log your sport activities. This software was
+ originally thought for cyclists, but it can also be used for other
+ resistance sports like running, swimming, skiing, and so on. Pytrainer
+ is also able to generate detailed graphs and statistics with data
+ retrieved from GPS-provided fitness devices.
+
diff --git a/debian/patches/01_port_to_webkit.patch b/debian/patches/01_port_to_webkit.patch
new file mode 100644
index 0000000..1674799
--- /dev/null
+++ b/debian/patches/01_port_to_webkit.patch
@@ -0,0 +1,143 @@
+--- a/pytrainer/extensions/googlemaps.py
++++ b/pytrainer/extensions/googlemaps.py
+@@ -35,9 +35,7 @@ class Googlemaps:
+     def drawMap(self,activity):
+         '''Draw google map
+             create html file using Google API version3
+-            render using embedded Mozilla
+-
+-            info at http://www.pygtk.org/pygtkmozembed/class-gtkmozembed.html
++            render using embedded Webkit
+         '''
+         logging.debug(">>")
+         points = []
+--- a/pytrainer/extensions/mapviewer.py
++++ b/pytrainer/extensions/mapviewer.py
+@@ -16,7 +16,7 @@
+ #along with this program; if not, write to the Free Software
+ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ 
+-import gtkmozembed
++import webkit
+ import logging
+ import os
+ 
+@@ -31,14 +31,13 @@ class MapViewer:
+ 			logging.debug("Display box (%s) is None" % ( str(box)))
+ 			return
+ 		self.box = box
+-		gtkmozembed.set_profile_path("/tmp", "foobar") # http://faq.pygtk.org/index.py?req=show&file=faq19.018.htp  #TODO FIX???
+-		self.moz = gtkmozembed.MozEmbed()
++		self.wkview = webkit.WebView()
+ 		self.pack_box()
+ 		logging.debug("<<")
+ 
+ 	def pack_box(self):
+ 		logging.debug(">>")
+-		self.box.pack_start(self.moz, True, True)
++		self.box.pack_start(self.wkview, True, True)
+ 		self.box.show_all()
+ 		logging.debug("<<")
+ 
+@@ -46,7 +45,7 @@ class MapViewer:
+ 		logging.debug(">>")
+ 		if htmlfile is None:
+ 			htmlfile = self.createErrorHtml()
+-		self.moz.load_url("file://%s" % (htmlfile))
++		self.wkview.load_uri("file://%s" % (htmlfile))
+ 		#self.box.show_all()
+ 		logging.debug("<<")
+ 
+--- a/pytrainer/extensions/osm.py
++++ b/pytrainer/extensions/osm.py
+@@ -2,7 +2,6 @@
+ # TODO: store OpenLayers.js locally (1MB file)
+ # TODO: Add google satelite images layers ?
+ 
+-import gtkmozembed
+ import os
+ import re
+ import logging
+@@ -24,9 +23,7 @@ class Osm:
+ 	def drawMap(self,activity):
+ 		'''Draw osm map
+ 			create html file using Open Layers and Open Street Map
+-			render using embedded Mozilla
+-
+-			info at http://www.pygtk.org/pygtkmozembed/class-gtkmozembed.html
++			render using embedded Webkit
+ 		'''
+ 		logging.debug(">>")
+ 		points = []
+--- a/pytrainer/extensions/waypointeditor.py
++++ b/pytrainer/extensions/waypointeditor.py
+@@ -16,7 +16,7 @@
+ #along with this program; if not, write to the Free Software
+ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ 
+-import gtkmozembed
++import webkit
+ import os
+ import re
+ 
+@@ -33,9 +33,9 @@ class WaypointEditor:
+ 		logging.debug(">>")
+ 		self.data_path = data_path
+ 		self.extension = Extension()
+-		self.moz = gtkmozembed.MozEmbed()
+-		self.moz.connect('title', self.handle_title_changed) 
+-		vbox.pack_start(self.moz, True, True)
++		self.wkview = webkit.WebView()
++		self.wkview.connect('notify::title', self.handle_title_changed) 
++		vbox.pack_start(self.wkview, True, True)
+ 		vbox.show_all()
+ 		self.htmlfile = ""
+ 		self.waypoint=waypoint
+@@ -43,7 +43,9 @@ class WaypointEditor:
+ 		logging.debug("<<")
+ 		
+ 	def handle_title_changed(self, *args): 
+-		title = self.moz.get_title() 
++		title = self.wkview.get_title()
++		if title == None:
++			return
+ 		logging.debug("Received title: "+ title)
+ 		m = re.match("call:([a-zA-Z]*)[(](.*)[)]", title) 
+ 		if m: 
+@@ -86,7 +88,7 @@ class WaypointEditor:
+ 		tmpdir = self.pytrainer_main.profile.tmpdir
+ 		htmlfile = tmpdir+"/waypointeditor.html"
+ 		logging.debug("HTML file: "+str(htmlfile))
+-		self.moz.load_url("file://"+htmlfile)
++		self.wkview.load_uri("file://"+htmlfile)
+ 		logging.debug("<<")
+ 	
+ 	def createHtml(self,default_waypoint=None):
+--- a/bin/pytrainer
++++ b/bin/pytrainer
+@@ -95,25 +95,6 @@ gettext.install("pytrainer", gettext_pat
+ sys.path.insert(0, site_path)
+ from pytrainer.main import pyTrainer
+ 
+-#Determine xulrunner location
+-xulrunners = glob.glob("/usr/li*/xulrunner*/xulrunner")
+-if len(xulrunners) == 0:
+-    #Didnt find any - fall back to old approach
+-    xul_env = commands.getstatusoutput("find /usr/li* -name xulrunner -exec dirname {} \; 2>/dev/null")[1]
+-elif len(xulrunners) == 1:
+-    #Found just one location - use that
+-    xul_env = os.path.dirname(xulrunners[0])
+-else:
+-    #Found more than one - need to choose one...
+-    max_version = None
+-    for item in xulrunners:
+-        xul_dir = os.path.dirname(item)
+-        max_version = _max(max_version, xul_dir)
+-    xul_env = max_version
+-
+-print "Using xulrunner dir: %s" % xul_env
+-os.environ['MOZILLA_FIVE_HOME'] = xul_env
+-
+ def main():
+     pytrainer = pyTrainer(None, data_path)
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2da30e3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_port_to_webkit.patch
diff --git a/debian/rules b/debian/rules
index 7046cde..e0f89bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,11 +11,13 @@
 
 build:
 	dh_testdir
+	dh_quilt_patch
 	touch build_stamp
 
 clean:
 	dh_testdir
 	dh_testroot
+	dh_quilt_unpatch
 	rm -f build-stamp configure-stamp
 	dh_clean
 	rm -rf $(CURDIR)/build

-- 
Debian package for pytrainer



More information about the Pkg-running-devel mailing list