Skip to content

Commit 5f7f0f2

Browse files
committed
MAINT: keep version number only in pyproject.toml
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.
1 parent 06a07cb commit 5f7f0f2

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: MIT
44

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

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

mesonpy/__init__.py

-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@
6565
MesonArgs = Mapping[MesonArgsKeys, List[str]]
6666

6767

68-
__version__ = '0.18.0.dev0'
69-
70-
7168
_NINJA_REQUIRED_VERSION = '1.8.2'
7269
_MESON_REQUIRED_VERSION = '0.63.3' # keep in sync with the version requirement in pyproject.toml
7370

pyproject.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ requires = [
1515

1616
[project]
1717
name = 'meson-python'
18+
version = '0.18.0.dev0'
1819
description = 'Meson Python build backend (PEP 517)'
1920
readme = 'README.rst'
2021
requires-python = '>= 3.7'
@@ -40,10 +41,6 @@ dependencies = [
4041
'tomli >= 1.0.0; python_version < "3.11"',
4142
]
4243

43-
dynamic = [
44-
'version',
45-
]
46-
4744
[project.optional-dependencies]
4845
test = [
4946
'build',

0 commit comments

Comments
 (0)