def link_swig(source): target = os.path.join("swig") tools.mkdir(target) for module, g in tools.get_modules(source): # they all go in the same dir, so don't remove old links tools.link_dir( os.path.join(g, "pyext"), target, match=["*.i"], clean=False) if os.path.exists(os.path.join(g, "pyext", "include")): tools.link_dir( os.path.join(g, "pyext", "include"), target, match=["*.i"], clean=False) tools.link( os.path.join( g, "pyext", "swig.i-in"), os.path.join( target, "IMP_%s.impl.i" % module))
def link_bin(options): path = os.path.join("module_bin", options.name) tools.mkdir(path, clean=False) for old in tools.get_glob([os.path.join(path, "*.py")]): os.unlink(old) tools.link_dir(os.path.join(options.source, "modules", options.name, "bin"), path, clean=False, match=["*.py"])
def link_py_apps(path): tools.mkdir("bin", clean=False) tools.link_dir(path, "bin", clean=False, match=["*"], filt=tools.filter_pyapps)
def link_benchmark(options, module): path = os.path.join("benchmark", options.name) tools.mkdir(path, clean=False) for old in tools.get_glob([os.path.join(path, "*.py")]): os.unlink(old) tools.link_dir(os.path.join(module.path, "benchmark"), path, clean=False, match=["*.py"])
def link_py_apps(options): path = os.path.join(options.source, "modules", options.name, "bin") tools.mkdir("bin", clean=False) tools.link_dir(path, "bin", clean=False, match=["*"], filt=tools.filter_pyapps)
def link_dox(source): for subdir in ("ref", "manual"): target = os.path.join("doxygen", subdir) tools.mkdir(target) tools.link_dir(os.path.join(source, "doc", "ref"), os.path.join("doc", "ref"), match=["*.png", "*.pdf", "*.gif"], clean=False) tools.link_dir(os.path.join(source, "doc", "manual", "images"), os.path.join("doc", "manual"), match=["*.png", "*.pdf", "*.gif"], clean=False)
def link_python(source): target=os.path.join("lib") tools.mkdir(target, clean=False) for module, g in tools.get_modules(source): path= os.path.join(target, "IMP", module) tools.mkdir(path, clean=False) for old in tools.get_glob([os.path.join(path, "*.py")]): # don't unlink the generated file if os.path.split(old)[1] != "__init__.py" and os.path.split(old)[1] != "_version_check.py": os.unlink(old) #print "linking", path tools.link_dir(os.path.join(g, "pyext", "src"), path, clean=False)
def link_headers(source): target=os.path.join("include") tools.mkdir(target) root=os.path.join(target, "IMP") tools.mkdir(root) for (module, g) in tools.get_modules(source): #print g, module if module== "SConscript": continue tools.link_dir(os.path.join(g, "include"), os.path.join(root, module), match=["*.h"]) tools.link_dir(os.path.join(g, "include", "internal"), os.path.join(root, module, "internal"), match=["*.h"])
def link_python(source): target = os.path.join("lib") tools.mkdir(target, clean=False) for module, g in tools.get_modules(source): path = os.path.join(target, "IMP", module) tools.mkdir(path, clean=False) for old in tools.get_glob([os.path.join(path, "*.py")]): # don't unlink the generated file if os.path.split(old)[1] != "__init__.py" and os.path.split( old)[1] != "_version_check.py": os.unlink(old) # print "linking", path tools.link_dir(os.path.join(g, "pyext", "src"), path, clean=False)
def link_benchmark(options): path = os.path.join("benchmark", options.name) tools.mkdir(path, clean=False) for old in tools.get_glob([os.path.join(path, "*.py")]): os.unlink(old) tools.link_dir( os.path.join(options.source, "modules", options.name, "benchmark"), path, clean=False, match=["*.py"])
def link_swig(source): target = os.path.join("swig") tools.mkdir(target) for module, g in tools.get_modules(source): # they all go in the same dir, so don't remove old links tools.link_dir(os.path.join(g, "pyext"), target, match=["*.i"], clean=False) if os.path.exists(os.path.join(g, "pyext", "include")): tools.link_dir(os.path.join(g, "pyext", "include"), target, match=["*.i"], clean=False) tools.link(os.path.join(g, "pyext", "swig.i-in"), os.path.join(target, "IMP_%s.impl.i" % module))
def link_python(modules): target = os.path.join("lib") tools.mkdir(target, clean=False) for module in modules: path = os.path.join(target, "IMP", '' if module.name == 'kernel' else module.name) tools.mkdir(path, clean=False) for old in tools.get_glob([os.path.join(path, "*.py")]): # don't unlink the generated file if os.path.split(old)[1] != "__init__.py" and os.path.split( old)[1] != "_version_check.py": os.unlink(old) # print "linking", path tools.link_dir(os.path.join(module.path, "pyext", "src"), path, clean=False, make_subdirs=True)
def link_dox(source): target=os.path.join("doxygen") tools.mkdir(target) for module, g in tools.get_modules(source): tools.link_dir(os.path.join(g, "doc"), os.path.join("doc", "html", module), match=["*.png", "*.pdf"], clean=False) for app, g in tools.get_applications(source): tools.link_dir(g, os.path.join("doc", "html", app), match=["*.png", "*.pdf"], exclude=["README.md"], clean=False) tools.link_dir(os.path.join(source, "doc"), os.path.join("doc", "html"), match=["*.png", "*.pdf"], clean=False) tools.link_dir(os.path.join(source, "doc", "tutorial"), os.path.join("doc", "tutorial"), match=["*.png", "*.pdf"], clean=False)
def link_dox(source): target = os.path.join("doxygen") tools.mkdir(target) for module, g in tools.get_modules(source): tools.link_dir(os.path.join(g, "doc"), os.path.join("doc", "html", module), match=["*.png", "*.pdf", "*.gif"], clean=False) tools.link_dir(os.path.join(source, "doc"), os.path.join("doc", "html"), match=["*.png", "*.pdf", "*.gif"], clean=False) tools.link_dir(os.path.join(source, "doc", "tutorial"), os.path.join("doc", "tutorial"), match=["*.png", "*.pdf", "*.gif"], clean=False)
def link_headers(source): target = os.path.join("include") tools.mkdir(target) root = os.path.join(target, "IMP") tools.mkdir(root) for (module, g) in tools.get_modules(source): # print g, module modroot = os.path.join(root, '' if module == 'kernel' else module) if module == "SConscript": continue tools.link_dir(os.path.join(g, "include"), modroot, match=["*.h"]) tools.link_dir(os.path.join(g, "include", "internal"), os.path.join(modroot, "internal"), match=["*.h"]) # ick if os.path.exists(os.path.join(g, "include", "eigen3")): tools.link_dir(os.path.join(g, "include", "eigen3"), os.path.join(modroot, "eigen3"), match=["*"])
def link_headers(modules): target = os.path.join("include") tools.mkdir(target) root = os.path.join(target, "IMP") tools.mkdir(root) for module in modules: modroot = os.path.join(root, '' if module.name == 'kernel' else module.name) tools.link_dir(os.path.join(module.path, "include"), modroot, match=["*.h"]) tools.link_dir(os.path.join(module.path, "include", "internal"), os.path.join(modroot, "internal"), match=["*.h"]) # ick if os.path.exists(os.path.join(module.path, "include", "eigen3")): tools.link_dir(os.path.join(module.path, "include", "eigen3"), os.path.join(modroot, "eigen3"), match=["*"])
def link_data(source): target = os.path.join("data") tools.mkdir(target) for module, g in tools.get_modules(source): tools.link_dir(os.path.join(g, "data"), os.path.join(target, module))
def link_examples(source): target = os.path.join("doc", "examples") tools.mkdir(target) for module, g in tools.get_modules(source): tools.link_dir(os.path.join(g, "examples"), os.path.join(target, module))
def link_examples(source): target = os.path.join("doc", "examples") tools.mkdir(target) for module, g in tools.get_modules(source): tools.link_dir( os.path.join(g, "examples"), os.path.join(target, module))
def link_examples(modules): target = os.path.join("doc", "examples") tools.mkdir(target) for module in modules: tools.link_dir(os.path.join(module.path, "examples"), os.path.join(target, module.name))
def link_data(modules): target = os.path.join("data") tools.mkdir(target) for module in modules: tools.link_dir(os.path.join(module.path, "data"), os.path.join(target, module.name))
def link_py(path): tools.mkdir("bin", clean=False) tools.link_dir(path, "bin", clean=False, match=["*.py"], exclude=['dependencies.py'])
def link_py(path): tools.mkdir("bin", clean=False) tools.link_dir(path, "bin", clean=False, match=["*.py"])
def link_dox(source): target=os.path.join("doxygen") tools.mkdir(target) for module, g in tools.get_modules(source): tools.link_dir(os.path.join(g, "doc"), os.path.join(target, module)) tools.link_dir(os.path.join(g, "doc"), os.path.join("doc", "html"), match=["*.png", "*.pdf"], clean=False) doxygenize_readme(os.path.join(g, "README.md"), "doxygen", module) for app, g in tools.get_applications(source): tools.link_dir(g, os.path.join(target, app)) tools.link_dir(g, os.path.join("doc", "html"), match=["*.png", "*.pdf"], clean=False) doxygenize_readme(os.path.join(g, "README.md"), "doxygen", app) tools.link_dir(os.path.join(source, "doc"), os.path.join(target, "IMP")) tools.link_dir(os.path.join(source, "doc"), os.path.join("doc", "html"), match=["*.png", "*.pdf"], clean=False)