|
1 | 1 | # A part of NonVisual Desktop Access (NVDA) |
2 | | -# Copyright (C) 2010-2020 NV Access Limited, James Teh, Michael Curran, Peter Vágner, Joseph Lee, Reef Turner, Babbage B.V., Leonard de Ruijter, Łukasz Golonka, Accessolutions, Julien Cochuyt # noqa: E501 |
| 2 | +# Copyright (C) 2010-2021 NV Access Limited, James Teh, Michael Curran, Peter Vágner, Joseph Lee, |
| 3 | +# Reef Turner, Babbage B.V., Leonard de Ruijter, Łukasz Golonka, Accessolutions, Julien Cochuyt |
3 | 4 | # This file may be used under the terms of the GNU General Public License, version 2 or later. |
4 | 5 | # For more details see: https://www.gnu.org/licenses/gpl-2.0.html |
5 | 6 |
|
@@ -41,10 +42,10 @@ if sys.version_info.micro == 6: |
41 | 42 | sourceEnvPath = os.path.abspath(os.path.join(Dir('.').srcnode().path, "source")) |
42 | 43 | sys.path.append(sourceEnvPath) |
43 | 44 | import sourceEnv |
| 45 | +sourceEnv.expandPythonPath() |
44 | 46 | sys.path.remove(sourceEnvPath) |
45 | 47 | import time |
46 | 48 | from glob import glob |
47 | | -from py2exe.dllfinder import pydll |
48 | 49 | import importlib.util |
49 | 50 | import winreg |
50 | 51 |
|
@@ -265,8 +266,13 @@ for t2tFile in env.Glob(os.path.join(userDocsDir.path,'*','*.t2t')): |
265 | 266 | # Build unicode CLDR dictionaries |
266 | 267 | env.SConscript('cldrDict_sconscript',exports=['env', 'sourceDir']) |
267 | 268 |
|
| 269 | + |
| 270 | +REQUIRED_PY2EXE_VER = "py2exe==0.10.1.0" |
| 271 | + |
268 | 272 | # A builder to generate an NVDA distribution. |
269 | 273 | def NVDADistGenerator(target, source, env, for_signature): |
| 274 | + import buildFunctions |
| 275 | + buildFunctions.requestPackage(REQUIRED_PY2EXE_VER) |
270 | 276 | buildVersionFn = os.path.join(str(source[0]), "_buildVersion.py") |
271 | 277 | # Make the NVDA build use the specified version. |
272 | 278 | # We don't do this using normal scons mechanisms because we want it to be cleaned up immediately after this builder |
@@ -299,11 +305,6 @@ def NVDADistGenerator(target, source, env, for_signature): |
299 | 305 |
|
300 | 306 | action.append(buildCmd) |
301 | 307 |
|
302 | | - # Python3 has started signing its main python dll. |
303 | | - # However, Py2exe currently tries to add a string resource to it, invalidating the signature and possibly currupting the certificate. |
304 | | - # Therefore, copy a fresh version of the dll one more time once py2exe has completed. |
305 | | - action.append(Copy(target[0],pydll)) |
306 | | - |
307 | 308 | # #10031: Apps written in Python 3 require Universal CRT to be installed. We cannot assume users have it on their systems. |
308 | 309 | # Therefore , copy required libraries from Windows 10 SDK. |
309 | 310 | try: |
|
0 commit comments