Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b19f61cd
Commit
b19f61cd
authored
Nov 07, 2005
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch by pythonic <pythonic@gmail.com> to support Fedora
as Linux distro.
parent
5f323096
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Lib/platform.py
Lib/platform.py
+8
-2
No files found.
Lib/platform.py
View file @
b19f61cd
...
@@ -31,6 +31,9 @@
...
@@ -31,6 +31,9 @@
# Colin Kong, Trent Mick, Guido van Rossum
# Colin Kong, Trent Mick, Guido van Rossum
#
#
# History:
# History:
#
# <see CVS and SVN checkin messages for history>
#
# 1.0.3 - added normalization of Windows system name
# 1.0.3 - added normalization of Windows system name
# 1.0.2 - added more Windows support
# 1.0.2 - added more Windows support
# 1.0.1 - reformatted to make doc.py happy
# 1.0.1 - reformatted to make doc.py happy
...
@@ -104,7 +107,7 @@ __copyright__ = """
...
@@ -104,7 +107,7 @@ __copyright__ = """
"""
"""
__version__
=
'1.0.
2
'
__version__
=
'1.0.
4
'
import
sys
,
string
,
os
,
re
import
sys
,
string
,
os
,
re
...
@@ -217,9 +220,12 @@ def _dist_try_harder(distname,version,id):
...
@@ -217,9 +220,12 @@ def _dist_try_harder(distname,version,id):
_release_filename
=
re
.
compile
(
r'(\
w+)[-_](
release|version)'
)
_release_filename
=
re
.
compile
(
r'(\
w+)[-_](
release|version)'
)
_release_version
=
re
.
compile
(
r'([\
d.]+)[^(]*(?:
\((.+)\
))?
')
_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='',
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.
""" Tries to determine the name of the Linux OS distribution name.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment