diff --git a/.gitignore b/.gitignore index 902ea744..05cd7dde 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ mydbstub.py* /tmp /dist /license +/LICENSE.txt /*.egg-info /REV.txt /.idea diff --git a/MANIFEST.in b/MANIFEST.in index 7efdd02d..41c49fb8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,7 @@ recursive-include wx ** recursive-include license *.txt +include LICENSE.txt recursive-exclude wx .git recursive-exclude wx *.pyc diff --git a/build.py b/build.py index f5c18b8d..c587ce5d 100755 --- a/build.py +++ b/build.py @@ -1757,6 +1757,7 @@ def cmd_sdist(options, args): # Copy the license files from wxWidgets updateLicenseFiles(cfg) shutil.copytree('license', opj(PDEST, 'license')) + copyFile('LICENSE.txt', PDEST) # Also add the waf executable, fetching it first if we don't already have it getWafCmd() diff --git a/buildtools/config.py b/buildtools/config.py index 208d7ff6..ef854786 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -910,7 +910,15 @@ def updateLicenseFiles(cfg): from distutils.file_util import copy_file from distutils.dir_util import mkpath + # Copy the license files from wxWidgets mkpath('license') - for filename in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']: + for filename in ['preamble.txt', 'licence.txt', 'lgpl.txt', 'gpl.txt']: copy_file(opj(cfg.WXDIR, 'docs', filename), opj('license',filename), update=1, verbose=1) + # Combine the relevant files into a single LICENSE.txt file + text = '' + for filename in ['preamble.txt', 'licence.txt', 'lgpl.txt']: + with open(opj('license', filename), 'r') as f: + text += f.read() + '\n\n' + with open('LICENSE.txt', 'w') as f: + f.write(text) diff --git a/setup.cfg b/setup.cfg index 067d6158..cd9ba012 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,3 @@ + [metadata] -license-file = license/licence.txt +license-file = LICENSE.txt