diff --git a/newsfragments/4217.bugfix.rst b/newsfragments/4217.bugfix.rst new file mode 100644 index 00000000000..7b9146dd50f --- /dev/null +++ b/newsfragments/4217.bugfix.rst @@ -0,0 +1,2 @@ +Fix argument order of ``--config-settings["--build-option"]`` arguments. +This was broken by `. \ No newline at end of file diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 0a0abfdae0d..2decd2d2140 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -369,7 +369,12 @@ def prepare_metadata_for_build_wheel( return self._bubble_up_info_directory(metadata_directory, ".dist-info") def _build_with_temp_dir( - self, setup_command, result_extension, result_directory, config_settings + self, + setup_command, + result_extension, + result_directory, + config_settings, + arbitrary_args=(), ): result_directory = os.path.abspath(result_directory) @@ -384,6 +389,7 @@ def _build_with_temp_dir( *setup_command, "--dist-dir", tmp_dist_dir, + *arbitrary_args, ] with no_install_setup_requires(): self.run_setup() @@ -402,10 +408,11 @@ def build_wheel( ): with suppress_known_deprecation(): return self._build_with_temp_dir( - ['bdist_wheel', *self._arbitrary_args(config_settings)], + ['bdist_wheel'], '.whl', wheel_directory, config_settings, + self._arbitrary_args(config_settings), ) def build_sdist(self, sdist_directory, config_settings=None):