maj = platform.python_version_tuple()[0] projName = 'pyd_unittests' exts = [ 'pydobject','make_object','embedded','func_wrap','class_wrap','def','struct_wrap', 'const' ]; string_imports = { 'func_wrap': ["important_message.txt"] } def ext(e): if maj == "3": return "%s3" % e elif maj == "2": return e else: assert False, "want python 2 or python 3" ext_modules = setup( name=projName, version='1.0', ext_modules=[ Extension(ext(e), [ext(e)+".d"], d_unittest=True, build_deimos=True, d_lump=True, string_imports = string_imports.get(e, []) ) for e in exts ], )
from celerid.support import setup, Extension projName = 'hello' setup( name=projName, version='0.1', ext_modules=[ Extension(projName, ['hello.d'], build_deimos=True, d_lump=True ) ], )
from celerid.support import setup, Extension projName = 'hello' setup( name=projName, version='0.1', ext_modules=[ Extension(projName, ['hello.d']) ], )
from celerid.support import setup, Extension projName = 'arraytest' setup( name=projName, version='0.1', ext_modules=[ Extension(projName, ['arraytest.d']) ], )
from celerid.support import setup, Extension projName = 'rawexample' setup( name=projName, version='0.1', ext_modules=[ Extension(projName, ['rawexample.d'], raw_only=True) ], )
# usage: python setup.py pydexe import sys if sys.argv[1] != 'pydexe': print( "use pydexe, not %s" % sys.argv[1] ) sys.exit(1) from celerid.support import setup, Extension import platform projName = "deimos_unittests" setup( name=projName, version='1.0', ext_modules=[ Extension("link", ['link.d'], build_deimos=True, d_lump=True, d_unittest=True ), Extension("object_", ['object_.d'], build_deimos=True, d_unittest=True, d_lump=True ), Extension("datetime", ['datetime.d'], build_deimos=True, d_unittest=True, d_lump=True ) ], )
"claro/graphics/cairooo/" ] def getSourcefiles(): sources = [] for dir in dirs: for f in os.listdir(dir): if f[-1:-3:-1] == "d.": sources.append(dir+f) sources.append(projName + '.d') return sources def getPythonRuntimeLib(): return 'python'+str(sys.version_info[0])+'.'+str(sys.version_info[1]) def getPythonLibraryDir(): if sys.platform == 'darwin': return [ '/Library/Frameworks/Python.framework/Versions/Current/lib/'+getPythonRuntimeLib()+'/config' ] return [] setup( name=projName, version='0.1', ext_modules= [ Extension(projName, getSourcefiles(), libraries=["claro-base", "claro-graphics", "cairo", getPythonRuntimeLib()], library_dirs=["../../src/claro/base/", "../../src/claro/graphics/"]+getPythonLibraryDir()) ], )
from celerid.support import setup, Extension projName = 'inherit' setup( name=projName, version='0.1', ext_modules=[ Extension(projName, ['inherit.d'], build_deimos=True) ], )
# usage: python setup.py pydexe import sys if sys.argv[1] != 'pydexe': print( "use pydexe, not %s" % sys.argv[1] ) sys.exit(1) from celerid.support import setup, Extension import platform maj = platform.python_version_tuple()[0] if maj == "3": projName = 'pyind3' srcs = ['pyind3.d'] elif maj == "2": projName = 'pyind' srcs = ['pyind.d'] else: assert False, "want python 2 or python 3" setup( name=projName, version='1.0', ext_modules=[ Extension(projName, srcs, build_deimos=True, d_lump=True ) ], )