pynetwork / pypcap

pypcap - python libpcap module, forked from code.google.com/p/pypcap
Other
299 stars 75 forks source link

Does not build out-of-box on OS X 10.7.5 #4

Closed tazle closed 10 years ago

tazle commented 10 years ago

I'm having some trouble installing pypcap on OS X 10.7.5.

First, it seems that Pyrex is not properly configured as dependency:

% py/bin/pip install pypcap
Downloading/unpacking pypcap Downloading pypcap-1.1.tar.gz Running setup.py egg_info for package pypcap Traceback (most recent call last): File "", line 14, in File "x/py/build/pypcap/setup.py", line 8, in from Pyrex.Distutils import build_ext ImportError: No module named Pyrex.Distutils Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 14, in

File "x/py/build/pypcap/setup.py", line 8, in

from Pyrex.Distutils import build_ext

ImportError: No module named Pyrex.Distutils


Command python setup.py egg_info failed with error code 1 in x/py/build/pypcap Storing complete log in /Users/tul/.pip/pip.log

After manually installing Pyrex in the virtualenv, the extension pcap_ex.c fails to compile. It doesn't find config.h, which I presume is pcap's config.h. I can't find such config.h on the system either, so I wonder what's going on and how pypcap should be built.

tazle commented 10 years ago

Erm, nevermind. Pip of course finds the Google Code version, which you have fixed here. Cloning this repo and installing by hand works.