Skip to content

Commit 330bf74

Browse files
dnicolodiFFY00
authored andcommitted
ENH: remove fallback that is never reached
Project._meson() calls Project._proc() that translates failures in running the command into a SystemExit exception.
1 parent c8dbaee commit 330bf74

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -791,11 +791,7 @@ def _meson(self, *args: str) -> None:
791791
return self._proc('meson', *args)
792792

793793
def _configure(self, reconfigure: bool = False) -> None:
794-
"""Configure Meson project.
795-
796-
We will try to reconfigure the build directory if possible to avoid
797-
expensive rebuilds.
798-
"""
794+
"""Configure Meson project."""
799795
sys_paths = mesonpy._introspection.SYSCONFIG_PATHS
800796
setup_args = [
801797
f'--prefix={sys.base_prefix}',
@@ -820,13 +816,7 @@ def _configure(self, reconfigure: bool = False) -> None:
820816
if reconfigure:
821817
setup_args.insert(0, '--reconfigure')
822818

823-
try:
824-
self._meson('setup', *setup_args)
825-
except subprocess.CalledProcessError:
826-
if reconfigure: # if failed reconfiguring, try a normal configure
827-
self._configure()
828-
else:
829-
raise
819+
self._meson('setup', *setup_args)
830820

831821
def _validate_metadata(self) -> None:
832822
"""Check the pyproject.toml metadata and see if there are any issues."""

0 commit comments

Comments
 (0)