Bug 239681 - net/py-pcap: Cannot import module with python 3
Summary: net/py-pcap: Cannot import module with python 3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-06 20:14 UTC by Craig Leres
Modified: 2020-03-31 21:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
poudriere jail build/install capture (7.85 KB, text/plain)
2019-08-06 20:14 UTC, Craig Leres
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer 2019-08-06 20:14:04 UTC
Created attachment 206313 [details]
poudriere jail build/install capture

I was surprised to find that py-pcap does not work with python 3. For example in a poudriere jail running 11.2-RELEASE-p10 if I build and install py36-pcap, attempting to import it results in a stack trace ending with:

    ModuleNotFoundError: No module named '_pcap'

This seems to be related to swig and might well be an upstream problem.

I'll attach a log that shows my test.
Comment 1 Muhammad Moinur Rahman freebsd_committer 2019-08-06 21:34:24 UTC
Hi Leeres,
Yes I saw it too the other day. Maybe we should move forward to net/py-pycap. Scapy works with it. Actually supports py-pcapy too. I am just trying to find which one works better. Seems like py-pycap is well maintained. Any advices?
Comment 2 Muhammad Moinur Rahman freebsd_committer 2020-03-31 21:05:41 UTC
Author: bofh
Date: Tue Mar 31 21:00:39 2020
New Revision: 530018
URL: https://svnweb.freebsd.org/changeset/ports/530018

Log:
 net/py-pcap: Mark DEPRECATED and set EXPIRATION_DATE

 - Broken with python3 please consider using net/py-pypcap

Modified:
 head/net/py-pcap/Makefile

Modified: head/net/py-pcap/Makefile
==============================================================================
--- head/net/py-pcap/Makefile	Tue Mar 31 20:40:43 2020	(r530017)
+++ head/net/py-pcap/Makefile	Tue Mar 31 21:00:39 2020	(r530018)
@@ -12,6 +12,9 @@ COMMENT=	Python interface to LBL Packet Capture librar
LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

+DEPRECATED=	Broken with python3 please consider using net/py-pypcap
+EXPIRATION_DATE=2020-05-01
+
BUILD_DEPENDS=	swig3.0:devel/swig30

USES=		python