Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attribute error running setup.py for 1.1.5 #20

Closed
dsayling opened this issue Jun 2, 2016 · 2 comments
Closed

attribute error running setup.py for 1.1.5 #20

dsayling opened this issue Jun 2, 2016 · 2 comments
Labels

Comments

@dsayling
Copy link

dsayling commented Jun 2, 2016

Found pcap headers in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/pcap/pcap.h
Found libraries in None
Traceback (most recent call last):
File "", line 1, in
File "/private/tmp/pip-build-aAY0gL/pypcap/setup.py", line 59, in
lib_file = os.path.basename(lib_file_path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

Will attempt to debug.

@brifordwylie
Copy link
Contributor

brifordwylie commented Jul 1, 2016

@DAyling Okay I ran into the same issue. Not an expert but I ^think^ the headers are found here:
-/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/pcap/pcap.h

And the libpcap library is found here: /usr/lib/libpcap.dylib

The current 'finding' logic in setup.py will search lots of places for the headers and then uses the directory that it found pcap.h in as a root point to find the libs. Works well on linux but not with the default OSX setup. I'm making a PR that adds '/usr/lib' to the END of the directories that get searched for libs, the PR should have no negative consequences as the /usr/lib is added to the END of the search.

This was referenced Jul 1, 2016
@brifordwylie
Copy link
Contributor

closing with the merge of #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants