Rosetta
Functions | Variables
build Namespace Reference

Functions

def execute (message, command_line, return_='status', until_successes=False, terminate_on_failure=True, silent=False, silence_output=False)
 
def update_source_file (file_name, data)
 
def get_compiler_family ()
 
def get_cmake_compiler_options ()
 
def install_llvm_tool (name, source_location, prefix_root, debug, compiler, jobs, gcc_install_prefix, clean=True)
 
def install_pybind11 (prefix, clean=True)
 
def main (args)
 
def is_dir_banned (directory)
 
def get_rosetta_system_include_directories ()
 
def get_rosetta_include_directories ()
 
def get_defines ()
 
def get_compiler_version ()
 
def get_binding_build_root (rosetta_source_path, source=False, build=False, documentation=False)
 
def symlink (source, dest)
 
def symlink_tree (source, dest)
 
def link_supplemental_files (rosetta_source_path)
 
def setup_source_directory_links (rosetta_source_path)
 
def generate_rosetta_external_cmake_files (rosetta_source_path, prefix)
 
def generate_rosetta_cmake_files (rosetta_source_path, prefix)
 
def generate_cmake_file (rosetta_source_path, extra_sources)
 
def cmake_needs_to_be_run (rosetta_source_path)
 
def run_cmake (rosetta_source_path)
 
def generate_bindings (rosetta_source_path)
 
def build_generated_bindings (rosetta_source_path)
 
def generate_version_file (rosetta_source_path, file_name)
 
def generate_documentation (rosetta_source_path, path, version)
 
def create_package (rosetta_source_path, path)
 
def create_wheel (rosetta_source_path, wheel_path)
 

Variables

 Platform
 
 PlatformBits = platform.architecture()[0][:2]
 
 _machine_name_ = os.uname()[1]
 
string _python_version_ = '{}.{}'.format(sys.version_info.major, sys.version_info.minor)
 
string _pybind11_version_ = '32c4d7e17f267e10e71138a78d559b1eef17c909'
 
string _script_version_ = '1.1'
 
string _banned_dirs_ = 'external/bcl src/utility/pointer'.split()
 
string _banned_headers_ = 'utility/py/PyHelper.hh utility/keys/KeyCount.hh utility/keys/KeyLookup.functors.hh'
 
 stdout
 
string _documentation_version_template_
 

Function Documentation

◆ build_generated_bindings()

def build.build_generated_bindings (   rosetta_source_path)
 Build generate bindings 

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

Referenced by create_wheel().

◆ cmake_needs_to_be_run()

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

◆ create_package()

def build.create_package (   rosetta_source_path,
  path 
)

◆ create_wheel()

def build.create_wheel (   rosetta_source_path,
  wheel_path 
)

◆ execute()

def build.execute (   message,
  command_line,
  return_ = 'status',
  until_successes = False,
  terminate_on_failure = True,
  silent = False,
  silence_output = False 
)

◆ generate_bindings()

def build.generate_bindings (   rosetta_source_path)

◆ generate_cmake_file()

def build.generate_cmake_file (   rosetta_source_path,
  extra_sources 
)

◆ generate_documentation()

def build.generate_documentation (   rosetta_source_path,
  path,
  version 
)

◆ generate_rosetta_cmake_files()

def build.generate_rosetta_cmake_files (   rosetta_source_path,
  prefix 
)

◆ generate_rosetta_external_cmake_files()

def build.generate_rosetta_external_cmake_files (   rosetta_source_path,
  prefix 
)

◆ generate_version_file()

def build.generate_version_file (   rosetta_source_path,
  file_name 
)

◆ get_binding_build_root()

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

◆ get_cmake_compiler_options()

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

Referenced by get_defines(), install_llvm_tool(), and run_cmake().

◆ get_compiler_family()

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

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

◆ get_compiler_version()

def build.get_compiler_version ( )

◆ get_defines()

def build.get_defines ( )

◆ get_rosetta_include_directories()

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

References binder.split().

Referenced by generate_bindings(), and generate_cmake_file().

◆ get_rosetta_system_include_directories()

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

◆ install_llvm_tool()

def build.install_llvm_tool (   name,
  source_location,
  prefix_root,
  debug,
  compiler,
  jobs,
  gcc_install_prefix,
  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 pyrosetta.tests.distributed.test_dask.format, get_cmake_compiler_options(), basic::database.open(), and print().

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

◆ install_pybind11()

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

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

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

◆ is_dir_banned()

def build.is_dir_banned (   directory)

Referenced by generate_bindings().

◆ link_supplemental_files()

def build.link_supplemental_files (   rosetta_source_path)

◆ main()

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

Referenced by create_wheel().

◆ run_cmake()

def build.run_cmake (   rosetta_source_path)

◆ setup_source_directory_links()

def build.setup_source_directory_links (   rosetta_source_path)

◆ symlink()

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

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

◆ update_source_file()

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 if(), basic::database.open(), print(), and ObjexxFCL.read().

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

Variable Documentation

◆ _banned_dirs_

string build._banned_dirs_ = 'external/bcl src/utility/pointer'.split()
private

◆ _banned_headers_

string build._banned_headers_ = 'utility/py/PyHelper.hh utility/keys/KeyCount.hh utility/keys/KeyLookup.functors.hh'
private

◆ _documentation_version_template_

string build._documentation_version_template_
private
Initial value:
1 = '''
2 
3 .. _version-json-file:
4 
5 Version
6 -------
7 
8 .. code-block:: javascript
9 
10 '''

◆ _machine_name_

build._machine_name_ = os.uname()[1]
private

◆ _pybind11_version_

string build._pybind11_version_ = '32c4d7e17f267e10e71138a78d559b1eef17c909'
private

◆ _python_version_

string build._python_version_ = '{}.{}'.format(sys.version_info.major, sys.version_info.minor)
private

◆ _script_version_

string build._script_version_ = '1.1'
private

◆ Platform

build.Platform

◆ PlatformBits

build.PlatformBits = platform.architecture()[0][:2]

◆ stdout

build.stdout