setup-unittests.py

来自「属性sosuo算法」· Python 代码 · 共 48 行

PY
48
字号
from distutils.core import setupfrom distutils.extension import Extensionimport py2appimport osimport sysimport shutilfrom Pyrex.Distutils import build_ext# The name of this platform.platform = 'osx'# Find the top of the source tree and set search pathroot = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),                    '..', '..', '..')# GCC3.3 on OS X 10.3.9 doesn't like ".."'s in the pathroot = os.path.normpath(root)sys.path[0:0]=['%s/platform/%s' % (root, platform), '%s/platform' % root, '%s/portable' % root,'%s/platform/%s/test' % (root, platform), '%s/portable/test' % root]# Only now may we import things from our own treeimport vlchelper.info# Get a list of additional resource files to includeresourceFiles = ['../Resources/%s' % x for x in os.listdir('../Resources')]resourceFiles.append('English.lproj')py2app_options = dict(    resources='%s/resources' % root,     plist='../Info.plist',)setup(    app=['unittests.py'],    data_files= resourceFiles,    options=dict(        py2app=py2app_options,    ),    ext_modules=[        #Add extra_compile_args to change the compile options        Extension("database",["%s/portable/database.pyx" % root]),        Extension("template",["%s/portable/template.pyx" % root]),        Extension("fasttypes",["%s/portable/fasttypes.cpp" % root],                  extra_objects=["/usr/local/lib/libboost_python-1_33.a"],                  include_dirs=["/usr/local/include/boost-1_33/"])        ],    cmdclass = {'build_ext': build_ext})

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?