diff --git a/rust2rpm/crate.py b/rust2rpm/crate.py index dbc15f7..6ad6947 100644 --- a/rust2rpm/crate.py +++ b/rust2rpm/crate.py @@ -137,7 +137,9 @@ def get_doc_files(path: str) -> list[str]: and not LICENSE_FILE_PATTERN.fullmatch(f) and not DOC_FILE_EXCLUDES.fullmatch(f) ): - results.append(os.path.relpath(os.path.join(root, f), path)) + relpath = os.path.relpath(os.path.join(root, f), path) + if not relpath.startswith("target/"): + results.append(relpath) results.sort() return results