Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
BuildBindings Namespace Reference

Classes

class  ModuleBuilder
 
class  NT
 
class  SubCall
 

Functions

def __init__
 
def __repr__
 
def main
 
def Sleep
 
def SleepPrecise
 
def execute
 
def print_
 
def mFork
 
def mWait
 
def _sub_execute_
 
def get_compiler_defines
 
def getCompilerOptions
 
def getLinkerOptions
 
def buildModules__old
 
def buildModules
 
def get_all_rosetta_objs
 
def prepareMiniLibs
 
def getAllRosettaSourceFiles
 
def calculate_source_modification_date
 
def get_vc_compile_options
 
def get_vc_link_options
 
def get_windows_compile_command_line
 
def get_windows_link_command_line
 
def split_obj_file_in_to_chunks
 
def BuildRosettaOnWindows
 
def windows_buildOneNamespace
 
def buildModule
 
def buildModule_UsingCppParser
 
def buildModule_One
 
def buildModule_All
 

Variables

tuple PlatformBits = platform.architecture()
 
string monolith_rosetta_library_name = 'rosetta'
 
 IncludeDict = None
 
dictionary IncludeDictNew = {}
 
list Jobs = []
 
tuple _SC_ = SubCall()
 
string _mac_os_site_settings_template_
 
dictionary _source_modification_date_cache_ = {}
 
string _TestInludes_ = ''
 

Function Documentation

def BuildBindings.__init__ (   self,
  entries 
)
def BuildBindings.__repr__ (   self)
def BuildBindings._sub_execute_ (   function,
  args,
  kwargs 
)
private
def BuildBindings.buildModule (   path,
  dest,
  include_paths,
  libpaths,
  runtime_libpaths,
  gccxml_path,
  binding_source_path 
)
Build one namespace and return dict of newly found heades.
testName = 'python/bindings/TestIncludes.py'
global _TestInludes_
_TestInludes_ += 'import rosetta.%s\n' % path.replace('/', '.')
f = file(testName, 'w');  f.write(_TestInludes_);  f.close()

References buildModule_One(), and buildModule_UsingCppParser().

Referenced by buildModules(), buildModules__old(), and main().

def BuildBindings.buildModule_All (   path,
  dest,
  include_paths,
  libpaths,
  runtime_libpaths,
  gccxml_path 
)
Non recursive build buinding for given dir name, and store them in dest.
    path - relative path to namespace
    dest - path to root file destination, actual dest will be dest + path

References exclude.exclude(), execute(), basic::options::OptionKeys::in::file.file, exclude.finalize(), extract_scores_and_constraints.join, main(), basic::database.open(), ObjexxFCL.read(), and binder.split().

def BuildBindings.buildModule_One (   path,
  dest,
  include_paths,
  libpaths,
  runtime_libpaths,
  gccxml_path 
)
Non recursive build buinding for given dir name, and store them in dest.
    path - relative path to namespace
    dest - path to root file destination, actual dest will be dest + path

    return dict of a newly found headers.

References exclude.exclude(), execute(), basic::options::OptionKeys::in::file.file, exclude.finalize(), getCompilerOptions(), getLinkerOptions(), extract_scores_and_constraints.join, ObjexxFCL.len(), basic::options::OptionKeys::relax::range.range, ObjexxFCL.read(), binder.replace(), binder.split(), and utility.startswith().

Referenced by buildModule().

def BuildBindings.buildModule_UsingCppParser (   path,
  dest,
  include_paths,
  libpaths,
  runtime_libpaths,
  gccxml_path,
  binding_source_path 
)
Non recursive build buinding for given dir name, and store them in dest.
    path - relative path to namespace
    dest - path to root file destination, actual dest will be dest + path

    return dict of a newly found headers.

References execute(), basic::options::OptionKeys::in::file.file, exclude.finalize(), exclude.finalize2(), BuildPackagedBindings.format, get_compiler_defines(), getCompilerOptions(), exclude.getIncludes(), getLinkerOptions(), exclude.isBanned(), extract_scores_and_constraints.join, ObjexxFCL.len(), mFork(), mWait(), tools.CppParser.parseAndWrapModule(), print_(), basic::options::OptionKeys::relax::range.range, and ObjexxFCL.read().

Referenced by buildModule().

def BuildBindings.buildModules (   paths,
  dest,
  include_paths,
  libpaths,
  runtime_libpaths,
  gccxml_path,
  binding_source_path 
)
recursive build buinding for given dir name, and store them in dest.

References buildModule(), BuildPackagedBindings.format, ObjexxFCL.len(), mWait(), and print_().

