mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Combine preamble, wxWindows license and LGPL files into a single LICENSE.txt file
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,6 +16,7 @@ mydbstub.py*
|
||||
/tmp
|
||||
/dist
|
||||
/license
|
||||
/LICENSE.txt
|
||||
/*.egg-info
|
||||
/REV.txt
|
||||
/.idea
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
recursive-include wx **
|
||||
recursive-include license *.txt
|
||||
include LICENSE.txt
|
||||
|
||||
recursive-exclude wx .git
|
||||
recursive-exclude wx *.pyc
|
||||
|
||||
1
build.py
1
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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user