mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fixed a PE build problem under linux where extensions would get complicated extensions, not found by the old move() scheme.
This commit is contained in:
parent
806d6be36c
commit
a6deb04049
20
build.py
20
build.py
@ -17,7 +17,7 @@ from distutils.extension import Extension
|
|||||||
|
|
||||||
from hscommon import sphinxgen
|
from hscommon import sphinxgen
|
||||||
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, filereplace,
|
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():
|
def parse_args():
|
||||||
usage = "usage: %prog [options]"
|
usage = "usage: %prog [options]"
|
||||||
@ -114,14 +114,6 @@ def build_localizations(ui, edition):
|
|||||||
build_all_qt_locs(op.join('qt', 'lang'), extradirs=[op.join('qtlib', 'lang')])
|
build_all_qt_locs(op.join('qt', 'lang'), extradirs=[op.join('qtlib', 'lang')])
|
||||||
|
|
||||||
def build_pe_modules(ui):
|
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")
|
print("Building PE Modules")
|
||||||
exts = [
|
exts = [
|
||||||
Extension("_block", [op.join('core_pe', 'modules', 'block.c'), op.join('core_pe', 'modules', 'common.c')]),
|
Extension("_block", [op.join('core_pe', 'modules', 'block.c'), op.join('core_pe', 'modules', 'common.c')]),
|
||||||
@ -141,13 +133,9 @@ def build_pe_modules(ui):
|
|||||||
script_args = ['build_ext', '--inplace'],
|
script_args = ['build_ext', '--inplace'],
|
||||||
ext_modules = exts,
|
ext_modules = exts,
|
||||||
)
|
)
|
||||||
move('_block.so', op.join('core_pe', '_block.so'))
|
move_all('_block_qt*', op.join('qt', 'pe'))
|
||||||
move('_block.pyd', op.join('core_pe', '_block.pyd'))
|
move_all('_block*', 'core_pe')
|
||||||
move('_block_osx.so', op.join('core_pe', '_block_osx.so'))
|
move_all('_cache*', 'core_pe')
|
||||||
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'))
|
|
||||||
|
|
||||||
def build_normal(edition, ui, dev):
|
def build_normal(edition, ui, dev):
|
||||||
print("Building dupeGuru {0} with UI {1}".format(edition.upper(), ui))
|
print("Building dupeGuru {0} with UI {1}".format(edition.upper(), ui))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user