Referenced by main().

def BuildBindings.buildModules__old (   path,
  dest,
  include_paths,
  libpaths,
  runtime_libpaths,
  gccxml_path 
)
recursive build buinding for given dir name, and store them in dest.

References buildModule(), and exclude.isBanned().

def BuildBindings.BuildRosettaOnWindows (   build_dir,
  bindings_path,
  binding_source_path 
)
def BuildBindings.calculate_source_modification_date (   source,
  binding_source_path,
  ignore = set() 
)
Calculate source modification date (including .hh files) and return it as date object. We also cache results to mitigate IO delays...

References basic::options::OptionKeys::in::file.file, ObjexxFCL.len(), max(), binder.replace(), and binder.split().

Referenced by BuildRosettaOnWindows(), BuildBindings.ModuleBuilder.generateBindings(), and windows_buildOneNamespace().

def BuildBindings.execute (   message,
  command_line,
  return_ = False,
  untilSuccesses = False,
  print_output = True,
  verbose = True 
)
def BuildBindings.get_all_rosetta_objs (   mini_path)
def BuildBindings.get_compiler_defines ( )
def BuildBindings.get_vc_compile_options ( )
def BuildBindings.get_vc_link_options ( )
def BuildBindings.get_windows_compile_command_line (   source,
  output,
  include = '',
  define = '' 
)
def BuildBindings.get_windows_link_command_line (   source,
  output 
)
def BuildBindings.getAllRosettaSourceFiles ( )
return two lists: ([external] [rosetta]) source files 

References basic::options::OptionKeys::in::file.file, and ObjexxFCL.read().

Referenced by BuildRosettaOnWindows().

def BuildBindings.getCompilerOptions ( )
def BuildBindings.getLinkerOptions (   dynamic = True)
Return appropriate linking options based on platform info

Referenced by buildModule_One(), buildModule_UsingCppParser(), and prepareMiniLibs().

def BuildBindings.main (   args)
def BuildBindings.mFork (   tag = None,
  overhead = 0 
)
Check if number of child process is below Options.jobs. And if it is - fork the new pocees and return its pid.

References BuildPackagedBindings.format, ObjexxFCL.len(), and print_().

Referenced by buildModule_UsingCppParser(), BuildBindings.ModuleBuilder.generateBindings(), and BuildBindings.ModuleBuilder.linkBindings().

def BuildBindings.mWait (   tag = None,
  all_ = False 
)
Wait for process tagged with 'tag' for completion

References print_().

Referenced by buildModule_UsingCppParser(), and buildModules().

def BuildBindings.prepareMiniLibs (   mini_path,
  bindings_build_path,
  binding_source_path 
)
def BuildBindings.print_ (   msg,
  color = None,
  background = None,
  bright = False,
  blink = False,
  action = 'print',
  endline = True 
)
print string with color and background. Avoid printing and return results str instead if action is 'return'. Also check for 'Options.no_color'

References extract_scores_and_constraints.join.

Referenced by buildModule_UsingCppParser(), buildModules(), BuildBindings.ModuleBuilder.generateBindings(), main(), mFork(), and mWait().

def BuildBindings.Sleep (   time_,
  message,
  dict_ = {} 
)
def BuildBindings.SleepPrecise (   time_,
  message,
  dict_ = {} 
)
def BuildBindings.split_obj_file_in_to_chunks (   base_file_name,
  objs 
)
M$ Windows does not allow objs file list to be above 128k (WHO ON EARTH WROTE THAT?????) so we have to split out obj list in to multiple files
    Write list of objs in to files base_file_name-n while keepinng each file below 128k and return string conaining all written file names prefixed with @

References basic::options::OptionKeys::in::file.file, BuildPackagedBindings.format, and ObjexxFCL.len().

Referenced by BuildRosettaOnWindows().

def BuildBindings.windows_buildOneNamespace (   base_dir,
  dir_name,
  files,
  bindings_path,
  build_dir,
  binding_source_path,
  all_symbols = [],
  link = False 
)

Variable Documentation

string BuildBindings._mac_os_site_settings_template_
tuple BuildBindings._SC_ = SubCall()
dictionary BuildBindings._source_modification_date_cache_ = {}
string BuildBindings._TestInludes_ = ''
BuildBindings.IncludeDict = None
dictionary BuildBindings.IncludeDictNew = {}
list BuildBindings.Jobs = []

Referenced by go_main().

string BuildBindings.monolith_rosetta_library_name = 'rosetta'
tuple BuildBindings.PlatformBits = platform.architecture()