[Patches] [ python-Patches-1488098 ] MacOSX: distutils support for -arch and -isysroot flags
SourceForge.net
noreply at sourceforge.net
Mon May 15 09:41:41 CEST 2006
Patches item #1488098, was opened at 2006-05-13 14:13
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1488098&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils and setup.py
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Ronald Oussoren (ronaldoussoren)
Assigned to: Nobody/Anonymous (nobody)
Summary: MacOSX: distutils support for -arch and -isysroot flags
Initial Comment:
This flag adds specific support for the -arch and -isysroot flags of GCC
on MacOSX 10.4 or later.
The patch consists of two parts:
1) Remove these flags (and their arguments) from the base CFLAGS/
LDFLAGS when compiling extensions on OSX 10.3 or earlier because GCC
doesn't support those arguments in the version of GCC that is shipped
what the version of the OS.
2) Strip -arch and -isysroot (again including their arguments) from the
base CFLAGS/LDFLAGS when the user has specified new values for them
in the extra_compile_args and extra_link args.
The second part is needed because -isysroot can only be specified once
and the -arch option is incremental, without this patch you cannot
compile using a different SDK or for fewer architectures.
A reason for wanting to do the latter is software like psyco that is only
fully supported on one of the architectures for OSX.
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-05-15 00:41
Message:
Logged In: YES
user_id=33168
I don't see any obvious problems with the patch. I have
some nits though:
* This is pretty complex: int(os.uname()[2].split('.')[0])
I would prefer if it was broken up and use local
variables to explain better what's going on (or at least a
comment that shows the expected format).
- same with '.'.join(m.group(1).split('.')[:2])
* Remove double blank lines at first line of patch in
util.py and the last 3 lines (the pass is not needed).
* unixcompiler.py, use True/False instead of 1/0. I forget
what the compatibility of distutils is, but I see other uses
of True and False
- same comment about getting the kernel with a complex expr
- I prefer index instead of idx (I don't like abbrevs,
particularly for foreign speakers)
Instead of:
+ if '-arch' in cc_args:
+ stripArch = 1
just set it: stripArch = '-arch' in cc_args
Same for stripSysroot
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1488098&group_id=5470
More information about the Patches
mailing list