def make_root(variant, root): binpath = make_dirs(root, "bin") link = os.path.join(binpath, "python") platform_.symlink(exepath, link) if builtin_paths: pypath = make_dirs(root, "python") for dirname, srcpath in builtin_paths.iteritems(): destpath = os.path.join(pypath, dirname) log("Copying builtins from %s to %s..." % (srcpath, destpath)) shutil.copytree(srcpath, destpath)
def make_root(variant, root): binpath = make_dirs(root, "bin") link = os.path.join(binpath, "python") platform_.symlink(exepath, link) if builtin_paths: pypath = make_dirs(root, "python") for dirname, srcpath in builtin_paths.items(): destpath = os.path.join(pypath, dirname) log("Copying builtins from %s to %s..." % (srcpath, destpath)) shutil.copytree(srcpath, destpath)
def make_root(variant, root): pypath = make_dirs(root, "python") copy_module(import_name, pypath) if found_tools: binpath = make_dirs(root, "bin") for tool, src in sorted(found_tools.items()): dest = os.path.join(binpath, tool) shutil.copy2(src, dest) for name_ in extra_module_names: copy_module(name_, pypath)
def make_root(variant, root): bin_path = make_dirs(root, 'bin') gcc_link_path = os.path.join(bin_path, 'gcc') platform_.symlink(gcc_path, gcc_link_path) gpp_link_path = os.path.join(bin_path, 'g++') platform_.symlink(gpp_path, gpp_link_path)
def make_root(variant, root): binpath = make_dirs(root, "bin") filepath = os.path.join(binpath, "hello_world") create_executable_script( filepath, hello_world_source, py_script_mode=ExecutableScriptMode.platform_specific)
def make_root(variant, root): binpath = make_dirs(root, "bin") pythonpath = make_dirs(root, "python") headerpath = make_dirs(root, "include") install_cmd = ' '.join([ 'pip', 'install', '--no-deps', '--ignore-installed', '--verbose', '--verbose', '--verbose', '--global-option="--verbose"', '--install-option="--install-headers={}"'.format(headerpath), '--install-option="--install-purelib={}"'.format(pythonpath), '--install-option="--install-platlib={}"'.format(pythonpath), '--install-option="--install-scripts={}"'.format(binpath), py_package_name ]) try: subprocess.check_output(install_cmd, cwd=package_dir) except subprocess.CalledProcessError as _: raise RuntimeError( 'Bind failed to install python package with command: {}'. format(install_cmd))
def make_root(variant, root): # copy source rez_path = rez.__path__[0] site_path = os.path.dirname(rez_path) rezgui_path = os.path.join(site_path, "rezgui") shutil.copytree(rezgui_path, os.path.join(root, "rezgui")) # create rez-gui executable binpath = make_dirs(root, "bin") filepath = os.path.join(binpath, "rez-gui") create_executable_script(filepath, rez_gui_source)
def make_root(variant, root): binpath = make_dirs(root, "bin") pythonpath = make_dirs(root, "python") headerpath = make_dirs(root, "include") install_cmd = ' '.join([ 'pip', 'install', '--no-deps', '--ignore-installed', '--verbose', '--verbose', '--verbose', '--global-option="--verbose"', '--install-option="--install-headers={}"'.format(headerpath), '--install-option="--install-purelib={}"'.format(pythonpath), '--install-option="--install-platlib={}"'.format(pythonpath), '--install-option="--install-scripts={}"'.format(binpath), py_package_name ]) try: subprocess.check_output( install_cmd, cwd=package_dir ) except subprocess.CalledProcessError as _: raise RuntimeError('Bind failed to install python package with command: {}'.format(install_cmd))
def make_root(variant, root): bindir = make_dirs(root, "bin") if os.name == "nt": fname = os.path.join(bindir, "python.bat") with open(fname, "w") as f: f.write(bat.format(python=exepath)) else: fname = os.path.join(bindir, "python") with open(fname, "w") as f: f.write(sh.format(python=exepath)) # Make executable st = os.stat(fname) os.chmod(fname, st.st_mode | stat.S_IEXEC)
def make_root(variant, root): binpath = make_dirs(root, "bin") filepath = os.path.join(binpath, "hello_world") create_executable_script(filepath, hello_world_source)
def make_root(variant, root): binpath = make_dirs(root, "bin") link = os.path.join(binpath, "cmake") platform_.symlink(exepath, link)
def make_root(variant, root): binpath = make_dirs(root, "bin") bat = os.path.join(binpath, "setupmsvc.bat") with open(bat, "w") as f: f.write(setupmsvc.format(msvc_root=msvc_root))
def make_root(variant, root): if platform_.name != 'windows': binpath = make_dirs(root, "bin") link = os.path.join(binpath, "python") platform_.symlink(exepath, link)
def make_root(variant, root): make_dirs(root, "python")