Skip to content

Commit e16873d

Browse files
dnicolodirgommers
authored andcommitted
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 fc871b2 commit e16873d

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

Diff for: RELEASE.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ After that is done, you may release the project by following these steps:
1919

2020
#. Create the release commit
2121

22-
#. Bump the versions in ``meson.build`` and ``mesonpy/__init__.py``.
22+
#. Bump the versions in ``pyproject.toml``.
2323
#. Create ``CHANGELOG.rst`` section for the new release and fill it.
2424
#. The commit message should read: ``REL: set version to X.Y.Z``
2525

Diff for: 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

Diff for: 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

Diff for: 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)