-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mach build fails #2
Comments
worked around virtualenv misbehavior ~/src/firefox-102.9.0> git diff python/mach/mach/site.py
diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
index 7065f60020..af1343dd27 100644
--- a/python/mach/mach/site.py
+++ b/python/mach/mach/site.py
@@ -756,7 +756,7 @@ class PythonVirtualenv:
self.bin_path = os.path.join(prefix, "Scripts")
self.python_path = os.path.join(self.bin_path, "python.exe")
else:
- self.bin_path = os.path.join(prefix, "bin")
+ self.bin_path = os.path.join(prefix, 'non-packaged', "bin")
self.python_path = os.path.join(self.bin_path, "python")
self.prefix = prefix
@@ -779,7 +779,7 @@ class PythonVirtualenv:
normalized_venv_root = os.path.normpath(self.prefix)
# Path to virtualenv's "site-packages" directory for provided sysconfig path
- return os.path.join(normalized_venv_root, relative_path)
+ return os.path.join(normalized_venv_root, 'non-packaged', relative_path)
def site_packages_dirs(self):
dirs = [] I have no idea why Haiku's virtualenv copys python and site-pacakges inside non-packaged subdir. |
Start failing on created virtualenv
indeed, this time this output has something to do with this:
|
sys.prefix doesn't work well. working around this diff --git a/configure.py b/configure.py
index dd12c8f432..7bd11bb637 100644
--- a/configure.py
+++ b/configure.py
@@ -314,7 +314,7 @@ def _activate_build_virtualenv():
print(f"Using Python {version} from {sys.executable}")
active_site = MozSiteMetadata.from_runtime()
- if active_site and active_site.site_name == "build":
+ if active_site and active_site.site_name == "build" or '/build/' in sys.executable :
# We're already running within the "build" virtualenv, no additional work is
# needed.
return Now, next failure
|
Installing mozfile from pip proceed build
sys.path is this
|
I'm searching why sys.path is not inherited correctly. But not easy.
|
I thought "mach" venv is not expected state, but:
but the incorrect mach venv from here. This code expects we're in the "build" venv if this called from mach-managed code. def _activate_build_virtualenv():
"""Ensure that the build virtualenv is activated
configure.py may be executed through Mach, or via "./configure, make".
In the first case, the build virtualenv should already be activated.
In the second case, we're likely being executed with the system Python, and must
prepare the virtualenv and activate it ourselves.
"""
version = ".".join(str(i) for i in sys.version_info[0:3])
print(f"Using Python {version} from {sys.executable}")
active_site = MozSiteMetadata.from_runtime()
if active_site and active_site.site_name == "build":
# We're already running within the "build" virtualenv, no additional work is
# needed.
return
# We're using the system python (or are nested within a non-build mach-managed
# virtualenv), so we should activate the build virtualenv as expected by the rest of
# configure.
topobjdir = os.path.realpath(".")
topsrcdir = os.path.realpath(os.path.dirname(__file__))
mach_site = MachSiteManager(
topsrcdir,
None,
MachEnvRequirements(),
ExternalPythonSite(sys.executable),
SitePackagesSource.NONE,
)
mach_site.activate() |
I guess newer python which venv integrated is not compatible with virtualenv.py. VIRTUALENV environment variable was set, but not to be used. Maybe from this, invoked subprocess doesn't inherit correct sys.prefix
|
FreeBSD port uses autoconf213 and older sourcetree looks supporting it. https://cgit.freebsd.org/ports/tree/www/firefox-esr/Makefile#n65 |
--disable-pulseaudio or --disable-audio-backends or specfying oss(opensound) for audio-backend if no backend isn't allowed. https://searchfox.org/mozilla-esr102/source/toolkit/moz.configure#267 |
after fixing #9 (comment) now mach itself start working. |
The text was updated successfully, but these errors were encountered: