105 if Options.options.with_pybindgen is not None: |
105 if Options.options.with_pybindgen is not None: |
106 if os.path.isdir(Options.options.with_pybindgen): |
106 if os.path.isdir(Options.options.with_pybindgen): |
107 conf.check_message("pybindgen location", '', True, ("%s (given)" % Options.options.with_pybindgen)) |
107 conf.check_message("pybindgen location", '', True, ("%s (given)" % Options.options.with_pybindgen)) |
108 conf.env['WITH_PYBINDGEN'] = os.path.abspath(Options.options.with_pybindgen) |
108 conf.env['WITH_PYBINDGEN'] = os.path.abspath(Options.options.with_pybindgen) |
109 else: |
109 else: |
|
110 # ns-3-dev uses ../pybindgen, while ns-3 releases use ../REQUIRED_PYBINDGEN_VERSION |
110 pybindgen_dir = os.path.join('..', "pybindgen") |
111 pybindgen_dir = os.path.join('..', "pybindgen") |
|
112 pybindgen_release_str = "pybindgen-" + '.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION]) |
|
113 pybindgen_release_dir = os.path.join('..', pybindgen_release_str) |
111 if os.path.isdir(pybindgen_dir): |
114 if os.path.isdir(pybindgen_dir): |
112 conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_dir)) |
115 conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_dir)) |
113 conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_dir) |
116 conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_dir) |
|
117 elif os.path.isdir(pybindgen_release_dir): |
|
118 conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_release_dir)) |
|
119 conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_release_dir) |
114 del pybindgen_dir |
120 del pybindgen_dir |
|
121 del pybindgen_release_dir |
115 if not conf.env['WITH_PYBINDGEN']: |
122 if not conf.env['WITH_PYBINDGEN']: |
116 conf.check_message("pybindgen location", '', False) |
123 conf.check_message("pybindgen location", '', False) |
117 |
124 |
118 # Check for pybindgen |
125 # Check for pybindgen |
119 |
126 |