[SCM] framework for TANGO control system client applications branch, master, updated. upstream/3.0.0_rc3-78-g5e2e8b5

Picca Frédéric-Emma?==?UTF-8?Q?nuel picca at debian.org
Sun May 6 12:39:40 UTC 2012


The following commit has been merged in the master branch:
commit c033f090e8366e6e30a6314e3f6627d4ac4856ac
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Fri Apr 27 23:00:07 2012 +0200

    prepare for release

diff --git a/debian/changelog b/debian/changelog
index fb50f5c..c9a279e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-taurus (3.0.0~rc11-1) unstable; urgency=low
+taurus (3.0.0-1) unstable; urgency=low
 
   * Initial release (Closes: #614247)
   * Thanks to Justin B Rye for package description review
diff --git a/debian/control b/debian/control
index ff253aa..3389484 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Section: science
 Priority: extra
 Build-Depends: debhelper (>= 8),
                graphviz,
+	       inkscape,
                libqt4-dev,
                pyqt4-dev-tools,
                python-all (>= 2.6.6-3~),
diff --git a/debian/patches/0001-fix-compilation.patch b/debian/patches/0001-fix-compilation.patch
deleted file mode 100644
index 8314099..0000000
--- a/debian/patches/0001-fix-compilation.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
-Date: Wed, 25 Apr 2012 07:39:12 +0200
-Subject: fix compilation
-
----
- setup.py |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 676d34f..4129405 100644
---- a/setup.py
-+++ b/setup.py
-@@ -699,8 +699,8 @@ if sphinx:
-         
-         def run(self):
-             import PyQt4.Qt
--            if PyQt4.Qt.qApp.instance() is None:
--                self.app = PyQt4.Qt.QApplication([])
-+            #if PyQt4.Qt.qApp.instance() is None:
-+            #    self.app = PyQt4.Qt.QApplication([])
-             
-             try:
-                 return self.doit()
diff --git a/debian/patches/0001-upstream-backport-fix-compilation.patch b/debian/patches/0001-upstream-backport-fix-compilation.patch
new file mode 100644
index 0000000..7948b2c
--- /dev/null
+++ b/debian/patches/0001-upstream-backport-fix-compilation.patch
@@ -0,0 +1,120 @@
+From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
+Date: Wed, 25 Apr 2012 07:39:12 +0200
+Subject: upstream backport fix compilation
+
+---
+ setup.py |   68 +++++++++++++++++++++++++++-----------------------------------
+ 1 file changed, 29 insertions(+), 39 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 676d34f..d64b7ee 100644
+--- a/setup.py
++++ b/setup.py
+@@ -537,6 +537,7 @@ class build_doc_api(Command):
+         pass 
+         
+     def run(self):
++        #print("SKIPPING API");return
+         buildcmd = self.get_finalized_command('build_doc')
+         name = "auto_rst4api"
+         data = imp.find_module(name, [abspath('doc')])
+@@ -691,6 +692,14 @@ if sphinx:
+             return result
+ 
+     class build_doc(BuildDoc):
++        user_options = BuildDoc.user_options + \
++                     [('use-inkscape', None, 
++                       "Use inkscape for building the icon catalog (useful if QApplication cannot be used when building, but requires inkscape)")]
++        boolean_options = BuildDoc.boolean_options + ['use-inkscape']
++        
++        def initialize_options (self):
++            BuildDoc.initialize_options(self)
++            self.use_inkscape = False
+         
+         def has_doc_api(self):
+             return True
+@@ -698,10 +707,6 @@ if sphinx:
+         sub_commands = BuildDoc.sub_commands + [(('build_doc_api', has_doc_api))]
+         
+         def run(self):
+-            import PyQt4.Qt
+-            if PyQt4.Qt.qApp.instance() is None:
+-                self.app = PyQt4.Qt.QApplication([])
+-            
+             try:
+                 return self.doit()
+             except Exception,e:
+@@ -746,42 +751,21 @@ if sphinx:
+             # copy the tango icons to the build directory of documentation
+             target = os.path.join(build_dir, 'devel')
+             
+-            os.path.walk(resource, svg_to_png, (resource, target))
++            if not self.use_inkscape:
++                import PyQt4.Qt
++                if PyQt4.Qt.qApp.instance() is None:
++                    self.app = PyQt4.Qt.QApplication([])
++            
++            print("\tBuilding PNGs for icon catalog")   
++            os.path.walk(resource, svg_to_png, (resource, target, self.use_inkscape))
+             return
+-        
+-            elems = os.listdir(resource)
+-            for elem in elems:
+-                if elem.startswith("."):
+-                    continue
+-                abs_elem = os.path.join(resource, elem)
+-                if os.path.isfile(abs_elem):
+-                    if os.path.splitext(elem)[1][1:] in build_catalog.AllowedExt:
+-                        target_file = os.path.join(target, elem)
+-                        target_base, target_ext = os.path.splitext(target_file)
+-                        target_file = target_base + ".png"
+-                        if refresh or not os.path.isfile(target_file):
+-                            print("copying",abs_elem,'->',target_file,file=out)
+-                        #shutil.copyfile(abs_elem, target_file)
+-                        pixmap = PyQt4.Qt.QPixmap(abs_elem)
+-                        pix = pixmap.scaledToWidth(24, PyQt4.Qt.Qt.SmoothTransformation)
+-                        pix.save(target_file)
+-                elif os.path.isdir(abs_elem):
+-                    target_dir = os.path.join(target, elem)
+-                    target_dir_exists = os.path.isdir(target_dir)
+-                    copy_dir = refresh or not target_dir_exists
+-                    if copy_dir:
+-                        
+-                        
+-                        if target_dir_exists:
+-                            shutil.rmtree(target_dir)
+-                        print("copying",abs_elem,'->',target_dir,file=out)
+-                        shutil.copytree(abs_elem, target_dir)
+     
+     cmdclass['build_doc'] = build_doc
+ 
+ def svg_to_png(arg, dirname, fnames):
+-    import PyQt4.Qt
+-    resource, target = arg
++    resource, target, use_inkscape = arg
++    if not use_inkscape:
++        import PyQt4.Qt
+     relpath = os.path.relpath(dirname, start=resource)
+     path = os.path.join(target, relpath)
+     if not os.path.isdir(path):
+@@ -793,10 +777,16 @@ def svg_to_png(arg, dirname, fnames):
+             target_fname = fbase + ".png"
+             full_target_fname = os.path.join(path, target_fname)
+             if not os.path.isfile(full_target_fname):
+-                pixmap = PyQt4.Qt.QPixmap(full_source_fname)
+-                pix = pixmap.scaledToWidth(24, PyQt4.Qt.Qt.SmoothTransformation)
+-                ret = pix.save(full_target_fname)
+-                print("\tBuilding PNG",full_source_fname,'->',full_target_fname, "(%s)" % ret)
++                if use_inkscape:
++                    cmd = "inkscape -z -e '%s' -w 24 '%s' &>/dev/null"%(full_target_fname, full_source_fname)
++                    ok = not(os.system(cmd))
++                else:
++                    pixmap = PyQt4.Qt.QPixmap(full_source_fname)
++                    pix = pixmap.scaledToWidth(24, PyQt4.Qt.Qt.SmoothTransformation)
++                    ok = pix.save(full_target_fname)
++                print(ok and "[OK]" or "[FAIL]", full_source_fname,'->',full_target_fname)
++                
++                
+ 
+ setup(name             = 'taurus',
+       version          = Release.version,
diff --git a/debian/patches/series b/debian/patches/series
index 8f672ff..2b59c1f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-0001-fix-compilation.patch
+0001-upstream-backport-fix-compilation.patch
diff --git a/debian/rules b/debian/rules
index b9554b7..aa3b3f0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,10 @@ WITH_SPHINXDOC = $(shell if [ -x /usr/bin/dh_sphinxdoc ]; then echo "--with sphi
 get-orig-source:
 	uscan --force-download --upstream-version $(VERSION)
 
+override_dh_auto_build:
+	dh_auto_build -- --no-doc
+	python setup.py build_doc --use-inkscape
+
 override_dh_auto_install:
 	dh_auto_install -- --install-html=$(CURDIR)/debian/python-taurus-doc/usr/share/doc/python-taurus-doc/html
 	dh_numpy

-- 
framework for TANGO control system client applications



More information about the debian-science-commits mailing list