MCPcopy
hub / github.com/pex-tool/pex / DistMetadataFile

Class DistMetadataFile

pex/dist_metadata.py:150–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149@attr.s(frozen=True)
150class DistMetadataFile(object):
151 type = attr.ib() # type: MetadataType.Value
152 location = attr.ib() # type: Text
153 rel_path = attr.ib() # type: Text
154 project_name = attr.ib() # type: ProjectName
155 version = attr.ib() # type: Version
156 pkg_info = attr.ib(eq=False) # type: Message
157
158 def render_metadata_file_description(self, metadata_file_rel_path):
159 # type: (Text) -> str
160 return "{project_name} {version} metadata from {rel_path} at {location}".format(
161 project_name=self.project_name,
162 version=self.version,
163 rel_path=metadata_file_rel_path,
164 location=self.location,
165 )
166
167 def render_description(self):
168 # type: () -> str
169 return self.render_metadata_file_description(self.rel_path)
170
171 @property
172 def path(self):
173 # type: () -> Text
174 return os.path.join(self.location, self.rel_path)
175
176
177@attr.s(frozen=True)

Callers 5

create_dist_metadataFunction · 0.90
find_wheel_metadataFunction · 0.85
find_zip_sdist_metadataFunction · 0.85
find_tar_sdist_metadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected