Rosetta
 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 
)

Definition at line 44 of file BuildBindings.py.

Referenced by src.defineEnergyMethodCreator().

def BuildBindings.__repr__ (   self)
def BuildBindings._sub_execute_ (   function,
  args,
  kwargs 
)
private

Definition at line 588 of file BuildBindings.py.

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()

Definition at line 1526 of file BuildBindings.py.

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

Definition at line 2578 of file BuildBindings.py.

References exclude.exclude(), execute(), exclude.finalize(), extract_scores_and_constraints.join, main(), basic::database.open(), ObjexxFCL.read(), and utility.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.

Definition at line 2303 of file BuildBindings.py.

References exclude.exclude(), execute(), exclude.finalize(), getCompilerOptions(), getLinkerOptions(), extract_scores_and_constraints.join, ObjexxFCL.len(), ObjexxFCL.read(), utility.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.

Definition at line 1955 of file BuildBindings.py.

References execute(), 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_(), 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.

Definition at line 737 of file BuildBindings.py.

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.

Definition at line 690 of file BuildBindings.py.

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...

Definition at line 1076 of file BuildBindings.py.

References ObjexxFCL.len(), max(), and utility.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 ( )

Definition at line 1111 of file BuildBindings.py.

References get_compiler_defines().

Referenced by get_windows_compile_command_line().

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 
)

Definition at line 1153 of file BuildBindings.py.

References get_vc_link_options(), and extract_scores_and_constraints.join.

Referenced by BuildRosettaOnWindows().

def BuildBindings.getAllRosettaSourceFiles ( )
return two lists: ([external] [rosetta]) source files 

Definition at line 1044 of file BuildBindings.py.

References ObjexxFCL.read().

Referenced by BuildRosettaOnWindows().

def BuildBindings.getCompilerOptions ( )

Definition at line 644 of file BuildBindings.py.

References get_compiler_defines().

Referenced by buildModule_One(), and buildModule_UsingCppParser().

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

Definition at line 670 of file BuildBindings.py.

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

def BuildBindings.main (   args)
Script to build Rosetta Python buidings.

Definition at line 63 of file BuildBindings.py.

References buildModule(), buildModules(), BuildRosettaOnWindows(), execute(), BuildPackagedBindings.format, prepareMiniLibs(), print_(), and utility.split().

Referenced by buildModule_All().

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.

Definition at line 529 of file BuildBindings.py.

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

Definition at line 558 of file BuildBindings.py.

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'

Definition at line 511 of file BuildBindings.py.

References extract_scores_and_constraints.join.

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

def BuildBindings.Sleep (   time_,
  message,
  dict_ = {} 
)
Fancy sleep function 

Definition at line 419 of file BuildBindings.py.

References ObjexxFCL.len(), and max().

Referenced by basic::database.safely_read_from_database(), and utility.sys_sleep().

def BuildBindings.SleepPrecise (   time_,
  message,
  dict_ = {} 
)
Fancy sleep function 

Definition at line 433 of file BuildBindings.py.

References ObjexxFCL.len(), and max().

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

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 @

Definition at line 1158 of file BuildBindings.py.

References 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_

Definition at line 894 of file BuildBindings.py.

tuple BuildBindings._SC_ = SubCall()

Definition at line 629 of file BuildBindings.py.

dictionary BuildBindings._source_modification_date_cache_ = {}

Definition at line 1075 of file BuildBindings.py.

string BuildBindings._TestInludes_ = ''

Definition at line 1524 of file BuildBindings.py.

BuildBindings.IncludeDict = None

Definition at line 55 of file BuildBindings.py.

dictionary BuildBindings.IncludeDictNew = {}

Definition at line 58 of file BuildBindings.py.

list BuildBindings.Jobs = []

Definition at line 60 of file BuildBindings.py.

Referenced by go_main().

string BuildBindings.monolith_rosetta_library_name = 'rosetta'

Definition at line 40 of file BuildBindings.py.

tuple BuildBindings.PlatformBits = platform.architecture()

Definition at line 24 of file BuildBindings.py.