diff --git a/MANIFEST.in b/MANIFEST.in index 879d1664..7efdd02d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,6 +5,7 @@ # recursive-include wx ** +recursive-include license *.txt recursive-exclude wx .git recursive-exclude wx *.pyc diff --git a/build.py b/build.py index 91238f76..f5c18b8d 100755 --- a/build.py +++ b/build.py @@ -9,7 +9,7 @@ # Author: Robin Dunn # # Created: 3-Dec-2010 -# Copyright: (c) 2010-2016 by Total Control Software +# Copyright: (c) 2010-2017 by Total Control Software # License: wxWindows License #---------------------------------------------------------------------- @@ -32,7 +32,7 @@ from buildtools.config import Config, msg, opj, posixjoin, loadETG, etg2sip, fi phoenixDir, wxDir, copyIfNewer, copyFile, \ macSetLoaderNames, \ getVcsRev, runcmd, textfile_open, getSipFiles, \ - getVisCVersion, getToolsPlatformName + getVisCVersion, getToolsPlatformName, updateLicenseFiles import buildtools.version as version @@ -1754,6 +1754,10 @@ def cmd_sdist(options, args): for name in glob.glob(posixjoin('wx', wc)): copyFile(name, destdir) + # Copy the license files from wxWidgets + updateLicenseFiles(cfg) + shutil.copytree('license', opj(PDEST, 'license')) + # Also add the waf executable, fetching it first if we don't already have it getWafCmd() copyFile('bin/waf-%s' % wafCurrentVersion, os.path.join(PDEST, 'bin')) diff --git a/buildtools/config.py b/buildtools/config.py index d71217bf..208d7ff6 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -16,16 +16,13 @@ import os import glob import fnmatch import re -import tempfile import shutil -import codecs import subprocess import platform from distutils.file_util import copy_file from distutils.dir_util import mkpath from distutils.dep_util import newer -from distutils.spawn import spawn import distutils.sysconfig @@ -907,3 +904,13 @@ def getToolsPlatformName(useLinuxBits=False): if useLinuxBits: name += platform.architecture()[0][:2] return name + + +def updateLicenseFiles(cfg): + from distutils.file_util import copy_file + from distutils.dir_util import mkpath + + mkpath('license') + for filename in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']: + copy_file(opj(cfg.WXDIR, 'docs', filename), opj('license',filename), update=1, verbose=1) + diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..067d6158 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +license-file = license/licence.txt diff --git a/setup.py b/setup.py index 58f4bf88..8b686471 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ # Author: Robin Dunn # # Created: 3-Nov-2010 -# Copyright: (c) 2010-2016 by Total Control Software +# Copyright: (c) 2010-2017 by Total Control Software # License: wxWindows License #---------------------------------------------------------------------- @@ -41,7 +41,7 @@ URL = "http://wxPython.org/" #DOWNLOAD_URL = "http://wxPython.org/download.php" #DOWNLOAD_URL = "http://wxpython.org/Phoenix/snapshot-builds/" DOWNLOAD_URL = "https://pypi.python.org/pypi/{}".format(NAME) -LICENSE = "wxWidgets Library License (LGPL derivative)" +LICENSE = "wxWindows Library License (https://opensource.org/licenses/wxwindows.php)" PLATFORMS = "WIN32,WIN64,OSX,POSIX" KEYWORDS = "GUI,wx,wxWindows,wxWidgets,cross-platform,user-interface,awesome" diff --git a/wscript b/wscript index 0f293e38..c888e05a 100644 --- a/wscript +++ b/wscript @@ -468,15 +468,12 @@ def build(bld): sys.path.insert(0, thisdir) from distutils.file_util import copy_file - from distutils.dir_util import mkpath - from buildtools.config import opj + from buildtools.config import opj, updateLicenseFiles cfg.finishSetup(bld.env.wx_config) - # update the license files - mkpath('license') - for filename in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']: - copy_file(opj(cfg.WXDIR, 'docs', filename), opj('license',filename), update=1, verbose=1) + # Copy the license files from wxWidgets + updateLicenseFiles(cfg) # create the package's __version__ module open(opj(cfg.PKGDIR, '__version__.py'), 'w').write(