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
fceb4120
Commit
fceb4120
authored
Jun 28, 2011
by
Ned Deily
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9516: Port the revised deployment target processing for OSX from
distutils to packaging.
parent
5c727cb9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
Lib/packaging/util.py
Lib/packaging/util.py
+23
-0
No files found.
Lib/packaging/util.py
View file @
fceb4120
...
...
@@ -757,6 +757,9 @@ def split_leading_dir(path):
else
:
return
path
,
''
if
sys
.
platform
==
'darwin'
:
_cfg_target
=
None
_cfg_target_split
=
None
def
spawn
(
cmd
,
search_path
=
True
,
verbose
=
0
,
dry_run
=
False
,
env
=
None
):
"""Run another program specified as a command list 'cmd' in a new process.
...
...
@@ -781,6 +784,26 @@ def spawn(cmd, search_path=True, verbose=0, dry_run=False, env=None):
if
dry_run
:
logging
.
debug
(
'dry run, no process actually spawned'
)
return
if
sys
.
platform
==
'darwin'
:
global
_cfg_target
,
_cfg_target_split
if
_cfg_target
is
None
:
_cfg_target
=
sysconfig
.
get_config_var
(
'MACOSX_DEPLOYMENT_TARGET'
)
or
''
if
_cfg_target
:
_cfg_target_split
=
[
int
(
x
)
for
x
in
_cfg_target
.
split
(
'.'
)]
if
_cfg_target
:
# ensure that the deployment target of build process is not less
# than that used when the interpreter was built. This ensures
# extension modules are built with correct compatibility values
env
=
env
or
os
.
environ
cur_target
=
env
.
get
(
'MACOSX_DEPLOYMENT_TARGET'
,
_cfg_target
)
if
_cfg_target_split
>
[
int
(
x
)
for
x
in
cur_target
.
split
(
'.'
)]:
my_msg
=
(
'$MACOSX_DEPLOYMENT_TARGET mismatch: '
'now "%s" but "%s" during configure'
%
(
cur_target
,
_cfg_target
))
raise
PackagingPlatformError
(
my_msg
)
env
=
dict
(
env
,
MACOSX_DEPLOYMENT_TARGET
=
cur_target
)
exit_status
=
subprocess
.
call
(
cmd
,
env
=
env
)
if
exit_status
!=
0
:
msg
=
"command %r failed with exit status %d"
...
...
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