A file filter that ignores platform-specific files in lib.
(dirname, names)
| 470 | |
| 471 | |
| 472 | def lib_platform_files(dirname, names): |
| 473 | """A file filter that ignores platform-specific files in lib.""" |
| 474 | path = Path(dirname) |
| 475 | if ( |
| 476 | path.parts[-3] == "lib" |
| 477 | and path.parts[-2].startswith("python") |
| 478 | and path.parts[-1] == "lib-dynload" |
| 479 | ): |
| 480 | return names |
| 481 | elif path.parts[-2] == "lib" and path.parts[-1].startswith("python"): |
| 482 | ignored_names = { |
| 483 | name |
| 484 | for name in names |
| 485 | if ( |
| 486 | name.startswith("_sysconfigdata_") |
| 487 | or name.startswith("_sysconfig_vars_") |
| 488 | or name == "build-details.json" |
| 489 | ) |
| 490 | } |
| 491 | elif path.parts[-1] == "lib": |
| 492 | ignored_names = { |
| 493 | name |
| 494 | for name in names |
| 495 | if name.startswith("libpython") and name.endswith(".dylib") |
| 496 | } |
| 497 | else: |
| 498 | ignored_names = set() |
| 499 | |
| 500 | return ignored_names |
| 501 | |
| 502 | |
| 503 | def lib_non_platform_files(dirname, names): |
no test coverage detected
searching dependent graphs…