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
|
Author: Richard Darst <rkd@zgib.net>
Description: FTBFS: pcap.c:3886: error: '_wrap_SWIG_PyInstanceMethod_New' undeclared here (not in a function)
Bug-Debian: http://bugs.debian.org/542984
--- python-libpcap-0.6.2.orig/setup.py
+++ python-libpcap-0.6.2/setup.py
@@ -15,8 +15,8 @@
# uncomment this line and comment out the next one if you want to build
# pcap.c from the SWIG interface
-# sourcefiles = ["mk-constants.py", "pcap.i"]
-sourcefiles = ["pcap.c"]
+sourcefiles = ["mk-constants.py", "pcap.i"]
+# sourcefiles = ["pcap.c"]
# if you are building against a non-installed version of libpcap,
# specify its directory here, otherwise set this to None
--- python-libpcap-0.6.2.orig/build-tools/docify-shadow.py
+++ python-libpcap-0.6.2/build-tools/docify-shadow.py
@@ -65,7 +65,8 @@
# Make a dictionary of all the method names from the method lines.
methods={}
for line in pymeths:
- methmatch=re.search('def +([^ (]*) *\(\*args\)',line)
+ #methmatch=re.search('def +([^ (]*) *\(\*args\)',line)
+ methmatch=re.search('def +([^ (]*) *\((self)?(, )?(\*args)?\)',line)
fnmatch=re.search('\:.*[^_p](_?pcapc?\.[^(, ]+) *[(,]',line)
methode=None
fname=None
@@ -98,7 +99,7 @@
# put doc assignments inside of the __init__
outfile.write(' import sys\n')
-outfile.write(' if int(sys.version[0])>=\'2\':\n')
+outfile.write(' if int(sys.version[0])>=2:\n')
for method, fname in methods.items():
outfile.write(' self.%s.im_func.__doc__ = %s.__doc__\n' % (method, fname))
--- python-libpcap-0.6.2.orig/build-tools/docify.py
+++ python-libpcap-0.6.2/build-tools/docify.py
@@ -37,7 +37,8 @@
match=re.search('^.*char \*.*\".*\"',line)
if match:
fname=re.search('\".*\"',match.group(0)).group(0)[1:-1]
- if re.search('swigregister',fname):
+ if re.search('swigregister|SWIG_PyInstanceMethod_New',fname):
+ #if re.search('swigregister',fname):
# print 'skipping doc string for %s\n' % fname
outfile.write(line)
continue
|