-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of glob depends on environment #69
Comments
@adamchainz Thanks for the report and suggestions. I will be using the |
raimon49
added a commit
that referenced
this issue
Jun 24, 2020
The 'LICENSE' is always selected when the following four LICENSE files exist: LICENSE LICENSE.APACHE LICENSE.BSD LICENSE.PSF
This issue is addressed in version 2.2.1. If your problem is resolved, please close this issue. |
@raimon49 thanks for the fix! That was really quick!! I can confirm that the issue is now resolved in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The way that
pip-licenses
finds license objects in a repo, is by globbingLICENSE*
,LICENCE*
andCOPYING*
. However, the output ofglob.glob
in Python seems to be dependant on the environment.pip-licenses/piplicenses.py
Lines 131 to 151 in 9c83259
This becomes an issue in repositories like
cryptography
, where you have 3 different license files:LICENSE.APACHE
,LICENSE.BSD
andLICENSE.PSF
. Therefore, depending on the environment,pip-licenses
will choose one or another.Suggested solution
One way to fix this would be to sort the output of
glob.glob()
, so that it's consistent regardless of the environment.The text was updated successfully, but these errors were encountered: