Skip to content

Commit

Permalink
MAINT: keep version number only in pyproject.toml
Browse files Browse the repository at this point in the history
mesonpy is not supposed to be used as a library, thus having the
version number in the __version__ attribute is not that useful.
Keeping the version number in only one place makes it impossible to
fail to keep the version number in sync. Having the version number in
pyproject.toml along the other metadata is the most obvious thing.
  • Loading branch information
dnicolodi committed Oct 21, 2024
1 parent 06a07cb commit 5f7f0f2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

project('meson-python', version: '0.18.0.dev0')
project('meson-python')

py = import('python').find_installation()

Expand Down
3 changes: 0 additions & 3 deletions mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
MesonArgs = Mapping[MesonArgsKeys, List[str]]


__version__ = '0.18.0.dev0'


_NINJA_REQUIRED_VERSION = '1.8.2'
_MESON_REQUIRED_VERSION = '0.63.3' # keep in sync with the version requirement in pyproject.toml

Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ requires = [

[project]
name = 'meson-python'
version = '0.18.0.dev0'
description = 'Meson Python build backend (PEP 517)'
readme = 'README.rst'
requires-python = '>= 3.7'
Expand All @@ -40,10 +41,6 @@ dependencies = [
'tomli >= 1.0.0; python_version < "3.11"',
]

dynamic = [
'version',
]

[project.optional-dependencies]
test = [
'build',
Expand Down

0 comments on commit 5f7f0f2

Please sign in to comment.