On 09/09/26 3:57 pm, Lucas Nussbaum wrote:
> On 09/09/26 at 15:35 +1000, Stuart Prescott wrote:
>> One such set of files are in the `dist-info` directory of a python
>> module, where various pieces of metadata that represent how the module
>> was built, its dependencies (for the Python world) and licence data are
>> stored. For example:
>>
>> /usr/lib/python3/dist-packages/python_debian-1.1.1.dist-info
>> /usr/lib/python3/dist-packages/python_debian-1.1.1.dist-info/INSTALLER
>> /usr/lib/python3/dist-packages/python_debian-1.1.1.dist-info/METADATA
>> /usr/lib/python3/dist-packages/python_debian-1.1.1.dist-info/top_level.txt
>>
>> However, lintian has started flagging these files with
>> package-contains-documentation-outside-usr-share-doc.
>> ...
>
> 1. The screen requires a WHEEL file.
> 
> lib/Lintian/Screen/Python/Egg/Metadata.pm suppresses a .dist-info/ directory
> only when it contains both METADATA and WHEEL:
> 
>     return 1
>       if $item->dirname =~ m{ [^/] [.] dist-info / $}x
>       && defined $item->parent_dir->child('METADATA')
>       && defined $item->parent_dir->child('WHEEL');

I did notice this earlier and came to the same conclusion back then but did not 
dig in if `WHEEL` is
needed or not - I presumed it was and there is some problem with the package 
instead. But I looked
closely now and

https://packaging.python.org/en/latest/specifications/recording-installed-packages/#recording-installed-packages
 says

| The METADATA file is mandatory. All other files may be omitted at the 
installing tool’s
| discretion. Additional installer-specific files may be present.

So yes, it makes sense to remove `WHEEL`.

> 2. The exclusion filename list never actually takes effect.
> 
> lib/Lintian/Check/Documentation.pm already lists top_level.txt (and 
> robots.txt,
> entry_points.txt, etc.) in @NOT_DOCUMENTATION_FILE_REGEXES, but the guard is
> written as:
> 
>     and any { $item->basename !~ m{$_}xi } @NOT_DOCUMENTATION_FILE_REGEXES)
And yes, this looks absolutely wrong. I did some more cleanups here 
(top_level.txt is not quite needed here as it is
already being cared for in python check) and opened MR 
https://salsa.debian.org/lintian/lintian/-/merge_requests/793

Thank for your help with this, Lucas!

Best,
Nilesh

Reply via email to