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
b1a85413
Kaydet (Commit)
b1a85413
authored
Ara 30, 2008
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #4702: Throwing DistutilsPlatformError instead of IOError under win32 if MSVC is not found
üst
3bcb0ce9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
msvc9compiler.py
Lib/distutils/msvc9compiler.py
+2
-2
test_msvc9compiler.py
Lib/distutils/tests/test_msvc9compiler.py
+33
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/distutils/msvc9compiler.py
Dosyayı görüntüle @
b1a85413
...
...
@@ -247,7 +247,7 @@ def query_vcvarsall(version, arch="x86"):
result
=
{}
if
vcvarsall
is
None
:
raise
IO
Error
(
"Unable to find vcvarsall.bat"
)
raise
DistutilsPlatform
Error
(
"Unable to find vcvarsall.bat"
)
log
.
debug
(
"Calling 'vcvarsall.bat
%
s' (version=
%
s)"
,
arch
,
version
)
popen
=
subprocess
.
Popen
(
'"
%
s"
%
s & set'
%
(
vcvarsall
,
arch
),
stdout
=
subprocess
.
PIPE
,
...
...
@@ -255,7 +255,7 @@ def query_vcvarsall(version, arch="x86"):
stdout
,
stderr
=
popen
.
communicate
()
if
popen
.
wait
()
!=
0
:
raise
IO
Error
(
stderr
.
decode
(
"mbcs"
))
raise
DistutilsPlatform
Error
(
stderr
.
decode
(
"mbcs"
))
stdout
=
stdout
.
decode
(
"mbcs"
)
for
line
in
stdout
.
split
(
"
\n
"
):
...
...
Lib/distutils/tests/test_msvc9compiler.py
0 → 100644
Dosyayı görüntüle @
b1a85413
"""Tests for distutils.msvc9compiler."""
import
sys
import
unittest
from
distutils.errors
import
DistutilsPlatformError
class
msvc9compilerTestCase
(
unittest
.
TestCase
):
def
test_no_compiler
(
self
):
# makes sure query_vcvarsall throws
# a DistutilsPlatformError if the compiler
# is not found
if
sys
.
platform
!=
'win32'
:
# this test is only for win32
return
from
distutils.msvc9compiler
import
query_vcvarsall
def
_find_vcvarsall
(
version
):
return
None
from
distutils
import
msvc9compiler
old_find_vcvarsall
=
msvc9compiler
.
find_vcvarsall
msvc9compiler
.
find_vcvarsall
=
_find_vcvarsall
try
:
self
.
assertRaises
(
DistutilsPlatformError
,
query_vcvarsall
,
'wont find this version'
)
finally
:
msvc9compiler
.
find_vcvarsall
=
old_find_vcvarsall
def
test_suite
():
return
unittest
.
makeSuite
(
msvc9compilerTestCase
)
if
__name__
==
"__main__"
:
unittest
.
main
(
defaultTest
=
"test_suite"
)
Misc/NEWS
Dosyayı görüntüle @
b1a85413
...
...
@@ -100,6 +100,9 @@ Core and Builtins
Library
-------
- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
- Issue #4646: distutils was choking on empty options arg in the setup
function. Original patch by Thomas Heller.
...
...
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