Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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"],
          )]