mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Patch by pythonic <pythonic@gmail.com> to support Fedora
as Linux distro.
This commit is contained in:
		
							parent
							
								
									c6686b7c7e
								
							
						
					
					
						commit
						380f417e15
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		|  | @ -31,6 +31,9 @@ | |||
| #      Colin Kong, Trent Mick, Guido van Rossum | ||||
| # | ||||
| #    History: | ||||
| # | ||||
| #    <see CVS and SVN checkin messages for history> | ||||
| # | ||||
| #    1.0.3 - added normalization of Windows system name | ||||
| #    1.0.2 - added more Windows support | ||||
| #    1.0.1 - reformatted to make doc.py happy | ||||
|  | @ -104,7 +107,7 @@ | |||
| 
 | ||||
| """ | ||||
| 
 | ||||
| __version__ = '1.0.2' | ||||
| __version__ = '1.0.4' | ||||
| 
 | ||||
| import sys,string,os,re | ||||
| 
 | ||||
|  | @ -217,9 +220,12 @@ def _dist_try_harder(distname,version,id): | |||
| _release_filename = re.compile(r'(\w+)[-_](release|version)') | ||||
| _release_version = re.compile(r'([\d.]+)[^(]*(?:\((.+)\))?') | ||||
| 
 | ||||
| # Note:In supported_dists below we need 'fedora' before 'redhat' as in | ||||
| # Fedora redhat-release is a link to fedora-release. | ||||
| 
 | ||||
| def dist(distname='',version='',id='', | ||||
| 
 | ||||
|          supported_dists=('SuSE','debian','redhat','mandrake')): | ||||
|          supported_dists=('SuSE', 'debian', 'fedora', 'redhat', 'mandrake')): | ||||
| 
 | ||||
|     """ Tries to determine the name of the Linux OS distribution name. | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Marc-André Lemburg
						Marc-André Lemburg