MCPcopy Index your code
hub / github.com/pex-tool/pex / create

Method create

tests/test_dependency_manager.py:37–54  ·  view source on GitHub ↗
(
        self,
        name,  # type: str
        *requires  # type: str
    )

Source from the content-addressed store, hash-verified

35 install_base_dir = attr.ib() # type: str
36
37 def create(
38 self,
39 name, # type: str
40 *requires # type: str
41 ):
42 # type: (...) -> FingerprintedDistribution
43 fingerprint = hashlib.sha256(name.encode("utf-8")).hexdigest()
44 location = os.path.join(self.install_base_dir, fingerprint, name)
45 os.makedirs(location)
46 return FingerprintedDistribution(
47 distribution=Distribution(
48 location=location,
49 metadata=create_dist_metadata(
50 project_name=name, version="0.1.0", requires_dists=requires, location=location
51 ),
52 ),
53 fingerprint=fingerprint,
54 )
55
56
57@pytest.fixture

Callers 3

dist_graphFunction · 0.45
test_exclude_root_reqsFunction · 0.45

Calls 6

DistributionClass · 0.90
create_dist_metadataFunction · 0.90
hexdigestMethod · 0.45
encodeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected