From 76e427e0524ae0e1f6158b20c298878fec294b11 Mon Sep 17 00:00:00 2001 From: lericson Date: Mon, 7 Sep 2009 01:59:54 +0200 Subject: [PATCH] Remove Snow Leopard specific hacks and note in readme. --- README.rst | 8 ++++++++ setup.py | 14 -------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/README.rst b/README.rst index 145b114..79b89ea 100644 --- a/README.rst +++ b/README.rst @@ -53,6 +53,14 @@ IRC ``#sendapatch`` on ``chat.freenode.net``. +Compiling on Snow Leopard +========================= + +Since, for some reason, compiling Python extensions under Mac OS X 10.6 won't +use the proper ``-arch`` flag to ``gcc``, here's how you'd do it:: + + $ CFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" python setup.py build + Change Log ========== diff --git a/setup.py b/setup.py index 13d0314..0a297c2 100644 --- a/setup.py +++ b/setup.py @@ -11,20 +11,6 @@ if "LIBMEMCACHED_DIR" in os.environ: readme_text = open("README.rst", "U").read() -BASE_CFLAGS = ["-O3"] -BASE_LDFLAGS = [] - -mac_snow_leopard = (os.path.exists("/Developer/SDKs/MacOSX10.6.sdk/") and - int(os.uname()[2].split('.')[0]) >= 8) - -if mac_snow_leopard: - # Only compile the 64bit version on Snow Leopard - # libmemcached should also be compiled with make - # CFLAGS="-arch x86_64" - # else one will expereince seg. faults - BASE_LDFLAGS.extend(['-arch', 'x86_64']) - BASE_CFLAGS.extend(['-arch', 'x86_64']) - pylibmc_ext = Extension("_pylibmc", ["_pylibmcmodule.c"], extra_compile_args=BASE_CFLAGS, extra_link_args=BASE_LDFLAGS,