"hg" (non-exe) script shebang pointing to build directory, not installation directory
Categories
(Firefox Build System :: MozillaBuild, task)
Tracking
(Not tracked)
People
(Reporter: mhentges, Assigned: mhentges)
References
Details
Attachments
(1 file)
../update-all: /c/mozilla-build/python3/Scripts/hg: c:\mozillabuild-stage\mozilla-build\python3\python.exe^M: bad interpreter: No such file or directory
As mentioned by RyanVM in a direct message, it looks like the "Scripts" shebangs that point to <build-dir>\python3\python3.exe
aren't being correctly fixed by distutils_shebang_fix()
.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
As of "bug 1743185", some packages were now installed in Python 3 using
python.exe
instead of python3.exe
. However, the "shebang fix" was
only operating on python.exe
-installed packages.
Since there's now only one Python version shipped with MozillaBuild,
let's only install packages with python.exe
, just do a shebang fix
for that one "oldString", and always replace it with the version-less
python.exe
.
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/mozilla-build/rev/77395cce3330
Fix broken shebang of Scripts\hg
r=ahochheiden
Assignee | ||
Comment 3•2 years ago
|
||
If you need to execute hg
scripts directly, and you're encountering errors here:
Workaround:
- Open
$MOZILLABUILD\python3\Scripts\hg
in a text editor - Replace the first line (
#!c:\mozillabuild-stage\mozilla-build\python3\python.exe
) with#!python.exe
Comment 4•2 years ago
|
||
Before 4.0, I used to be able to set the VS code mercurial extension's path setting like this:
"hg.path": "C:\\mozilla-build\\python\\Scripts\\hg",
But setting the equivalent path in 4.0 results in a "not found" error at startup, prompting me to download mercurial. Maybe there's something I can edit to resolve this?
Assignee | ||
Comment 5•2 years ago
|
||
Oop, sorry Shane, I missed this message.
Did you get that "not found" error, even after trying the workaround described above?
Another tweak to try is to adjust the "hg.path"
setting to include a .exe
on the end:
"hg.path": "C:\\mozilla-build\\python\\Scripts\\hg.exe"
Comment 6•2 years ago
|
||
No worries, thanks for the update. Yeah I had done the #!python.exe
trick. What I ultimately needed to do is fix my OS PATH var. It still had .../python
instead of .../python3
so that was preventing some stuff from working.
My previous post didn't make it clear that the path I linked would no longer work either way, because it needs to say python3
not python
now. But I had already changed that in my VS Code setting so that wasn't really the issue. I think it was locating the hg
script fine but then something was failing from there due to my PATH. So anyway if anyone else encounters this, make sure you look for anything that might be referencing the mozilla-build/python
folder.
Anyway, after revising and refreshing the PATH, my whole environment is back to working perfectly so it's all good now.
Updated•1 year ago
|
Description
•