Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jun 8, 2024
1 parent e6557c6 commit 2a362f7
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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("")),
)
)

Expand Down

0 comments on commit 2a362f7

Please sign in to comment.