Commit ea802b53 authored by Tom Henderson's avatar Tom Henderson

Make python3 changes to wscript

parent 1b58a7cc
......@@ -98,7 +98,9 @@ us a note on ns-developers mailing list.</p>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li>Waf upgraded from 2.0.9 to 2.0.15.
<li>ns-3 now only supports Python 3. Use of Python 2 can be forced using the --with-python option provided to './waf configure', and may still work for many cases, but is no longer supported. Waf does not default to Python 3 but the ns-3 wscript will default the build to Python 3.
</li>
<li>Waf upgraded from 2.0.9 to 2.0.18.
</li>
<li> Options to run a program through Waf without invoking a project rebuild have been added. The command './waf --run-no-build <program-name>' parallels the behavior of './waf --run <program-name>' and, likewise, the command './waf --pyrun-no-build' parallels the behavior of './waf --pyrun <program-name>'.
</li>
......
......@@ -21,6 +21,9 @@ Supported platforms
This release is intended to work on systems with the following minimal
requirements (Note: not all features available on all platforms):
Starting with ns-3.30, Python 3 will be the only supported Python version,
and scripts will default to Python 3 usage.
New user-visible features
-------------------------
- (wifi) Preamble detection can now be modelled and is enabled by default.
......
......@@ -368,6 +368,15 @@ def configure(conf):
env = conf.env
# ns-3 now only supports Python3 but Waf is based on Python2
# This can be removed once Waf moves to Python3
if Options.options.with_python is None:
if sys.version_info < (3,):
# Forcing otherwise unused Options.options.python to select python3
# This option is checked later by waflib
Options.options.python = 'python3'
conf.msg('Configuring Waf to use python3: ', Options.options.python, 'GREEN')
if Options.options.enable_gcov:
env['GCOV_ENABLED'] = True
env.append_value('CCFLAGS', '-fprofile-arcs')
......@@ -1128,7 +1137,7 @@ def shutdown(ctx):
# Write the build status file.
build_status_file = os.path.join(bld.out_dir, 'build-status.py')
out = open(build_status_file, 'w')
out.write('#! /usr/bin/env python\n')
out.write('#! /usr/bin/env python3\n')
out.write('\n')
out.write('# Programs that are runnable.\n')
out.write('ns3_runnable_programs = ' + str(env['NS3_RUNNABLE_PROGRAMS']) + '\n')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment