Rosetta
|
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_ |
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().
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 | |||
) |
References pyrosetta.tests.distributed.test_dask.format, generate_version_file(), get_binding_build_root(), print(), and binder.split().
Referenced by create_wheel().
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 , |
|||
silence_output = False |
|||
) |
References pyrosetta.tests.distributed.test_dask.format, print(), and return.
Referenced by get_defines(), and build-and-run-tests.run_binder_self_tests().
def build.generate_bindings | ( | rosetta_source_path | ) |
Generate bindings using binder tools and return list of source files
References cmake_needs_to_be_run(), pyrosetta.tests.distributed.test_dask.format, generate_cmake_file(), get_binding_build_root(), get_defines(), get_rosetta_include_directories(), get_rosetta_system_include_directories(), is_dir_banned(), join(), ObjexxFCL.len(), basic::options::OptionKeys::in::file.list, basic::database.open(), print(), ObjexxFCL.read(), run_cmake(), setup_source_directory_links(), binder.split(), and str().
Referenced by create_wheel().
def build.generate_cmake_file | ( | rosetta_source_path, | |
extra_sources | |||
) |
generate cmake file in bindings source location
References pyrosetta.tests.distributed.test_dask.format, generate_rosetta_cmake_files(), generate_rosetta_external_cmake_files(), get_binding_build_root(), get_defines(), get_rosetta_include_directories(), get_rosetta_system_include_directories(), join(), basic::database.open(), and update_source_file().
Referenced by generate_bindings().
def build.generate_documentation | ( | rosetta_source_path, | |
path, | |||
version | |||
) |
References pyrosetta.tests.distributed.test_dask.format, generate_version_file(), get_binding_build_root(), basic::database.open(), and print().
Referenced by create_wheel().
def build.generate_rosetta_cmake_files | ( | rosetta_source_path, | |
prefix | |||
) |
References compile(), pyrosetta.tests.distributed.test_dask.format, join(), subloop_histogram.key, ObjexxFCL.len(), basic::database.open(), and update_source_file().
Referenced by generate_cmake_file().
def build.generate_rosetta_external_cmake_files | ( | rosetta_source_path, | |
prefix | |||
) |
def build.generate_version_file | ( | rosetta_source_path, | |
file_name | |||
) |
Referenced by create_package(), and generate_documentation().
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 get_defines(), install_llvm_tool(), and run_cmake().
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().
def build.get_compiler_version | ( | ) |
References pyrosetta.tests.distributed.test_dask.format, get_compiler_family(), and binder.split().
Referenced by get_binding_build_root().
def build.get_defines | ( | ) |
return list of #defines
References execute(), pyrosetta.tests.distributed.test_dask.format, get_cmake_compiler_options(), get_compiler_family(), if(), install_llvm_tool(), basic::database.open(), print(), ObjexxFCL.read(), return, and update_source_file().
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_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().
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().
def build.is_dir_banned | ( | directory | ) |
Referenced by generate_bindings().
def build.link_supplemental_files | ( | rosetta_source_path | ) |
References get_binding_build_root(), symlink(), and symlink_tree().
Referenced by create_wheel().
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().
def build.run_cmake | ( | rosetta_source_path | ) |
Build generate bindings
References pyrosetta.tests.distributed.test_dask.format, get_binding_build_root(), and get_cmake_compiler_options().
Referenced by generate_bindings().
def build.setup_source_directory_links | ( | rosetta_source_path | ) |
References pyrosetta.tests.distributed.test_dask.format, and get_binding_build_root().
Referenced by generate_bindings().
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 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().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
build.Platform |
build.PlatformBits = platform.architecture()[0][:2] |
build.stdout |
Referenced by calc_dist(), designloop(), good_geometry(), jitterloop(), kinclose(), main(), mutate_to_sequence(), noclash(), output_PCA(), print(), print_string_stdout(), read_covalent_connections_file(), relaxloop(), scoreall(), set_up_pose(), shift_center_and_PCA(), utility.stdout_is_tty(), superimposebb(), test(), vprint(), vprintf(), and wait_for_gdb().