question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packages with multiple LICENSES files not shown in --with-license-file

See original GitHub issue
$ pip install -U pip pip-licenses
$ pip install opencv-python-headless==4.2.0.34
$ pip-licenses --from=mixed --with-license-report

The opencv-python-headless wheels include two license files, LICENSE.txt and LICENSE-3RD-PARTY.txt, but only LICENSE-3RD-PARTY.txt is displayed. Could support be added to display both license files since some packages like opencv have multiple files covering different parts of the library.


Format LicensePath LicenseText
Plain/Plain Vertical \n \n\n
JSON JSON List [] JSON List []
CSV ;
HTML

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
raimon49commented, Aug 26, 2020

JSON can be represented as data in a list.

[
  {
    "licenses": ["BSD"],
    "name": "Django",
    "version": "2.0.2",
    "LicensePath": ["/path/to/LICENSE1", "/path/to/LICENSE2"],
    "LicenseText ": ["LICENSE Text 1", "ICENSE Text 2"]
  },
]

Users will find it useful to be able to pass the output to the | jq command.

Some kind of delimiter is required in CSV. But for example ; also appears in the Apache License 2.0. https://choosealicense.com/licenses/apache-2.0/

It’s a very vexing issue…

0reactions
johnthagencommented, Aug 30, 2020

I propose --with-license-file be replaced with --with-license-files so that it is more accurate, and --with-license-files changed to only support formats that can support license files (they need to be able to handle \n without breaking the table/output).

Formats supported with --with-license-files:

  • HTML
<table>
    <tr>
        <th>Name</th>
        <th>Version</th>
        <th>License</th>
        <th>LicenseFiles</th>
    </tr>
    <tr>
        <td>Django</td>
        <td>2.0.2</td>
        <td>BSD</td>
        <td>
          <ul>
            <li>License File Contents ...</li>
            <li>License File 2 Contents ...</li>
          </ul>
        </td>
    </tr>
</table>
  • JSON
[
  {
    "licenses": ["BSD"],
    "name": "Django",
    "version": "2.0.2",
    "LicensePath": ["/path/to/LICENSE1", "/path/to/LICENSE2"],
    "LicenseText ": ["LICENSE Text 1", "ICENSE Text 2"]
  },
]
  • JSON LicenseFinder This format does not take into account --with-license-file currently. Perhaps a warning or error should be thrown in this case?
  • Plain Vertical
pytest
5.3.4
MIT LICENSE
<LICENSE File 1 Contents>

<LICENSE File 2 Contents>

Other formats will result in a CLI error if combined with --with-license-files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip-licenses - PyPI
Dump the software license list of Python packages installed with pip. ... with the --with-license-file option, output the location of the package's license...
Read more >
License files—ArcGIS Pro | Documentation
A license file is a file that can be used to supply required authorization information in Single Use and Concurrent Use licensing.
Read more >
FLEXlm End User Manual
FLEXlm permits multiple redundant license manager daemons on three server nodes, allowing you to make your license available if any two out of...
Read more >
FLEXnet Publisher 11.6.1 License Administration Guide
One System with One License Server and Multiple License Files. ... The RESERVE keyword should not be used on packages and package suites...
Read more >
Troubleshooting Guide For OpenVPN Access Server Fixed ...
Multiple fixed license keys can be activated on the same Access Server, they just add ... Please make sure you do not copy/paste...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found