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
086e9eb8
Commit
086e9eb8
authored
Jul 06, 2014
by
Ned Deily
Browse files
Options
Browse Files
Download
Plain Diff
Issue #21923: merge from 3.4
parents
e64901cd
9c8e39e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
sysconfig.py
sysconfig.py
+2
-1
tests/test_sysconfig.py
tests/test_sysconfig.py
+22
-0
No files found.
sysconfig.py
View file @
086e9eb8
...
...
@@ -179,7 +179,8 @@ def customize_compiler(compiler):
# version and build tools may not support the same set
# of CPU architectures for universal builds.
global
_config_vars
if
not
_config_vars
.
get
(
'CUSTOMIZED_OSX_COMPILER'
,
''
):
# Use get_config_var() to ensure _config_vars is initialized.
if
not
get_config_var
(
'CUSTOMIZED_OSX_COMPILER'
):
import
_osx_support
_osx_support
.
customize_compiler
(
_config_vars
)
_config_vars
[
'CUSTOMIZED_OSX_COMPILER'
]
=
'True'
...
...
tests/test_sysconfig.py
View file @
086e9eb8
"""Tests for distutils.sysconfig."""
import
os
import
shutil
import
subprocess
import
sys
import
textwrap
import
unittest
from
distutils
import
sysconfig
...
...
@@ -174,6 +177,25 @@ class SysconfigTestCase(support.EnvironGuard, unittest.TestCase):
self
.
assertIsNotNone
(
vars
[
'SO'
])
self
.
assertEqual
(
vars
[
'SO'
],
vars
[
'EXT_SUFFIX'
])
def
test_customize_compiler_before_get_config_vars
(
self
):
# Issue #21923: test that a Distribution compiler
# instance can be called without an explicit call to
# get_config_vars().
with
open
(
TESTFN
,
'w'
)
as
f
:
f
.
writelines
(
textwrap
.
dedent
(
'''
\
from distutils.core import Distribution
config = Distribution().get_command_obj('config')
# try_compile may pass or it may fail if no compiler
# is found but it should not raise an exception.
rc = config.try_compile('int x;')
'''
))
p
=
subprocess
.
Popen
([
str
(
sys
.
executable
),
TESTFN
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
)
outs
,
errs
=
p
.
communicate
()
self
.
assertEqual
(
0
,
p
.
returncode
,
"Subprocess failed: "
+
outs
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
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