Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
ea7ef100
Commit
ea7ef100
authored
Jun 11, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#6263 fixed syntax error in distutils.cygwinccompiler
parent
d2dbee56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
cygwinccompiler.py
cygwinccompiler.py
+1
-1
tests/test_cygwinccompiler.py
tests/test_cygwinccompiler.py
+34
-1
No files found.
cygwinccompiler.py
View file @
ea7ef100
...
...
@@ -81,7 +81,7 @@ def get_msvcr():
# VS2008 / MSVC 9.0
return
[
'msvcr90'
]
else
:
raise
ValueError
(
"Unknown MS Compiler version %
i "
%
msc_V
er
)
raise
ValueError
(
"Unknown MS Compiler version %
s "
%
msc_v
er
)
class
CygwinCCompiler
(
UnixCCompiler
):
...
...
tests/test_cygwinccompiler.py
View file @
ea7ef100
...
...
@@ -8,7 +8,8 @@ import subprocess
from
distutils
import
cygwinccompiler
from
distutils.cygwinccompiler
import
(
CygwinCCompiler
,
check_config_h
,
CONFIG_H_OK
,
CONFIG_H_NOTOK
,
CONFIG_H_UNCERTAIN
,
get_versions
)
CONFIG_H_UNCERTAIN
,
get_versions
,
get_msvcr
)
from
distutils.tests
import
support
class
FakePopen
(
object
):
...
...
@@ -113,6 +114,38 @@ class CygwinCCompilerTestCase(support.TempdirManager,
res
=
get_versions
()
self
.
assertEquals
(
res
[
2
],
None
)
def
test_get_msvcr
(
self
):
# none
sys
.
version
=
(
'2.6.1 (r261:67515, Dec 6 2008, 16:42:21) '
'
\
n
[GCC 4.0.1 (Apple Computer, Inc. build 5370)]'
)
self
.
assertEquals
(
get_msvcr
(),
None
)
# MSVC 7.0
sys
.
version
=
(
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
'[MSC v.1300 32 bits (Intel)]'
)
self
.
assertEquals
(
get_msvcr
(),
[
'msvcr70'
])
# MSVC 7.1
sys
.
version
=
(
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
'[MSC v.1310 32 bits (Intel)]'
)
self
.
assertEquals
(
get_msvcr
(),
[
'msvcr71'
])
# VS2005 / MSVC 8.0
sys
.
version
=
(
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
'[MSC v.1400 32 bits (Intel)]'
)
self
.
assertEquals
(
get_msvcr
(),
[
'msvcr80'
])
# VS2008 / MSVC 9.0
sys
.
version
=
(
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
'[MSC v.1500 32 bits (Intel)]'
)
self
.
assertEquals
(
get_msvcr
(),
[
'msvcr90'
])
# unknown
sys
.
version
=
(
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
'[MSC v.1999 32 bits (Intel)]'
)
self
.
assertRaises
(
ValueError
,
get_msvcr
)
def
test_suite
():
return
unittest
.
makeSuite
(
CygwinCCompilerTestCase
)
...
...
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