You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-03-31 14:42:53 -07:00
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
--- setup.py.orig 2005-10-17 09:07:03.000000000 +1000
|
|
+++ setup.py 2022-10-20 23:51:20.000000000 +1100
|
|
@@ -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,9 +75,9 @@
|
|
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)) or "SETUP_PY_LOAD_PCAP_CONFIG" in os.environ:
|
|
try:
|
|
- pcap_config = cPickle.load(open(pcap_cache))
|
|
+ pcap_config = cPickle.load(open(pcap_cache, 'rb'))
|
|
except IOError:
|
|
print >>sys.stderr, 'run "%s config" first!' % sys.argv[0]
|
|
sys.exit(1)
|