Skip to content

Commit f3e87a7

Browse files
authored
fix compiled-objects-have-debug-symbols on macOS (#205)
1 parent 779258c commit f3e87a7

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

bin/run-smoke-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pydistcheck ./smoke-tests/*
7777
# other complex projects that do custom packaging stuff
7878
get-files apache-airflow
7979
pydistcheck \
80-
--ignore 'mixed-file-extensions' \
80+
--ignore 'mixed-file-extensions,unexpected-files' \
8181
./smoke-tests/*
8282

8383
get-files astropy

src/pydistcheck/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* validating configuration values
55
* updating configuuration from files
66
"""
7+
78
import os
89
from dataclasses import dataclass
910
from typing import Any, Dict

src/pydistcheck/shared_lib_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def _get_symbols(cmd_args: List[str], lib_file: str) -> str:
6565

6666
def _nm_reports_debug_symbols(tool_name: str, lib_file: str) -> Tuple[bool, str]:
6767
exported_symbols = _get_symbols(cmd_args=[tool_name], lib_file=lib_file)
68-
all_symbols = _get_symbols(cmd_args=[tool_name, "--debug-syms"], lib_file=lib_file)
69-
return exported_symbols != all_symbols, f"{tool_name} --debug-syms"
68+
all_symbols = _get_symbols(cmd_args=[tool_name, "-a"], lib_file=lib_file)
69+
return exported_symbols != all_symbols, f"{tool_name} -a"
7070

7171

7272
def _archive_member_has_debug_symbols(archive_file: str, file_info: _FileInfo) -> Tuple[bool, str]:

tests/test_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def test_debug_symbols_check_works(distro_file):
557557
assert result.exit_code == 1, result.output
558558
if "macosx" in distro_file:
559559
if platform.startswith("cygwin") or platform.startswith("win"):
560-
debug_cmd = r"'llvm\-nm \-\-debug\-syms \"lib/lib_baseballmetrics\.dylib\"'\."
560+
debug_cmd = r"'llvm\-nm \-a \"lib/lib_baseballmetrics\.dylib\"'\."
561561
else:
562562
# dsymutil works on both macOS and Linux
563563
debug_cmd = r"'dsymutil \-s \"lib/lib_baseballmetrics\.dylib\"'\."

0 commit comments

Comments
 (0)