On 04. 06. 26 11:46, Marián Konček wrote:
I guess that if the plugin works by checking if files are accessed, any Python package that asks Python "what Python packages are installed?" (== each Python package using %pyproject macros) will access all the metadata files for all installed Python packages. Ergo, if I understand this correctly, no Python package (except for the 2 cases mentioned above) will ever be reported as unused. Is that so?
Correct, that is why the plugin has an option `exclude_accessed_files`. From Maven packaging I know that Maven, during its build reads all the metadata files to create an association between artifact names and POM and JAR files. This configuration option tells the plugin to ignore matching files.
As I mentioned my mock config contained this:
config_opts['plugin_conf']['unbreq_opts']['exclude_accessed_files'] = [
         '^/usr/share/maven-metadata/',
         '^/usr/lib/.build-id/',

]

I did not yet analyze how other build systems handle this but I would add more filters as soon as I discovered them.

Something like this:

^/usr/lib(64)?/python\d+\.\d+/site-packages/.+\.(egg|dist)-info/

--
Miro Hrončok
--
Phone: +420777974800

--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to