Skip to content

Instantly share code, notes, and snippets.

@natewalck
Forked from ccaviness/setup.py.ed
Created November 5, 2015 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natewalck/d1d2c754702558506b4e to your computer and use it in GitHub Desktop.
Save natewalck/d1d2c754702558506b4e to your computer and use it in GitHub Desktop.
H
/^def macosx_sdk_root(/a
.
/cflags =/i
sdkroot = os.environ.get('SDKROOT')
if sdkroot is not None:
return sdkroot
.
/# Check the additional directories$/a
.
/f = os\.path\.join(sysroot, dir\[1:], filename)/c
dir = os.path.join(sysroot, dir[1:])
f = os.path.join(dir, filename)
.
/# Otherwise, it must have been in one of the additional directories,$/a
.
/if os\.path\.join(sysroot, p\[1:]) == dirname:/c
sp = os.path.join(sysroot, p[1:])
if sp == dirname:
.
/return \[ p ]/s/p/sp/
/'-arch' in ext.extra_link_args/s//'-no64' in ext.extra_link_args/
/# Ensure that \/usr\/local is always used/a
.
.,/\/usr\/local\/include/s/^/#/
/inc_dirs = self.compiler.include_dirs\[:]/a
for d in ('/usr/local/include', '/usr/include',):
if d not in inc_dirs:
inc_dirs.insert(0, d)
.
/lib_dirs = self.compiler.library_dirs\[:]/a
for d in ('/usr/local/lib',):
if d not in lib_dirs:
lib_dirs.append(d)
.
/Disabled on 64-bit platforms/a
.
/\['imageop.c'\]/s//&, extra_compile_args = ['-no64'], extra_link_args = ['-no64']/
/# readline$/a
.
/if host_platform == 'darwin':/a
.
.,/if do_readline:/-1s/^/#/
/if host_platform == 'darwin' and os_release < 9:/s//if True:/
/library_dirs=\['\/usr\/lib\/termcap'],/s/^/#/
/if sys\.maxint == 0x7fffffff:/s//if True:/
?Extension('dl'?s/]/&, extra_compile_args = ['-no64'], extra_link_args = ['-no64']/
/carbon_kwds =/a
.
.,/}/t/}/
?carbon_kwds?s//&32/
s/carbon_extra_compile_args/& + ['-no64']/
/'-framework', 'Carbon'/s//&, '-no64'/
/CARBON_EXTS/a
.
s/ 'Nav',//
.t/\]/
s/CARBON_EXTS/&32/
s/'.*/'Nav', '_Win']/
/for name in CARBON_EXTS/a
.
.,/^$/-1t.-1
/CARBON_EXTS/s//&32/
/carbon_kwds/s//&32/
/Workaround for a bug/a
.
.,/^$/-1s/^/#/
/extra_compile_args=carbon_extra_compile_args/s//& + ['-no64']/
/'-framework', 'Carbon'/s//&, '-no64'/
/def detect_tkinter_darwin/a
.
/if not exists(join(sysroot, F\[1:], fw + '\.framework')):/c
F = join(sysroot, F[1:])
if not exists(join(F, fw + '.framework')):
.
/include_dirs\.append('\/usr\/X11R6\/include')/s/^/#/
/don't support 64-bit$/a
.
.,/frameworks.append(a)/s/^/#/
/# Check for various platform-specific directories/a
.
.,/^$/-1s/^/#/
g/('-Wl,-search_paths_first',)/s//()/
w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment