overloading.py not compatible with python2.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyBindGen |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
ns-3 will not find pybindgen on a Python2.6 system (CentOS 6.6) due to this incompatibility:
Checking for python module 'pybindgen'
['/usr/bin/python', '-c', "\nimport pybindgen as current_
err: Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/tmp/ns-
from pybindgen.module import Module
File "/tmp/ns-
from pybindgen.function import Function, OverloadedFunction, CustomFunctionW
File "/tmp/ns-
from pybindgen import overloading
File "/tmp/ns-
docstrings_set = {wrap.docstring for wrap in self.all_wrappers if wrap.docstring is not None}
SyntaxError: invalid syntax
not found
from /tmp/ns-
This patch fixed it for me:
--- pybindgen/
+++ pybindgen/
@@ -274,7 +274,10 @@
# check available docstrings for the overloads
- docstrings_set = {wrap.docstring for wrap in self.all_wrappers if wrap.docstring is not None}
+ docstrings_set = {}
+ if wrap.docstring is not None:
+ for wrap in self.all_wrappers:
+ docstrings_set.add (wrap.docstring)
if len(docstrings_set) is 1:
actually, this patch is broken; instead, the attached should work