Skip to content

Commit

Permalink
main: ensure config_settings are passed to get_requires_for_build
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshilliard committed Jun 27, 2023
1 parent 7e0e798 commit 759ce7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/build/__main__.py
Expand Up @@ -113,7 +113,7 @@ def _build_in_isolated_env(
# first install the build dependencies
env.install(builder.build_system_requires)
# then get the extra required dependencies from the backend (which was installed in the call above :P)
env.install(builder.get_requires_for_build(distribution))
env.install(builder.get_requires_for_build(distribution, config_settings or {}))
return builder.build(distribution, outdir, config_settings or {})


Expand All @@ -127,7 +127,7 @@ def _build_in_current_env(
builder = _ProjectBuilder(srcdir)

if not skip_dependency_check:
missing = builder.check_dependencies(distribution)
missing = builder.check_dependencies(distribution, config_settings or {})
if missing:
dependencies = ''.join('\n\t' + dep for deps in missing for dep in (deps[0], _format_dep_chain(deps[1:])) if dep)
_cprint()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Expand Up @@ -135,7 +135,7 @@ def test_build_isolated(mocker, package_test_flit):

install.assert_any_call({'flit_core >=2,<3'})

required_cmd.assert_called_with('sdist')
required_cmd.assert_called_with('sdist', {})
install.assert_any_call(['dep1', 'dep2'])

build_cmd.assert_called_with('sdist', '.', {})
Expand Down

0 comments on commit 759ce7f

Please sign in to comment.