From 2a362f78f4633c0917721214eea3e04a068bb9ba Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 8 Jun 2024 12:01:02 +0200 Subject: [PATCH] test --- bindings/python/setup.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 0c78603203..9e4bb7546a 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -97,7 +97,10 @@ def b2_escape(value: str) -> str: def write_b2_python_config( - include_dirs: Sequence[str], library_dirs: Sequence[str], config: IO[str] + include_dirs: Sequence[str], + library_dirs: Sequence[str], + ext_suffix: str, + config: IO[str], ) -> None: write = config.write # b2 keys python environments by X.Y version, breaking ties by matching @@ -150,14 +153,7 @@ def write_b2_python_config( # other words we apply debian's override everywhere, and hope no other # overrides ever disagree with us. - ext_suffix = sysconfig.get_config_var("EXT_SUFFIX") - # work-around - if sys.version_info < (3, 10) and sys.platform == "Windows": - import imp - - ext_suffix = imp.get_suffixes()[0] - - ext_suffix = str(ext_suffix or "") + print(f"ext_suffix: {ext_suffix}") # python.jam appends the platform-specific final suffix on its own. I can't # find a consistent value from sysconfig for this. @@ -434,7 +430,10 @@ def _configure_b2_with_distutils(self) -> Iterator[None]: if self._maybe_add_arg(f"python={sysconfig.get_python_version()}"): config_writers.append( functools.partial( - write_b2_python_config, self.include_dirs, self.library_dirs + write_b2_python_config, + self.include_dirs, + self.library_dirs, + os.path.basename(self.get_ext_fullpath("")), ) )