Skip to content

SCons: update to 4.7 or resolve build traceback if updating to 4.8.1 #17254

@josephsl

Description

@josephsl

Is your feature request related to a problem? Please describe.

NVDA 2025.1 development cycle provides an opportunity to update crucial dependencies. One of these was wxPython which was updated to 4.2.2. Another crucial dependency is SCons, and the nVDA project is using an outdated version (4.5.2).

Describe the solution you'd like

Update to latest compatible SCons, either 4.7.0 or 4.8.1 (see below as to why).

SCons 4.8.1

This is the latest SCons release (according to PyPI). However, when trying to build NVDA with it, the following traceback is recorded:

AttributeError: 'str' object has no attribute 'get':
File "C:\nvda\code\nvda\SConstruct", line 313:
env32.SConscript(
File "C:\nvda\code\nvda.venv\Lib\site-packages\SCons\Script\SConscript.py", line 620:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\nvda\code\nvda.venv\Lib\site-packages\SCons\Script\SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\nvda\code\nvda\build\x86\archBuild_sconscript", line 211:
win10localLib = env.SConscript(
File "C:\nvda\code\nvda.venv\Lib\site-packages\SCons\Script\SConscript.py", line 620:
return _SConscript(self.fs, files, **subst_kw)
File "C:\nvda\code\nvda.venv\Lib\site-packages\SCons\Script\SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\nvda\code\nvda\build\x86\localWin10\sconscript", line 52:
find_vc_pdir(env, msvc), rf"Redist\MSVC{msvc[:2]}
\x86\Microsoft.VC{msvc.replace('.', '')}.CRT"
File "C:\nvda\code\nvda.venv\Lib\site-packages\SCons\Tool\MSCommon\vc.py", line 1733:
frozen_binary, _ = _VSWhereExecutable.vswhere_freeze_env(env)
File "C:\nvda\code\nvda.venv\Lib\site-packages\SCons\Tool\MSCommon\vc.py", line 1209:
elif not env.get('VSWHERE'):

Alternative: SCons 4.7.0

While not up to date as 4.8.1, this is the latest version that can build NVDA unless we need to fix the issue raised by the above traceback.

Of these, I think we should try 4.8.1 and resolve the issue raised unless 4.7.0 might be better (for 2025.x).

Describe alternatives you've considered

Keep using SCons 4.5.2 (not ideal).

Additional context

This may require extensive testing as this is the tool that builds NVDA in the first place, more so if we chose to upgrade to 4.8.1.

Thanks.

Metadata

Metadata

Assignees

Labels

audience/nvda-devPR or issue is relevant to NVDA / Add-on developersp4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions