1
0
鏡像自 https://github.com/arsenetar/dupeguru.git synced 2025-07-02 21:43:21 +00:00

Removed pluginbuilder usage in build script and replaced it with hscommon functions.

This commit is contained in:
Virgil Dupras 2012-09-10 15:37:57 -04:00
父節點 d417dbd2e3
當前提交 8efd3033a3
共有 3 個檔案被更改,包括 12 行新增9 行删除

1
README
查看文件

@ -39,7 +39,6 @@ OS X prerequisites
- XCode's command line tools - XCode's command line tools
- objp 1.1.0 (http://bitbucket.org/hsoft/objp) - objp 1.1.0 (http://bitbucket.org/hsoft/objp)
- pluginbuilder 1.1.0 (http://bitbucket.org/hsoft/pluginbuilder)
- appscript 1.0.0 for ME and PE (http://appscript.sourceforge.net/) - appscript 1.0.0 for ME and PE (http://appscript.sourceforge.net/)
- xibless 0.4.0 (https://bitbucket.org/hsoft/xibless) - xibless 0.4.0 (https://bitbucket.org/hsoft/xibless)

查看文件

@ -13,16 +13,18 @@ from optparse import OptionParser
import shutil import shutil
import json import json
import importlib import importlib
import compileall
from setuptools import setup, Extension from setuptools import setup, 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, move_all, copy_sysconfig_files_for_embed, copy_all, copy, OSXAppStructure, get_module_version, move_all, copy_sysconfig_files_for_embed, copy_all, OSXAppStructure,
build_cocoalib_xibless, fix_qt_resource_file, build_cocoa_ext) build_cocoalib_xibless, fix_qt_resource_file, build_cocoa_ext, copy_embeddable_python_dylib,
collect_stdlib_dependencies)
from hscommon import loc from hscommon import loc
from hscommon.plat import ISOSX from hscommon.plat import ISOSX
from hscommon.util import ensure_folder from hscommon.util import ensure_folder, delete_files_with_pattern
def parse_args(): def parse_args():
usage = "usage: %prog [options]" usage = "usage: %prog [options]"
@ -95,7 +97,6 @@ def build_cocoa(edition, dev):
build_cocoa_proxy_module() build_cocoa_proxy_module()
build_cocoa_bridging_interfaces(edition) build_cocoa_bridging_interfaces(edition)
print("Building the cocoa layer") print("Building the cocoa layer")
from pluginbuilder import copy_embeddable_python_dylib, collect_dependencies
copy_embeddable_python_dylib('build') copy_embeddable_python_dylib('build')
pydep_folder = op.join(app.resources, 'py') pydep_folder = op.join(app.resources, 'py')
if not op.exists(pydep_folder): if not op.exists(pydep_folder):
@ -106,16 +107,20 @@ def build_cocoa(edition, dev):
'me': ['core_me'], 'me': ['core_me'],
'pe': ['core_pe'], 'pe': ['core_pe'],
}[edition] }[edition]
tocopy = ['core', 'hscommon', 'cocoa/inter', 'cocoalib/cocoa'] + specific_packages tocopy = ['core', 'hscommon', 'cocoa/inter', 'cocoalib/cocoa', 'jobprogress', 'objp',
copy_packages(tocopy, 'build') 'send2trash'] + specific_packages
copy_packages(tocopy, pydep_folder)
sys.path.insert(0, 'build') sys.path.insert(0, 'build')
collect_dependencies('build/dg_cocoa.py', pydep_folder, excludes=['PyQt4']) collect_stdlib_dependencies('build/dg_cocoa.py', pydep_folder)
del sys.path[0] del sys.path[0]
if dev: if dev:
copy_packages(tocopy, pydep_folder, create_links=True) copy_packages(tocopy, pydep_folder, create_links=True)
# Views are not referenced by python code, so they're not found by the collector. # Views are not referenced by python code, so they're not found by the collector.
copy_all('build/inter/*.so', op.join(pydep_folder, 'inter')) copy_all('build/inter/*.so', op.join(pydep_folder, 'inter'))
copy_sysconfig_files_for_embed(pydep_folder) copy_sysconfig_files_for_embed(pydep_folder)
compileall.compile_dir(pydep_folder, force=True, legacy=True)
delete_files_with_pattern(pydep_folder, '*.py')
delete_files_with_pattern(pydep_folder, '__pycache__')
print("Compiling with WAF") print("Compiling with WAF")
os.chdir('cocoa') os.chdir('cocoa')
print_and_do(cocoa_compile_command(edition)) print_and_do(cocoa_compile_command(edition))

查看文件

@ -1,5 +1,4 @@
-r requirements.txt -r requirements.txt
objp>=1.2.0 objp>=1.2.0
pluginbuilder>=1.1.0
appscript>=1.0.0 appscript>=1.0.0
xibless>=0.4.1 xibless>=0.4.1