A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pypa/setuptools/issues/2739 below:

[BUG] Unusually named license_files not included in dist-info · Issue #2739 · pypa/setuptools · GitHub

setuptools version

setuptools===57.4.0

Python version

3.9.6

OS

Fedora Linux 33, x86_64

Additional environment information Description

I've tried to test out #2645 but including license files not named according to this pattern:

patterns = ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*')

Are not included in dist info.

Expected behavior

I expected that files explicitly listed in license_files will always be listed in METADATA under License-File: and will always be included in the dist-info directory regardless of their filename.

How to Reproduce

Consider this setup.py:

from setuptools import setup

setup(
    name='nested_dist',
    version='666',
    license_files=['LICENSE'],
)

And an empty LICENSE file.

Run:

$ python -c 'import setuptools.build_meta; setuptools.build_meta.__legacy__.prepare_metadata_for_build_wheel(".")'

Or:

$ python setup.py bdist_wheel

Or:

You'll see something like:

running dist_info
...
adding license file 'LICENSE'
...
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
...

The LICENSE file will be listed in METADATA under License-File: and it will be included in the dist-info directory.

Now rename LICENSE to DIFFERENT and adapt license_files accordingly:

from setuptools import setup

setup(
    name='nested_dist',
    version='666',
    license_files=['DIFFERENT'],
)

You'll get:

...
adding license file 'DIFFERENT'
...

The DIFFERENT file will be listed in METADATA under License-File: and it will not be included in the dist-info directory.

Output

See above.

Code of Conduct

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4