From 9c1473b8773a5c9bc0b0a22d4bb9cf52595997ea Mon Sep 17 00:00:00 2001 From: hsoft Date: Sun, 7 Jun 2009 08:18:42 +0000 Subject: [PATCH] pe qt: adjusted to the new dg structure, and set v1.7.3 --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4024 --- pe/qt/app.py | 23 +++++++++++------------ pe/qt/build.py | 7 +++++-- pe/qt/gen.py | 4 ++-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/pe/qt/app.py b/pe/qt/app.py index f40580ad..a3b693e2 100644 --- a/pe/qt/app.py +++ b/pe/qt/app.py @@ -10,9 +10,8 @@ import os.path as op from PyQt4.QtGui import QImage import PIL.Image -from hs import fs -from hs.fs import phys -from hs.utils.str import get_file_ext +from hsfs import phys, IT_ATTRS, IT_MD5, IT_EXTRA +from hsutil.str import get_file_ext from dupeguru import data_pe from dupeguru.picture.cache import Cache @@ -27,24 +26,24 @@ from preferences_dialog import PreferencesDialog class File(phys.File): cls_info_map = { - 'size': fs.IT_ATTRS, - 'ctime': fs.IT_ATTRS, - 'mtime': fs.IT_ATTRS, - 'md5': fs.IT_MD5, - 'md5partial': fs.IT_MD5, - 'dimensions': fs.IT_EXTRA, + 'size': IT_ATTRS, + 'ctime': IT_ATTRS, + 'mtime': IT_ATTRS, + 'md5': IT_MD5, + 'md5partial': IT_MD5, + 'dimensions': IT_EXTRA, } def _initialize_info(self, section): super(File, self)._initialize_info(section) - if section == fs.IT_EXTRA: + if section == IT_EXTRA: self._info.update({ 'dimensions': (0,0), }) def _read_info(self, section): super(File, self)._read_info(section) - if section == fs.IT_EXTRA: + if section == IT_EXTRA: im = PIL.Image.open(unicode(self.path)) self._info['dimensions'] = im.size @@ -66,7 +65,7 @@ class Directory(phys.Directory): class DupeGuru(DupeGuruBase): LOGO_NAME = 'logo_pe' NAME = 'dupeGuru Picture Edition' - VERSION = '1.7.2' + VERSION = '1.7.3' DELTA_COLUMNS = frozenset([2, 5, 6]) def __init__(self): diff --git a/pe/qt/build.py b/pe/qt/build.py index 6e454952..9af18e34 100644 --- a/pe/qt/build.py +++ b/pe/qt/build.py @@ -9,6 +9,7 @@ # The release version is outdated. Use at least r672 on http://svn.pyinstaller.org/trunk import os +import os.path as op import shutil from app import DupeGuru @@ -17,8 +18,10 @@ def print_and_do(cmd): os.system(cmd) # Removing build and dist -shutil.rmtree('build') -shutil.rmtree('dist') +if op.exists('build'): + shutil.rmtree('build') +if op.exists('dist'): + shutil.rmtree('dist') version = DupeGuru.VERSION versioncomma = version.replace('.', ', ') + ', 0' diff --git a/pe/qt/gen.py b/pe/qt/gen.py index 8bec8d5b..7da1519c 100644 --- a/pe/qt/gen.py +++ b/pe/qt/gen.py @@ -30,9 +30,9 @@ os.chdir('..') os.chdir(op.join('modules', 'block')) os.system('python setup.py build_ext --inplace') -move(op.join('modules', 'block', '_block.so'), op.join('picture', '_block.so')) -move(op.join('modules', 'block', '_block.pyd'), op.join('picture', '_block.pyd')) os.chdir(op.join('..', '..')) +move(op.join('modules', 'block', '_block.so'), op.join('.', '_block.so')) +move(op.join('modules', 'block', '_block.pyd'), op.join('.', '_block.pyd')) print_and_do("pyuic4 details_dialog.ui > details_dialog_ui.py") print_and_do("pyuic4 preferences_dialog.ui > preferences_dialog_ui.py")