Skip to content

Commit

Permalink
Combine preamble, wxWindows license and LGPL files into a single LICE…
Browse files Browse the repository at this point in the history
…NSE.txt file
  • Loading branch information
RobinD42 committed Jun 23, 2017
1 parent e5b4c33 commit 1bcde3d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mydbstub.py*
/tmp
/dist
/license
/LICENSE.txt
/*.egg-info
/REV.txt
/.idea
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

recursive-include wx **
recursive-include license *.txt
include LICENSE.txt

recursive-exclude wx .git
recursive-exclude wx *.pyc
Expand Down
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 9 additions & 1 deletion buildtools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

[metadata]
license-file = license/licence.txt
license-file = LICENSE.txt

0 comments on commit 1bcde3d

Please sign in to comment.