diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-03-03 20:07:27 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-03-03 20:07:27 (GMT) |
commit | a52b85262ae7c0ce3ba92ee7e933f5a449690b8c (patch) | |
tree | 6c9f71eaebce300f053df79d7885940f83926a0e /Lib/distutils/dist.py | |
parent | b6aff15183cf21fe829d3395c901817739c49839 (diff) | |
download | cpython-a52b85262ae7c0ce3ba92ee7e933f5a449690b8c.zip cpython-a52b85262ae7c0ce3ba92ee7e933f5a449690b8c.tar.gz cpython-a52b85262ae7c0ce3ba92ee7e933f5a449690b8c.tar.bz2 |
[Bug #693470] 'licence' as an alias for 'license' doesn't work.
This patch makes it work again.
Diffstat (limited to 'Lib/distutils/dist.py')
-rw-r--r-- | Lib/distutils/dist.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py index 08e2a4f..d313e7d 100644 --- a/Lib/distutils/dist.py +++ b/Lib/distutils/dist.py @@ -205,6 +205,15 @@ class Distribution: for (opt, val) in cmd_options.items(): opt_dict[opt] = ("setup script", val) + if attrs.has_key('licence'): + attrs['license'] = attrs['licence'] + del attrs['licence'] + msg = "'licence' distribution option is deprecated; use 'license'" + if warnings is not None: + warnings.warn(msg) + else: + sys.stderr.write(msg + "\n") + # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): @@ -966,7 +975,7 @@ class DistributionMetadata: "maintainer", "maintainer_email", "url", "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", - "contact_email", "licence", "classifiers", + "contact_email", "license", "classifiers", "download_url") def __init__ (self): |