Skip to content

v6.13.0

Choose a tag to compare

@observeroftime01 observeroftime01 released this 04 May 06:55
· 243 commits to develop since this release
hookutils: conda: fix path matching in collect_dynamic_libs helper

Fix path matching in conda-specific `collect_dynamic_libs` helper.

The list of files obtained from `Distribution` contains instances
of `PackagePath`, which, even on Windows, inherits from
`pathlib.PurePosixPath`. As such, it does not properly handle
paths that contain Windows-style separator; and as seen in #9113,
those might sometimes end up being used in paths recorded in
distribution metadata. When this happens, the path prefix check in
`collect_dynamic_libs` always fails, and empty list is returned.

To fix the problem, turn `lib_dir` into `pathlib.PurePath`, and
cast `file` into `pathlib.PurePath` before comparing its `parent`
to `lib_dir`; this way, the comparison will be performed with
separators being properly normalized.