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
0f642620
Commit
0f642620
authored
Jun 01, 2018
by
Victor Stinner
Committed by
GitHub
Jun 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33692: Update pythoninfo from master (GH-7304)
* bpo-33717: pythoninfo: add CC --version (GH-7290)
parent
8b98d2a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
Lib/test/pythoninfo.py
Lib/test/pythoninfo.py
+29
-0
No files found.
Lib/test/pythoninfo.py
View file @
0f642620
...
@@ -497,6 +497,34 @@ def collect_test_support(info_add):
...
@@ -497,6 +497,34 @@ def collect_test_support(info_add):
call_func
(
info_add
,
'test_support.python_is_optimized'
,
support
,
'python_is_optimized'
)
call_func
(
info_add
,
'test_support.python_is_optimized'
,
support
,
'python_is_optimized'
)
def
collect_cc
(
info_add
):
import
subprocess
import
sysconfig
CC
=
sysconfig
.
get_config_var
(
'CC'
)
if
not
CC
:
return
try
:
import
shlex
args
=
shlex
.
split
(
CC
)
except
ImportError
:
args
=
CC
.
split
()
args
.
append
(
'--version'
)
proc
=
subprocess
.
Popen
(
args
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
)
stdout
=
proc
.
communicate
()[
0
]
if
proc
.
returncode
:
# CC --version failed: ignore error
return
text
=
stdout
.
splitlines
()[
0
]
text
=
normalize_text
(
text
)
info_add
(
'CC.version'
,
text
)
def
collect_info
(
info
):
def
collect_info
(
info
):
error
=
False
error
=
False
info_add
=
info
.
add
info_add
=
info
.
add
...
@@ -523,6 +551,7 @@ def collect_info(info):
...
@@ -523,6 +551,7 @@ def collect_info(info):
collect_decimal
,
collect_decimal
,
collect_testcapi
,
collect_testcapi
,
collect_resource
,
collect_resource
,
collect_cc
,
# Collecting from tests should be last as they have side effects.
# Collecting from tests should be last as they have side effects.
collect_test_socket
,
collect_test_socket
,
...
...
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