Rosetta  2019.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
build Namespace Reference

Functions

def execute
 
def update_source_file
 
def get_compiler_family
 
def install_llvm_tool
 
def install_pybind11
 
def main
 
def is_dir_banned
 
def get_rosetta_system_include_directories
 
def get_rosetta_include_directories
 
def get_defines
 
def execute
 
def get_cmake_compiler_options
 
def install_llvm_tool
 
def get_compiler_version
 
def get_binding_build_root
 
def symlink
 
def symlink_tree
 
def link_supplemental_files
 
def setup_source_directory_links
 
def generate_rosetta_external_cmake_files
 
def generate_rosetta_cmake_files
 
def generate_cmake_file
 
def cmake_needs_to_be_run
 
def run_cmake
 
def generate_bindings
 
def build_generated_bindings
 
def generate_version_file
 
def generate_documentation
 
def create_package
 
def create_wheel
 

Variables

tuple PlatformBits = platform.architecture()
 
tuple _machine_name_ = os.uname()
 
string _python_version_ = '{}.{}'
 
string _pybind11_version_ = '2d0507db43cd5a117f7843e053b17dffca114107'
 
string _script_version_ = '1.1'
 
string _banned_dirs_ = 'src/utility/pointer'
 
string _banned_headers_ = 'utility/py/PyHelper.hh utility/keys/KeyCount.hh utility/keys/KeyLookup.functors.hh'
 
string _documentation_version_template_
 

Function Documentation

def build.build_generated_bindings (   rosetta_source_path)
Build generate bindings 

References execute(), pyrosetta.tests.distributed.test_dask.format, and get_binding_build_root().

Referenced by create_wheel().

def build.cmake_needs_to_be_run (   rosetta_source_path)
Perform some basic sanity checks on build directory to see if cmake was run before. This should help for cases when build script was aborted during rebuilds.

References get_binding_build_root().

Referenced by generate_bindings().

def build.create_package (   rosetta_source_path,
  path 
)
def build.create_wheel (   rosetta_source_path,
  wheel_path 
)
def build.execute (   message,
  command_line,
  return_ = 'status',
  until_successes = False,
  terminate_on_failure = True,
  silent = False 
)
def build.execute (   message,
  command_line,
  return_ = 'status',
  until_successes = False,
  terminate_on_failure = True,
  silent = False,
  silence_output = False 
)
def build.generate_bindings (   rosetta_source_path)
def build.generate_cmake_file (   rosetta_source_path,
  extra_sources 
)
def build.generate_documentation (   rosetta_source_path,
  path,
  version 
)
def build.generate_rosetta_cmake_files (   rosetta_source_path,
  prefix 
)
def build.generate_rosetta_external_cmake_files (   rosetta_source_path,
  prefix 
)
def build.generate_version_file (   rosetta_source_path,
  file_name 
)
def build.get_binding_build_root (   rosetta_source_path,
  source = False,
  build = False,
  documentation = False 
)
Calculate bindings build path using current platform and compilation settings and create dir if it is not there yet 

References get_compiler_family(), and get_compiler_version().

Referenced by build_generated_bindings(), cmake_needs_to_be_run(), create_package(), create_wheel(), generate_bindings(), generate_cmake_file(), generate_documentation(), link_supplemental_files(), run_cmake(), and setup_source_directory_links().

def build.get_cmake_compiler_options ( )
Get cmake compiler flags from Options.compiler 

Referenced by install_llvm_tool(), and run_cmake().

def build.get_compiler_family ( )
Try to guess compiler family using Options.compiler 

Referenced by execute(), get_binding_build_root(), and get_compiler_version().

def build.get_compiler_version ( )
def build.get_defines ( )
return list of #defines 

Referenced by generate_bindings(), and generate_cmake_file().

def build.get_rosetta_include_directories ( )
return list of include directories for compilation 

References binder.split().

Referenced by generate_bindings(), and generate_cmake_file().

def build.get_rosetta_system_include_directories ( )
return list of include directories for compilation 

References binder.split().

Referenced by generate_bindings(), and generate_cmake_file().

def build.install_llvm_tool (   name,
  source_location,
  prefix,
  debug,
  jobs = 1,
  clean = True,
  gcc_install_prefix = None 
)
Install and update (if needed) custom LLVM tool at given prefix (from config).
    Return absolute path to executable on success and terminate with error on failure

References execute(), pyrosetta.tests.distributed.test_dask.format, basic::database.open(), and fmt.print().

Referenced by create_wheel(), install_llvm_tool(), and main().

def build.install_llvm_tool (   name,
  source_location,
  prefix_root,
  debug,
  clean = True 
)
Install and update (if needed) custom LLVM tool at given prefix (from config).
    Return absolute path to executable on success and terminate with error on failure

References execute(), pyrosetta.tests.distributed.test_dask.format, get_cmake_compiler_options(), install_llvm_tool(), basic::database.open(), and fmt.print().

Referenced by build-and-run-tests.main().

def build.install_pybind11 (   prefix,
  clean = True 
)
Download and install PyBind11 library at given prefix. Install version specified by _pybind11_version_ sha1

References execute(), pyrosetta.tests.distributed.test_dask.format, and fmt.print().

Referenced by build-and-run-tests.main(), and main().

def build.is_dir_banned (   directory)

Referenced by generate_bindings().

def build.link_supplemental_files (   rosetta_source_path)
def build.main (   args)
Binding demo build/test script 
PyRosetta building script 

References pyrosetta.tests.distributed.test_dask.format, install_llvm_tool(), install_pybind11(), and fmt.print().

Referenced by create_wheel().

def build.run_cmake (   rosetta_source_path)
def build.setup_source_directory_links (   rosetta_source_path)
def build.symlink (   source,
  dest 
)
Similar to os.symlink but if dest is alread exisist and if type of *source and *dest does not match or if link points to different location : remove dest first

Referenced by link_supplemental_files(), and symlink_tree().

def build.symlink_tree (   source,
  dest 
)
Similar to symlink(...) above but recursivly recreate dir tree at dest and symlink all files

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

Referenced by link_supplemental_files().

def build.update_source_file (   file_name,
  data 
)
write data to a file but only if file does not exist or it content different from data 
write data to a file but only if file does not exist or it content different from data
    return True if file was written and False otherwise

References basic::database.open(), fmt.print(), and ObjexxFCL.read().

Referenced by execute(), binder::Context.generate(), generate_cmake_file(), generate_rosetta_cmake_files(), and generate_rosetta_external_cmake_files().

Variable Documentation

string build._banned_dirs_ = 'src/utility/pointer'
string build._banned_headers_ = 'utility/py/PyHelper.hh utility/keys/KeyCount.hh utility/keys/KeyLookup.functors.hh'
string build._documentation_version_template_
Initial value:
1 = '''
2 
3 .. _version-json-file:
4 
5 Version
6 -------
7 
8 .. code-block:: javascript
9 
10 '''
tuple build._machine_name_ = os.uname()
string build._pybind11_version_ = '2d0507db43cd5a117f7843e053b17dffca114107'
string build._python_version_ = '{}.{}'
string build._script_version_ = '1.1'
tuple build.PlatformBits = platform.architecture()