Skip to content

Commit 753ce5b

Browse files
committed
MAINT: add _WheelBuilder.normalized_name
Signed-off-by: Filipe Laíns <[email protected]>
1 parent d098706 commit 753ce5b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

mesonpy/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,15 @@ def _has_extension_modules(self) -> bool:
187187
# Assume that all code installed in {platlib} is Python ABI dependent.
188188
return bool(self._wheel_files['platlib'])
189189

190+
@property
191+
def normalized_name(self) -> str:
192+
return self._project.name.replace('-', '_')
193+
190194
@property
191195
def basename(self) -> str:
192196
"""Normalized wheel name and version (eg. meson_python-1.0.0)."""
193197
return '{distribution}-{version}'.format(
194-
distribution=self._project.name.replace('-', '_'),
198+
distribution=self.normalized_name,
195199
version=self._project.version,
196200
)
197201

@@ -537,6 +541,9 @@ def build(self, directory: Path) -> pathlib.Path:
537541

538542
return wheel_file
539543

544+
def build_editable(self, directory: Path) -> pathlib.Path:
545+
self._build()
546+
540547

541548
MesonArgsKeys = Literal['dist', 'setup', 'compile', 'install']
542549
MesonArgs = Mapping[MesonArgsKeys, Collection[str]]

0 commit comments

Comments
 (0)