flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

flatbuffers 22.10.26 python distribution missing LICENSE.txt file

Open zookae opened this issue 2 years ago • 2 comments

What version of protobuf and what language are you using? Version: 22.10.26 (applies to all versions we tested) Language: Python

What operating system (Linux, Windows, ...) and version? Windows 11. Linux.

What runtime / compiler are you using (e.g., python version or gcc version) Pip install only.

What did you do? Download the flatbuffers python package:

mkdir _tmp
pip install -t _tmp flatbuffers==22.10.26
find ./_tmp -name "*LIC*" -type f

Shows nothing.

What did you expect to see The LICENSE.txt file included in the dist-info list.

What did you see instead? No LICENSE.txt file.

Anything else we should know about your project / environment We use a script to gather licenses for python packages we include when shipping our products. flatbuffers is one of the packages that does not include a license file for us to gather, requiring extra manual steps to collect. Ideally the solution would fix this for all flatbuffers versions going forward as we've encountered the same problem with many previous flatbuffers releases. Thanks!

zookae avatar Nov 08 '22 00:11 zookae

The license is specified in the publishing script: https://github.com/google/flatbuffers/blob/master/python/setup.py#L20 I'm not familiar with how python publishing works, so more information would be useful on how to fix it.

dbaileychess avatar Nov 13 '22 19:11 dbaileychess

The license is specified in the publishing script: https://github.com/google/flatbuffers/blob/master/python/setup.py#L20 I'm not familiar with how python publishing works, so more information would be useful on how to fix it.

Happy to help! This stack overflow answer is pretty comprehensive on how to use setup.py to include the license file with a wheel: https://stackoverflow.com/a/66443941

Ideally the wheel would include the LICENSE.txt file (here). For our use case that helps us ensure we catch any changes to licenses over versions.

You should be able to verify the file was included by doing the download step indicated above.

zookae avatar Nov 14 '22 22:11 zookae