예제 #1
0
    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)
예제 #2
0
파일: rezgui.py 프로젝트: lucienfostier/rez
    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)
예제 #3
0
파일: rezgui.py 프로젝트: rvsiy/rez
    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)
예제 #4
0
 def make_root(variant, root):
     binpath = make_dirs(root, "bin")
     filepath = os.path.join(binpath, "hello_world")
     create_executable_script(filepath, hello_world_source)
예제 #5
0
 def make_root(variant, root):
     binpath = make_dirs(root, "bin")
     filepath = os.path.join(binpath, "hello_world")
     create_executable_script(filepath, hello_world_source)
예제 #6
0
    # copy source
    src_path = os.path.join(site_path, "rezgui")
    dest_path = os.path.join(install_py_path, "rezgui")

    if os.path.exists(dest_path):
        print >> sys.stderr, "Package already installed."
        sys.exit(1)

    ignore = shutil.ignore_patterns("*.pyc", "*.pyo")
    shutil.copytree(src_path, dest_path, ignore=ignore)

    # create rez-gui tool
    install_bin_path = os.path.join(install_path, "bin")
    if not os.path.exists(install_bin_path):
        os.mkdir(install_bin_path)

    filepath = os.path.join(install_bin_path, "rez-gui")

    create_executable_script(filepath=filepath,
                             body=rez_gui_code,
                             program="python")

    # make read-only
    for root, dirs, files in os.walk(dest_path):
        for name in files:
            os.chmod(os.path.join(root, name), filemode)
        for name in dirs:
            os.chmod(os.path.join(root, name), dirmode)

    os.chmod(dest_path, dirmode)
예제 #7
0
    # copy source
    src_path = os.path.join(site_path, "rezgui")
    dest_path = os.path.join(install_py_path, "rezgui")

    if os.path.exists(dest_path):
        print >> sys.stderr, "Package already installed."
        sys.exit(1)

    ignore = shutil.ignore_patterns("*.pyc", "*.pyo")
    shutil.copytree(src_path, dest_path, ignore=ignore)

    # create rez-gui tool
    install_bin_path = os.path.join(install_path, "bin")
    if not os.path.exists(install_bin_path):
        os.mkdir(install_bin_path)

    filepath = os.path.join(install_bin_path, "rez-gui")

    create_executable_script(filepath=filepath, body=rez_gui_code,
                             program="python")

    # make read-only
    for root, dirs, files in os.walk(dest_path):
        for name in files:
            os.chmod(os.path.join(root, name), filemode)
        for name in dirs:
            os.chmod(os.path.join(root, name), dirmode)

    os.chmod(dest_path, dirmode)