create-mach-environment fails when it cannot form a relative path to site-packages
Categories
(Firefox Build System :: Mach Core, defect)
Tracking
(firefox-esr91 unaffected, firefox93 unaffected, firefox94 unaffected, firefox95 unaffected, firefox96 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr91 | --- | unaffected |
| firefox93 | --- | unaffected |
| firefox94 | --- | unaffected |
| firefox95 | --- | unaffected |
| firefox96 | --- | fixed |
People
(Reporter: molly, Assigned: mhentges)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
create-mach-environment is failing for me with the following error:
ValueError: path is on mount 'h:', start on mount 'c:'
File "h:\mozilla\mozilla-central\python/mozbuild/mozbuild/mach_commands.py", line 2481, in create_mach_environment
manager.build()
File "h:\mozilla\mozilla-central\python\mach\mach\virtualenv.py", line 325, in build
f.write("{}\n".format(os.path.relpath(path, site_packages_dir)))
File "g:\mozilla-build\python3\lib\ntpath.py", line 562, in relpath
path_drive, start_drive))
virtualenv.py:325 appears to be trying to form a relative path from within the source tree to the virtualenv's site-packages directory, but I have those things on separate drives, so a relative path between them does not exist. This has made me effectively unable to use mach at all.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
There were a bunch of locations where we were doing path shenanigans
with requirements.pth/.vendored items.
There was a bit of complexity because we were specifically making each
pthfile line be a relative path to support moving the Firefox
topsrcdir without causing issues.
However, now that we're more intelligent about checking if pthfile
lines are up-to-date (and since moving your topsrcdir will still require
re-generating the Mach virtualenv), this behaviour became less useful.
So, generalize MachEnvRequirements -> "sys.path lines" logic and
reuse it everywhere.
| Assignee | ||
Comment 2•4 years ago
|
||
Molly can you try moz-phab patch --apply-to=here D129693 and see if it resolves the issue for you?
| Reporter | ||
Comment 3•4 years ago
|
||
That does seem to have done the trick, yeah; everything seems to be working normally now. Thanks for jumping on this so quick!
Updated•4 years ago
|
Comment 5•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Updated•4 years ago
|
Description
•