Commits

Virgil Dupras committed 4e6cbef

Fixed a PE build problem under linux where extensions would get complicated extensions, not found by the old move() scheme.

Comments (0)

Files changed (2)

 df7b42aee7061f88f318d2903c046da53bbefbdc cocoalib
-29b756c67bd1c95611a062e507b713074c26a880 hscommon
+be8a7a29e2ac9b7201553fd942e4c2ecdcf01423 hscommon
 d0222a58ed8c13e0da306d5ba98c8bdeb06ec2bc qtlib
 
 from hscommon import sphinxgen
 from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, filereplace,
-    get_module_version, build_all_cocoa_locs, build_all_qt_locs)
+    get_module_version, build_all_cocoa_locs, build_all_qt_locs, move_all)
 
 def parse_args():
     usage = "usage: %prog [options]"
         build_all_qt_locs(op.join('qt', 'lang'), extradirs=[op.join('qtlib', 'lang')])
 
 def build_pe_modules(ui):
-    def move(src, dst):
-        if not op.exists(src):
-            return
-        if op.exists(dst):
-            os.remove(dst)
-        print('Moving %s --> %s' % (src, dst))
-        os.rename(src, dst)
-    
     print("Building PE Modules")
     exts = [
         Extension("_block", [op.join('core_pe', 'modules', 'block.c'), op.join('core_pe', 'modules', 'common.c')]),
         script_args = ['build_ext', '--inplace'],
         ext_modules = exts,
     )
-    move('_block.so', op.join('core_pe', '_block.so'))
-    move('_block.pyd', op.join('core_pe', '_block.pyd'))
-    move('_block_osx.so', op.join('core_pe', '_block_osx.so'))
-    move('_cache.so', op.join('core_pe', '_cache.so'))
-    move('_cache.pyd', op.join('core_pe', '_cache.pyd'))
-    move('_block_qt.so', op.join('qt', 'pe', '_block_qt.so'))
-    move('_block_qt.pyd', op.join('qt', 'pe', '_block_qt.pyd'))
+    move_all('_block_qt*', op.join('qt', 'pe'))
+    move_all('_block*', 'core_pe')
+    move_all('_cache*', 'core_pe')
 
 def build_normal(edition, ui, dev):
     print("Building dupeGuru {0} with UI {1}".format(edition.upper(), ui))