Ticket #38332: setup.py.patch
File setup.py.patch, 2.2 KB (added by jdgleeson, 12 years ago) |
---|
-
setup.py
old new 30 30 'Topic :: Software Development :: Libraries :: Python Modules', 31 31 ] 32 32 33 # If we are on Mac OS 10.5 or later, attempt a universal binary, which is the way34 # the original system version of readline.so was compiled. Set up flags here.35 UNIVERSAL = ''36 platform = distutils.util.get_platform()37 if platform.startswith('macosx'):38 osx_version = platform.split('-')[1]39 SDK = ''40 if osx_version == '10.5':41 SDK = '/Developer/SDKs/MacOSX10.5.sdk'42 UNIVERSAL = '-arch i386 -arch ppc -arch x86_64 -arch ppc64'43 elif osx_version == '10.6':44 # Starting with 10.6 (Snow Leopard), only Intel architecture is supported45 SDK = '/Developer/SDKs/MacOSX10.6.sdk'46 UNIVERSAL = '-arch i386 -arch x86_64'47 elif osx_version > '10.6':48 # Starting with 10.7 (Lion) and Xcode 4.3, the developer sysroot is inside the Xcode.app - ignore it49 UNIVERSAL = '-arch i386 -arch x86_64'50 51 if os.path.exists(SDK):52 # only add sysroot if it exists:53 UNIVERSAL = "-isysroot %s %s" % (SDK, UNIVERSAL)54 55 33 # Since we have the latest readline (post 4.2), enable all readline functionality 56 34 # These macros can be found in pyconfig.h.in in the main directory of the Python tarball 57 35 DEFINE_MACROS = [ … … 98 76 maintainer_email="ludwig.schwardt@gmail.com; github@srid.name", 99 77 url="http://github.com/ludwigschwardt/python-readline", 100 78 license="GNU GPL", 79 extra_path = 'readline', 101 80 platforms=['MacOS X', 'Posix'], 102 81 include_package_data=True, 103 82 ext_modules=[ … … 105 84 sources=["Modules/%s.x/readline.c" % (sys.version_info[0],)], 106 85 include_dirs=['.'], 107 86 define_macros=DEFINE_MACROS, 108 extra_compile_args=['-Wno-strict-prototypes'] + UNIVERSAL.split(), 109 extra_link_args=UNIVERSAL.split(), 87 extra_compile_args=['-Wno-strict-prototypes'], 110 88 extra_objects=['readline/libreadline.a', 'readline/libhistory.a'], 111 89 libraries=['ncurses'] 112 90 ),