python-license-check icon indicating copy to clipboard operation
python-license-check copied to clipboard

Allow use on libraries built with Windows line endings.

Open FabianNiehaus opened this issue 4 years ago • 2 comments

We are currently having an issue with liccheck and version 17.3.0 of pyrsistent.

Liccheck always flags the package as unknown, due to the fact that there is a \r in the string, which is most likely an artifact from the Windows line break \r\n:

check unknown packages...
2 packages.
    pyrsistent (0.17.3): ['MIT License\r']
      dependency:
          pyrsistent << jsonschema

Other packages using the MIT license are parsed just fine.

I dug a bit into the metadata parsing and found that the metadata for pyrsistent: 17.3.0 indeed contains \r\n linebreaks, while all other packages have \n in their metadata. It probably got compiled on Windows with faulty settings regarding the line endings.

Is it possible to adjust the metadata parsing to support Windows line endings?

FabianNiehaus avatar Jun 24 '21 14:06 FabianNiehaus

I also opened an issue in the pyrsistent repository: https://github.com/tobgu/pyrsistent/issues/229

FabianNiehaus avatar Jun 24 '21 14:06 FabianNiehaus

I am having the same issue with: wrapt (1.12.1): ['BSD License\r'] termcolor (1.1.0): ['MIT License\r']

Is there a workaround for these windows line endings?

MortenGrum avatar Dec 29 '21 09:12 MortenGrum