pynetwork / pypcap

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

Building for Python3 #46

Closed claycollier closed 7 years ago

hellais commented 7 years ago

Thank you so much for this!

It seems like this PR though breaks compatibility with python 2.7 (see travis: https://travis-ci.org/pynetwork/pypcap/jobs/220220247#L302).

Maybe there is some way to preserve backward compatibility in .pyx or if that is not possible we should split the pcap.pyx (and pcap.c) into one for python 2 and one for python 3 and conditionally select one or the other inside of the setup.py.

nuald commented 7 years ago

The proposed solution is not fully correct - it has the compatibility issues with Python 2 and doesn't use native Cython functionality. The correct solution is implemented in another PR: #47.

Please close this PR.