Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
Only in python-libmemcached-0.13.1: cmemcached.c diff -crB python-libmemcached-0.13.1_orgi/cmemcached.pyx python-libmemcached-0.13.1/cmemcached.pyx *** python-libmemcached-0.13.1_orgi/cmemcached.pyx 2008-03-31 09:21:44.000000000 +0200 --- python-libmemcached-0.13.1/cmemcached.pyx 2009-09-03 23:14:08.000000000 +0200 *************** *** 156,161 **** --- 156,162 ---- _FLAG_PICKLE = 1<<0 _FLAG_INTEGER = 1<<1 _FLAG_LONG = 1<<2 + _FLAG_BOOL = 1<<3 cdef object _prepare_value(object val, uint32_t *flags): cdef uint32_t f *************** *** 164,169 **** --- 165,173 ---- if isinstance(val, basestring): flags[0] = 0 pass + elif isinstance(val, bool): + f = f | _FLAG_BOOL + val = str(val) elif isinstance(val, int): f = f | _FLAG_INTEGER val = str(val) *************** *** 184,189 **** --- 188,195 ---- if flags == 0: pass + elif flags & _FLAG_BOOL: + val = bool(val) elif flags & _FLAG_INTEGER: val = int(val) elif flags & _FLAG_LONG: Only in python-libmemcached-0.13.1: python-libmemcached-0.13.patch diff -crB python-libmemcached-0.13.1_orgi/setup.py python-libmemcached-0.13.1/setup.py *** python-libmemcached-0.13.1_orgi/setup.py 2009-09-03 23:19:47.000000000 +0200 --- python-libmemcached-0.13.1/setup.py 2009-09-03 23:33:45.000000000 +0200 *************** *** 1,6 **** --- 1,17 ---- #!/usr/bin/env python from setuptools import setup, Extension + import os + + mac_snow_leopard = os.path.exists('/Developer/SDKs/MacOSX10.6.sdk/') and\ + int(os.uname()[2].split('.')[0]) >= 8 + + BASE_CFLAGS = [] + BASE_LDFLAGS = ['--no-undefined', '-Wl'] + + if mac_snow_leopard: + BASE_LDFLAGS.extend(['-arch', 'x86_64']) + BASE_CFLAGS.extend(['-O3', '-arch', 'x86_64']) setup( name = "python-libmemcached", *************** *** 12,18 **** # This assumes that libmemcache is installed with base /usr/local ext_modules=[Extension('cmemcached', ['cmemcached.pyx'], libraries=['memcached'], - extra_link_args=['--no-undefined', '-Wl,-rpath=/usr/local/lib'], include_dirs = ["/usr/local/include", "/usr/local/include/libmemcached/"], library_dirs = ["/usr/local/lib"], )] --- 23,30 ---- # This assumes that libmemcache is installed with base /usr/local ext_modules=[Extension('cmemcached', ['cmemcached.pyx'], libraries=['memcached'], + extra_compile_args=BASE_CFLAGS, + extra_link_args=BASE_LDFLAGS, include_dirs = ["/usr/local/include", "/usr/local/include/libmemcached/"], library_dirs = ["/usr/local/lib"], )]
This paste will be private.
From the Design Piracy series on my blog: