Skip to content

Commit

Permalink
mesonpy: support Python maintenance branches
Browse files Browse the repository at this point in the history
The version reported by the 3.10 CPython branch is "3.10.5+" which fails the
metadata check.

This strips any trailing '+' that may be on the end of the version string.

Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
tacaswell authored and FFY00 committed Jun 21, 2022
1 parent f2e6883 commit 9ea73a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def _validate_metadata(self) -> None:
# check if we are running on an unsupported interpreter
if self._metadata.requires_python:
self._metadata.requires_python.prereleases = True
if platform.python_version() not in self._metadata.requires_python:
if platform.python_version().rstrip('+') not in self._metadata.requires_python:
raise MesonBuilderError(
f'Unsupported Python version `{platform.python_version()}`, '
f'expected `{self._metadata.requires_python}`'
Expand Down

0 comments on commit 9ea73a3

Please sign in to comment.