google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library
https://flatbuffers.dev/
Apache License 2.0
23.37k stars 3.25k forks source link

`LICENSE` file missing from published Python wheel #8376

Closed johnthagen closed 3 months ago

johnthagen commented 3 months ago

Users use tools such as pip-licenses to build license reports for their applications from the third party dependencies. This helps them stay compliant and provide proper attribution to these libraries when they are redistributed. The option --with-license-file allows including the license file for dependencies.

The flatbuffers PyPI wheel currently is missing its LICENSE file, making pip-licenses fail to include the file in its license report.

This can be seen by navigating to the latest release on PyPI: https://pypi.org/project/flatbuffers/24.3.25/#files

And downloading and unzipping the wheel: https://files.pythonhosted.org/packages/41/f0/7e988a019bc54b2dbd0ad4182ef2d53488bb02e58694cd79d61369e85900/flatbuffers-24.3.25-py2.py3-none-any.whl

There is no licenses folder or LICENSE file in the .whl file.

It's maybe because this currently is declared as a str instead of a list[str]?

https://github.com/google/flatbuffers/blob/fb9afbafc7dfe226b9db54d4923bfb8839635274/python/setup.py#L21

Or perhaps because this is listed twice, once in setup.py above, and again in setup.cfg.

https://github.com/google/flatbuffers/blob/fb9afbafc7dfe226b9db54d4923bfb8839635274/python/setup.cfg#L5-L6

Or perhaps because this should be ../LICENSE rather than ../license.