예제 #1
0
    def write_to_channel(self, dest):
        # Write the index to a channel. Useful to get conda to read it back in again
        # using conda.api.get_index().
        channel_subdir = os.path.join(dest, conda.config.subdir)
        if not os.path.exists(channel_subdir):
            os.mkdir(channel_subdir)
        write_repodata({'packages': self, 'info': {}}, channel_subdir)

        return channel_subdir
예제 #2
0
    def write_to_channel(self, dest):
        # Write the index to a channel. Useful to get conda to read it back in again
        # using conda.api.get_index().
        channel_subdir = os.path.join(dest, conda.config.subdir)
        if not os.path.exists(channel_subdir):
            os.mkdir(channel_subdir)
        write_repodata({'packages': self, 'info': {}}, channel_subdir)

        return channel_subdir
예제 #3
0
    def write_to_channel(self, dest):
        # Write the index to a channel. Useful to get conda to read it back in again
        # using conda.api.get_index().
        channel_subdir = os.path.join(dest, subdir)
        if not os.path.exists(channel_subdir):
            os.mkdir(channel_subdir)
        if hasattr(conda_build, 'api'):
            lock = get_lock(channel_subdir)
            write_repodata({'packages': self, 'info': {}}, channel_subdir, lock, config=conda_build.api.Config())
        else:
            write_repodata({'packages': self, 'info': {}}, channel_subdir)

        return channel_subdir
예제 #4
0
    def write_to_channel(self, dest):
        # Write the index to a channel. Useful to get conda to read it back in again
        # using conda.api.get_index().
        channel_subdir = os.path.join(dest, conda.config.subdir)
        if not os.path.exists(channel_subdir):
            os.mkdir(channel_subdir)
        if hasattr(conda_build, 'api'):
            lock = get_lock(channel_subdir)
            write_repodata({
                'packages': self,
                'info': {}
            },
                           channel_subdir,
                           lock,
                           config=conda_build.api.Config())
        else:
            write_repodata({'packages': self, 'info': {}}, channel_subdir)

        return channel_subdir
예제 #5
0
    if 1 or conda_manifest.config.DEBUG:
        args = parser.parse_args(["--envs", "../env.specs/lts.yaml", "--sources", "../sources.yaml"])
    else:
        args = parser.parse_args()

    sources = load_sources(args.sources)
    envs = load_envs(args.envs)

    for env in envs:
        src_index = compute_source_indices(env["sources"])
        index = resolve_index(src_index, env["sources"])

        r = conda.resolve.Resolve(index)
        full_list_of_packages = sorted(r.solve(env["packages"]))
        lines = []
        for pkg_name in full_list_of_packages:
            pkg = index[pkg_name]
            lines.append(("{pkg[name]: <20} {pkg[version]: <12} " "{pkg[build]: <12} {pkg[source]}".format(pkg=pkg)))

        with open(args.outfile.format(env=env), "w") as fh:
            fh.write("\n".join(lines))

        repodata_dir = "indices/index_for_{env[name]}/{plat}".format(env=env, plat=conda.config.subdir)

        if not os.path.exists(repodata_dir):
            os.makedirs(repodata_dir)
        from conda_build.index import write_repodata

        index = {"info": {}, "packages": index}
        write_repodata(index, repodata_dir)