Bug 2742 - pybindgen version number format
pybindgen version number format
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
unspecified
All All
: P3 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-24 08:56 UTC by Tom Henderson
Modified: 2017-05-25 11:04 UTC (History)
1 user (show)

See Also:


Attachments
possible patch (755 bytes, patch)
2017-05-24 08:56 UTC, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-05-24 08:56:34 UTC
Created attachment 2845 [details]
possible patch

pybindgen version numbering recently changed, from this type of format:

0.17.0.post58+ngcf00cc0

to this:

0.18.0

If a user clones the tip of the repo, and tries to use with our wscript, './waf configure' will error out such as follows.

    if not (split_version(pybindgen_version) >= split_version(REQUIRED_PYBINDGEN_VERSION)):
  File "/home/buildslave/jenkins/workspace/daily-fedora-without-valgrind/label/Fedora-64-25/ns-3-allinone/bake/source/ns-3-dev/bindings/python/wscript", line 72, in split_version
    return (int(ver[0]), int(ver[1]), int(ver[2]), int(ver[3].split('post')[1]))
IndexError: list index out of range

The attached patch to wscript appears to support both formats.
Comment 1 Gustavo J. A. M. Carneiro 2017-05-24 09:10:56 UTC
Apologies for the breakage. This is due to me doing an official release.

Yes, 3 number versions will occur again in the future, every time there is a release.

The patch looks good enough.  Possibly could be simplified slightly, but no big deal.
Comment 2 Tom Henderson 2017-05-25 11:04:52 UTC
pushed in changeset 12886:954349c7cf11