Exemple #1
0
def patch_rez_binaries(dest_dir):
    venv_bin_path, py_executable = get_py_venv_executable(dest_dir)

    specs = get_specifications()

    # delete rez bin files written into virtualenv
    for name in specs.keys():
        filepath = os.path.join(venv_bin_path, name)
        if os.path.isfile(filepath):
            os.remove(filepath)

    # write patched bins instead. These go into 'bin/rez' subdirectory, which
    # gives us a bin dir containing only rez binaries. This is what we want -
    # we don't want resolved envs accidentally getting the venv's 'python'.
    dest_bin_path = os.path.join(venv_bin_path, "rez")
    if os.path.exists(dest_bin_path):
        shutil.rmtree(dest_bin_path)
    os.makedirs(dest_bin_path)

    maker = ScriptMaker(
        # note: no filenames are referenced in any specifications, so
        # source_dir is unused
        source_dir=None,
        target_dir=dest_bin_path)

    maker.executable = py_executable

    maker.make_multiple(
        specifications=specs.values(),
        # the -E arg is crucial - it means rez cli tools still work within a
        # rez-resolved env, even if PYTHONPATH or related env-vars would have
        # otherwise changed rez's behaviour
        options=dict(interpreter_args=["-E"]))
Exemple #2
0
    def test_1(self):
        """run -h option on every cli tool"""

        # skip if cli not available
        if not system.rez_bin_path:
            self.skipTest("Not a production install")

        for toolname in get_specifications().keys():
            if toolname.startswith('_'):
                continue

            binfile = os.path.join(system.rez_bin_path, toolname)
            subprocess.check_output([binfile, "-h"])
Exemple #3
0

setup(
    name="rez",
    version=_rez_version,
    description=("A cross-platform packaging system that can build and "
                 "install multiple version of packages, and dynamically "
                 "configure resolved environments at runtime."),
    keywords="package resolve version build install software management",
    long_description=None,
    url="https://github.com/nerdvegas/rez",
    author="Allan Johns",
    author_email="*****@*****.**",
    license="LGPL",
    entry_points={
        "console_scripts": get_specifications().values()
    },
    include_package_data=True,
    zip_safe=False,
    package_dir = {'': 'src'},
    packages=find_packages('src', exclude=["build_utils",
                                           "build_utils.*",
                                           "tests"]),
    package_data = {
        'rez':
            ['utils/logging.conf'] +
            ['README*'] +
            find_files('*', 'completion') +
            find_files('*', 'tests/data'),
        'rezplugins':
            find_files('rezconfig', root='rezplugins') +
Exemple #4
0
    long_description = f.read()

setup(
    name="rez",
    version=_rez_version,
    description=("A cross-platform packaging system that can build and "
                 "install multiple version of packages, and dynamically "
                 "configure resolved environments at runtime."),
    keywords="package resolve version build install software management",
    long_description=long_description,
    long_description_content_type='text/markdown',
    url="https://github.com/nerdvegas/rez",
    author="Allan Johns",
    author_email="*****@*****.**",
    license="LGPL",
    entry_points={"console_scripts": get_specifications().values()},
    include_package_data=True,
    zip_safe=False,
    package_dir={'': 'src'},
    packages=find_packages('src',
                           exclude=["build_utils", "build_utils.*", "tests"]),
    package_data={
        'rez':
        ['utils/logging.conf'] + ['README*'] + find_files('*', 'completion') +
        find_files('*', 'data') + find_files('*.exe', 'vendor/distlib'),
        'rezplugins':
        find_files('rezconfig', root='rezplugins') +
        find_files('*.cmake', 'build_system', root='rezplugins') +
        find_files('*', 'build_system/template_files', root='rezplugins'),
        'rezgui':
        find_files('rezguiconfig', root='rezgui') +