mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	[Bug #693470] 'licence' as an alias for 'license' doesn't work.
This patch makes it work again.
This commit is contained in:
		
							parent
							
								
									b6aff15183
								
							
						
					
					
						commit
						a52b85262a
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		|  | @ -205,6 +205,15 @@ def __init__ (self, attrs=None): | ||||||
|                     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: | ||||||
|                          "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): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew M. Kuchling
						Andrew M. Kuchling