Skip to content

Commit

Permalink
Merge pull request #105 from raimon49/release-3.5.1
Browse files Browse the repository at this point in the history
Release 3.5.1
  • Loading branch information
raimon49 authored Jul 6, 2021
2 parents c298903 + 32512d4 commit 5121c4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## CHANGELOG

### 3.5.1

* Fix the order in which multiple licenses are output

### 3.5.0

* Handle multiple licenses better with options `--fail-on` and `--allow-only`
Expand Down
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ docutils==0.17.1
# readme-renderer
idna==2.10
# via requests
importlib-metadata==4.6.0
importlib-metadata==4.6.1
# via
# keyring
# twine
Expand All @@ -48,7 +48,7 @@ jeepney==0.6.0
# secretstorage
keyring==23.0.1
# via twine
packaging==20.9
packaging==21.0
# via
# bleach
# pytest
Expand Down Expand Up @@ -109,7 +109,7 @@ toml==0.10.2
# pep517
# pytest
# pytest-cov
tqdm==4.61.1
tqdm==4.61.2
# via twine
twine==3.4.1
# via -r dev-requirements.in
Expand Down
14 changes: 7 additions & 7 deletions piplicenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
open = open # allow monkey patching

__pkgname__ = 'pip-licenses'
__version__ = '3.5.0'
__version__ = '3.5.1'
__author__ = 'raimon'
__license__ = 'MIT'
__summary__ = ('Dump the software license list of '
Expand Down Expand Up @@ -248,7 +248,7 @@ def get_pkg_info(pkg):
sys.stderr.write(
"fail-on license {} was found for package "
"{}:{}".format(
'; '.join(failed_licenses),
'; '.join(sorted(failed_licenses)),
pkg_info['name'],
pkg_info['version'])
)
Expand All @@ -260,7 +260,7 @@ def get_pkg_info(pkg):
sys.stderr.write(
"license {} not in allow-only licenses was found"
" for package {}:{}".format(
'; '.join(uncommon_licenses),
'; '.join(sorted(uncommon_licenses)),
pkg_info['name'],
pkg_info['version'])
)
Expand All @@ -279,10 +279,10 @@ def create_licenses_table(
if field == 'License':
license_set = select_license_by_source(
args.from_, pkg['license_classifier'], pkg['license'])
license_str = '; '.join(license_set)
license_str = '; '.join(sorted(license_set))
row.append(license_str)
elif field == 'License-Classifier':
row.append('; '.join(pkg['license_classifier'])
row.append('; '.join(sorted(pkg['license_classifier']))
or LICENSE_UNKNOWN)
elif field.lower() in pkg:
row.append(pkg[field.lower()])
Expand All @@ -295,8 +295,8 @@ def create_licenses_table(

def create_summary_table(args: "CustomNamespace"):
counts = Counter(
'; '.join(select_license_by_source(
args.from_, pkg['license_classifier'], pkg['license']))
'; '.join(sorted(select_license_by_source(
args.from_, pkg['license_classifier'], pkg['license'])))
for pkg in get_packages(args))

table = factory_styled_table_with_args(args, SUMMARY_FIELD_NAMES)
Expand Down

0 comments on commit 5121c4c

Please sign in to comment.