示例#1
0
 def __init__(self, py_ver: PyVer, platform, system, *args, **kwargs):
     self.context = context(py_ver, platform, system)
     self.context_wheel = self.context.copy()
     self.context_wheel['extra'] = None
     self.py_ver_digits = py_ver.digits()
     self.platform = platform
     self.system = system
示例#2
0
 def __init__(self, py_ver: PyVer, platform, system, *args, **kwargs):
     self.context = context(py_ver, platform, system)
     self.context_wheel = self.context.copy()
     self.context_wheel['extra'] = None
     self.py_ver = py_ver
     self.py_ver_parsed = parse_ver(py_ver.python_full_version())
     self.py_ver_digits = py_ver.digits()
     self.platform = platform
     self.system = system
示例#3
0
 def __init__(self, py_ver: PyVer, data_dir, *args, **kwargs):
     super(DependencyDB, self).__init__(*args, **kwargs)
     self.data = LazyBucketDict(data_dir)
     self.context = context(py_ver)
     self.py_ver_digits = py_ver.digits()
     for name, releases in self.data.items():
         key = self._unify_key(name)
         if key != name:
             self.data[key] = self.data[name]
             del self.data[name]
示例#4
0
def do():
    providers_json = load_env('providers')

    conda_channels_json = load_env('conda_channels_json')
    disable_checks = load_env('disable_checks')
    nixpkgs_json = load_env('nixpkgs_json')
    out_file = load_env('out_file')
    provider_settings = ProviderSettings(providers_json)
    py_ver_str = load_env('py_ver_str')
    pypi_deps_db_src = load_env('pypi_deps_db_src')
    pypi_fetcher_commit = load_env('pypi_fetcher_commit')
    pypi_fetcher_sha256 = load_env('pypi_fetcher_sha256')
    requirements = load_env('requirements')

    platform, system = load_env('system').split('-')

    py_ver = PyVer(py_ver_str)
    nixpkgs = NixpkgsIndex(nixpkgs_json)
    deps_provider = CombinedDependencyProvider(
        conda_channels_json=conda_channels_json,
        nixpkgs=nixpkgs,
        provider_settings=provider_settings,
        pypi_deps_db_src=pypi_deps_db_src,
        py_ver=py_ver,
        platform=platform,
        system=system)
    generator = OverridesGenerator(
        py_ver,
        nixpkgs,
        pypi_fetcher_commit,
        pypi_fetcher_sha256,
        disable_checks,
        ResolvelibResolver(nixpkgs, deps_provider),
    )
    reqs = filter_reqs_by_eval_marker(parse_reqs(requirements),
                                      context(py_ver, platform, system))
    try:
        expr = generator.generate(reqs)
    except ResolutionImpossible as e:
        handle_resolution_impossible(e, requirements, providers_json,
                                     py_ver_str)
        exit(1)
    else:
        with open(out_file, 'w') as f:
            f.write(expr)
示例#5
0
 def __init__(self, py_ver: PyVer, *args, **kwargs):
     self.context = context(py_ver)
     self.context_wheel = self.context.copy()
     self.context_wheel['extra'] = None
     self.py_ver_digits = py_ver.digits()