diff --git a/pyproject.toml b/pyproject.toml index 2f59351..b410269 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ ci = [ 'toml', 'pyinstaller', 'requests', + 'licensename', 'dephell_licenses' ] test = [ diff --git a/tools/Scripts/MakeInstaller.py b/tools/Scripts/MakeInstaller.py index bec998f..8cc6fa6 100644 --- a/tools/Scripts/MakeInstaller.py +++ b/tools/Scripts/MakeInstaller.py @@ -6,7 +6,7 @@ import time import requests import xml.dom.minidom -import dephell_licenses +import licensename, dephell_licenses import Functions, Config @@ -155,8 +155,10 @@ def installerConfigXml(): def appPackageXml(): try: message = f"create app package content" - license_id = CONFIG['project']['license'].replace('-only', '') - license_name = dephell_licenses.licenses.get_by_id(license_id).name.replace('"', "'") + license_file = CONFIG['project']['license']['file'] + license_id = licensename.from_file(license_file) + license_name = dephell_licenses.licenses.get_by_id(license_id).name + license_name = license_name.replace('"', "'") requires_root = 'false' raw_xml = Functions.dict2xml({ 'Package': {