Topics

PowerShell not found error

Cyrille
 

Hello

When trying to compile an add-on with the scons command, I get a message box informing me that Windows does not find powershell.exe. But I have checked the directory of powershell.exe is in my PATH environment variable.

However, If I copy the powershell.exe in the root folder of the add-on, scons works correctly.

Also building NVDA source fails with the same message box unless I copy powershell.exe in the folder where I build.

The computer where it occurs is under Windows 7. Before, I was able to build add-ons on this machine but I cannot remember if I have built something since Py3 transition. Maybe also VS2019 installation has broken something? On another machine mine under Windows 10, add-on and NVDA source building works correctly.

Any of you has encountered this issue? Or has any idea of its cause?

Thanks.

Regards,

Cheers,

Cyrille

Lukasz Golonka
 

Hello Cyrille,


On Tue, 2 Jun 2020 23:20:22 +0200
"Cyrille via groups.io" <cyrille.bougot2=laposte.net@groups.io> wrote:

Hello

When trying to compile an add-on with the scons command, I get a message box informing me that Windows does not find powershell.exe. But I have checked the directory of powershell.exe is in my PATH environment variable.
Scons creates its own path unfortunately.


However, If I copy the powershell.exe in the root folder of the add-on, scons works correctly.

Also building NVDA source fails with the same message box unless I copy powershell.exe in the folder where I build.

The computer where it occurs is under Windows 7. Before, I was able to build add-ons on this machine but I cannot remember if I have built something since Py3 transition. Maybe also VS2019 installation has broken something? On another machine mine under Windows 10, add-on and NVDA source building works correctly.

Any of you has encountered this issue? Or has any idea of its cause?
yes, I did. This is this Scons issue:
https://github.com/SCons/scons/issues/3572
Its fixed in Scons master branch so you ned to install Scons from source.
WHen building NVDA you ned to invoke c:\Python37\scripts\scons.bat to
build.
I plan to update the version of Scons bundled in the NVDA repository as
soon as stable 4.0.0 is released.


--
Regards
Lukasz

Cyrille
 

Hello Lukasz

Thanks for your answer.

Unfortunately I did not succeed in making it work, neither for NVDA nor for add-ons.

How did you install scons from source?

I have tried to clone scons repo from github's repo to get the master branch and from the local repo's folder, I have run :

py -3-32 setup.py install

This seems to have installed well. But I do not know if I should have installed it this way.

However, running scons directly or the scons.bat file fails.

Any additional idea?

Do you know when scons 4.0.0 is planned to be released? Maybe I should just wait a little time to have pypy updated?

Cheers,

Cyrille

Le 03/06/2020 à 11:11, Lukasz Golonka a écrit :
Hello Cyrille,


On Tue, 2 Jun 2020 23:20:22 +0200
"Cyrille via groups.io" <cyrille.bougot2=laposte.net@groups.io> wrote:

Hello

When trying to compile an add-on with the scons command, I get a message box informing me that Windows does not find powershell.exe. But I have checked the directory of powershell.exe is in my PATH environment variable.
Scons creates its own path unfortunately.

However, If I copy the powershell.exe in the root folder of the add-on, scons works correctly.

Also building NVDA source fails with the same message box unless I copy powershell.exe in the folder where I build.

The computer where it occurs is under Windows 7. Before, I was able to build add-ons on this machine but I cannot remember if I have built something since Py3 transition. Maybe also VS2019 installation has broken something? On another machine mine under Windows 10, add-on and NVDA source building works correctly.

Any of you has encountered this issue? Or has any idea of its cause?
yes, I did. This is this Scons issue:
https://github.com/SCons/scons/issues/3572
Its fixed in Scons master branch so you ned to install Scons from source.
WHen building NVDA you ned to invoke c:\Python37\scripts\scons.bat to
build.
I plan to update the version of Scons bundled in the NVDA repository as
soon as stable 4.0.0 is released.

Lukasz Golonka
 

On Wed, 3 Jun 2020 14:15:50 +0200
"Cyrille via groups.io" <cyrille.bougot2=laposte.net@groups.io> wrote:

Unfortunately I did not succeed in making it work, neither for NVDA nor for add-ons.

How did you install scons from source?
Well, what I did is certainly not the recommended installation procedure
but I've just installed latest stable version from PYPI and then
replaced Scons files in Lib\site-packages\scons with the one from the
repository.
The setup.py appears to be broken at present.

Do you know when scons 4.0.0 is planned to be released? Maybe I should just wait a little time to have pypy updated?
No idea - they don't seems to have any firm release schedule.

--
Regards
Lukasz

Cyrille
 

i Lukasz

I have installed scons as you did and it is now working on add-on builds.


Regarding NVDA build, I get the following error log:


scons: Reading SConscript files ...
TypeError: find_vc_pdir() missing 1 required positional argument: 'msvc_version'
:
  File "D:\Cyrille\DevP\nvdaNew2\SConstruct", line 236:
env32.SConscript('nvdaHelper/archBuild_sconscript',exports={'env':env32,'cli
entInstallDir':clientDir.Dir('x86'),'libInstallDir':sourceLibDir},variant_dir='b
uild/x86')
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "D:\Cyrille\DevP\nvdaNew2\build\x86\archBuild_sconscript", line 190:
    win10localLib=env.SConscript('localWin10/sconscript',)
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "D:\Cyrille\DevP\nvdaNew2\build\x86\localWin10\sconscript", line 46:
    find_vc_pdir(msvc),

Do you think it is linked or is it totally something else?

Cheers,

Cyrille

Le 03/06/2020 à 19:10, Lukasz Golonka a écrit :
On Wed, 3 Jun 2020 14:15:50 +0200
"Cyrille via groups.io" <cyrille.bougot2=laposte.net@groups.io> wrote:

Unfortunately I did not succeed in making it work, neither for NVDA nor for add-ons.

How did you install scons from source?
Well, what I did is certainly not the recommended installation procedure
but I've just installed latest stable version from PYPI and then
replaced Scons files in Lib\site-packages\scons with the one from the
repository.
The setup.py appears to be broken at present.

Do you know when scons 4.0.0 is planned to be released? Maybe I should just wait a little time to have pypy updated?
No idea - they don't seems to have any firm release schedule.

Lukasz Golonka
 

Hello Cyrille,

On Thu, 4 Jun 2020 11:08:05 +0200
"Cyrille via groups.io" <cyrille.bougot2=laposte.net@groups.io> wrote:

i Lukasz

I have installed scons as you did and it is now working on add-on builds.


Regarding NVDA build, I get the following error log:


scons: Reading SConscript files ...
TypeError: find_vc_pdir() missing 1 required positional argument: 'msvc_version'
:
  File "D:\Cyrille\DevP\nvdaNew2\SConstruct", line 236:
env32.SConscript('nvdaHelper/archBuild_sconscript',exports={'env':env32,'cli
entInstallDir':clientDir.Dir('x86'),'libInstallDir':sourceLibDir},variant_dir='b
uild/x86')
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "D:\Cyrille\DevP\nvdaNew2\build\x86\archBuild_sconscript", line 190:
    win10localLib=env.SConscript('localWin10/sconscript',)
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "c:\users\cyrille\appdata\local\programs\python\python37-32\lib\site-pack
ages\scons\SCons\Script\SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "D:\Cyrille\DevP\nvdaNew2\build\x86\localWin10\sconscript", line 46:
    find_vc_pdir(msvc),

Do you think it is linked or is it totally something else?
Huh, it turns out I also cannot build NVDA with latest master of Scons -
I had slightly older version installed previously. It is a change in
Scons which unfortunately breaks NVDA's Sconscripts.