(
self,
name, # type: str
*requires # type: str
)
| 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 |
no test coverage detected