File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2021 The meson-python developers
2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ import pathlib
6+ import sys
7+
8+
9+ if sys .version_info >= (3 , 11 ):
10+ import tomllib
11+ else :
12+ import tomli as tomllib
13+
14+
15+ def test_pyproject_dependencies ():
16+ pyproject = pathlib .Path (__file__ ).parent .parent .joinpath ('pyproject.toml' )
17+ with open (pyproject , 'rb' ) as f :
18+ data = tomllib .load (f )
19+ build_dependencies = data ['build-system' ]['requires' ]
20+ project_dependencies = data ['project' ]['dependencies' ]
21+ # verify that all build dependencies are project dependencies
22+ assert not set (build_dependencies ) - set (project_dependencies ), \
23+ 'pyproject.toml is inconsistent: not all "build-system.requires" are in "project.dependencies"'
You can’t perform that action at this time.
0 commit comments