Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
56013218
Unverified
Kaydet (Commit)
56013218
authored
May 31, 2018
tarafından
Victor Stinner
Kaydeden (comit)
GitHub
May 31, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-33717: pythoninfo: add CC --version (#7290)
Get the version of the C compiler.
üst
110bc014
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
pythoninfo.py
Lib/test/pythoninfo.py
+29
-0
No files found.
Lib/test/pythoninfo.py
Dosyayı görüntüle @
56013218
...
...
@@ -489,6 +489,34 @@ def collect_test_support(info_add):
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
):
error
=
False
info_add
=
info
.
add
...
...
@@ -515,6 +543,7 @@ def collect_info(info):
collect_decimal
,
collect_testcapi
,
collect_resource
,
collect_cc
,
# Collecting from tests should be last as they have side effects.
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