Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main: ensure config_settings are passed to get_requires_for_build #627

Merged
merged 1 commit into from Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/build/__main__.py
Expand Up @@ -112,7 +112,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 @@ -126,7 +126,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