Just trying one of the official documentation site examples:
from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
getCm
To make Jeremy's answer portable, you can modify your specfile like this diff:
+ import os.path
+ import pysmi
+ import pysnmp.smi.mibs
+ def module_base(module):
+ return os.path.abspath(os.path.join(module.__file__, os.pardir))
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
+ Tree(module_base(pysmi), prefix='pysmi'),
+ Tree(module_base(pysnmp.smi.mibs), prefix='pysnmp/smi/mibs'),
...
EDIT: turn out adding these to hiddenimports solved the problem for me:
'pysnmp.smi.mibs', 'pysnmp.smi.mibs.instances', 'pysnmp.smi.exval', 'pysnmp.cache'