--- setup.py.orig 2011-01-25 10:56:52.000000000 -0800
+++ setup.py 2011-01-25 11:19:36.000000000 -0800
@@ -42,7 +42,7 @@
dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \
glob.glob('../libpcap*') + glob.glob('../wpdpack*')
for d in dirs:
- for sd in ('include', 'include/pcap', ''):
+ for sd in ('include/pcap', 'include', ''):
incdirs = [ os.path.join(d, sd) ]
if os.path.exists(os.path.join(d, sd, 'pcap.h')):
cfg['include_dirs'] = [ os.path.join(d, sd) ]
@@ -75,7 +75,7 @@
print "removing '%s'" % pcap_cache
os.unlink(pcap_cache)
-if len(sys.argv) > 1 and sys.argv[1] == 'build':
+if len(sys.argv) > 1 and ('build' in sys.argv or 'install' in sys.argv):
try:
pcap_config = cPickle.load(open(pcap_cache))
except IOError: