Commit c9e8e312 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #693470] 'licence' as an alias for 'license' doesn't work.

   This patch makes it work again.
parent f5e186bb
...@@ -205,6 +205,15 @@ class Distribution: ...@@ -205,6 +205,15 @@ class Distribution:
for (opt, val) in cmd_options.items(): for (opt, val) in cmd_options.items():
opt_dict[opt] = ("setup script", val) 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 # Now work on the rest of the attributes. Any attribute that's
# not already defined is invalid! # not already defined is invalid!
for (key,val) in attrs.items(): for (key,val) in attrs.items():
...@@ -966,7 +975,7 @@ class DistributionMetadata: ...@@ -966,7 +975,7 @@ class DistributionMetadata:
"maintainer", "maintainer_email", "url", "maintainer", "maintainer_email", "url",
"license", "description", "long_description", "license", "description", "long_description",
"keywords", "platforms", "fullname", "contact", "keywords", "platforms", "fullname", "contact",
"contact_email", "licence", "classifiers", "contact_email", "license", "classifiers",
"download_url") "download_url")
def __init__ (self): def __init__ (self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment