Victor Stinner avatar Victor Stinner committed 79935e8

hachoir-metadata: release 1.3.2

* Include hachoir_metadata/qt/dialog_ui.py in MANIFEST.in
* setup.py ignores pyuic4 error if dialog_ui.py is present
* setup.py installs hachoir_metadata.qt module

Comments (0)

Files changed (4)

hachoir-metadata/ChangeLog

+hachoir-metadata 1.3.2 (2010-02-04)
+===================================
+
+ * Include hachoir_metadata/qt/dialog_ui.py in MANIFEST.in
+ * setup.py ignores pyuic4 error if dialog_ui.py is present
+ * setup.py installs hachoir_metadata.qt module
+
 hachoir-metadata 1.3.1 (2010-01-28)
 ===================================
 

hachoir-metadata/MANIFEST.in

 include COPYING
 include gnome/hachoir
 include gnome/README
+include hachoir_metadata/qt/dialog.ui
 include INSTALL
 include kde/hachoir.desktop
 include kde/hachoir-metadata-kde

hachoir-metadata/hachoir_metadata/version.py

 PACKAGE = "hachoir-metadata"
-VERSION = "1.3.1"
+VERSION = "1.3.2"
 WEBSITE = "http://bitbucket.org/haypo/hachoir/wiki/hachoir-metadata"
 LICENSE = "GNU GPL v2"
 

hachoir-metadata/setup.py

         use_setuptools = False
 
     SCRIPTS = ["hachoir-metadata", "hachoir-metadata-gtk"]
+    PACKAGES = ["hachoir_metadata"]
+
     if "--disable-qt" not in sys.argv:
         from subprocess import call
         SCRIPTS.append("hachoir-metadata-qt")
-        command = ["pyuic4", "-o", "hachoir_metadata/qt/dialog_ui.py", "hachoir_metadata/qt/dialog.ui"]
-        exitcode = call(command)
+        dialog = "hachoir_metadata/qt/dialog"
+        dialog_python = dialog + "_ui.py"
+        command = ["pyuic4", "-o", dialog_python, dialog + ".ui"]
+        try:
+            exitcode = call(command)
+        except OSError, err:
+            exitcode = 1
         if exitcode:
-            print
-            print >>sys.stderr, "Unable to compile dialog.ui to dialog_ui.py using pyuic4"
-            print >>sys.stderr, 'Use command "%s --disable-qt" to skip hachoir-metadata-qt' % ' '.join(sys.argv)
-            print >>sys.stderr, 'pyuic4 is included in the PyQt4 development package'
-            sys.exit(1)
+            if path.exists(dialog_python):
+                print >>sys.stderr, "Warning: unable to recompile dialog.ui to dialog_ui.py using pyuic4"
+                print >>sys.stderr, '(use command "%s --disable-qt" to disable this warning)' % ' '.join(sys.argv)
+                print >>sys.stderr
+            else:
+                print >>sys.stderr, "ERROR: Unable to compile dialog.ui to dialog_ui.py using pyuic4"
+                print >>sys.stderr, 'Use command "%s --disable-qt" to skip hachoir-metadata-qt' % ' '.join(sys.argv)
+                print >>sys.stderr, 'pyuic4 is included in the PyQt4 development package'
+                sys.exit(1)
+        PACKAGES.append("hachoir_metadata.qt")
     else:
         sys.argv.remove("--disable-qt")
 
         "classifiers": CLASSIFIERS,
         "license": hachoir_metadata.LICENSE,
         "scripts": SCRIPTS,
-        "packages": ["hachoir_metadata"],
-        "package_dir": {"hachoir_metadata": "hachoir_metadata"},
+        "packages": PACKAGES,
     }
     if use_setuptools:
         install_options["install_requires"] = ["hachoir-core>=1.3", "hachoir-parser>=1.3"]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.