Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (c0b14b45df3aba30051a53bdd7b73dd050522669)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (c0b14b45df3aba30051a53bdd7b73dd050522669)
  • Date: Tue, 10 Dec 2024 06:26:15 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/DETAILS | 2
http/firefox/HISTORY | 4
http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch | 119
++++++++++
3 files changed, 124 insertions(+), 1 deletion(-)

New commits:
commit c0b14b45df3aba30051a53bdd7b73dd050522669
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: version 133.0.3

diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index bae4513..bf32224 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,5 +1,5 @@
SPELL=firefox
- VERSION=133.0
+ VERSION=133.0.3
SECURITY_PATCH=201
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 94e9a31..d1810d8 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,7 @@
+2024-12-10 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 133.0.3
+ * patches/*: updated
+
2024-11-26 Pavel Vinogradov <public AT sourcemage.org>
* patches/*: updated

diff --git
a/http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
b/http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
new file mode 100644
index 0000000..bbf9b2f
--- /dev/null
+++ b/http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
@@ -0,0 +1,119 @@
+diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
+--- a/python/mach/mach/site.py
++++ b/python/mach/mach/site.py
+@@ -15,10 +15,11 @@
+ import site
+ import subprocess
+ import sys
+ import sysconfig
+ import tempfile
++import warnings
+ from contextlib import contextmanager
+ from pathlib import Path
+ from typing import Callable, Optional
+
+ from mach.requirements import (
+@@ -817,37 +818,79 @@
+
+ class PythonVirtualenv:
+ """Calculates paths of interest for general python virtual
environments"""
+
+ def __init__(self, prefix):
+- if _is_windows:
+- 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.python_path = os.path.join(self.bin_path, "python")
+ self.prefix = os.path.realpath(prefix)
++ self.paths = self._get_sysconfig_paths(self.prefix)
+
+- @functools.lru_cache(maxsize=None)
+- def resolve_sysconfig_packages_path(self, sysconfig_path):
+- # macOS uses a different default sysconfig scheme based on whether
it's using the
+- # system Python or running in a virtualenv.
+- # Manually define the scheme (following the implementation in
+- # "sysconfig._get_default_scheme()") so that we're always following
the
+- # code path for a virtualenv directory structure.
+- if os.name == "posix":
+- scheme = "posix_prefix"
+- else:
+- scheme = os.name
++ # Name of the Python executable to use in virtual environments.
++ # An executable with the same name as sys.executable might not
exist in
++ # virtual environments. An executable with 'python' as the steam —
++ # without version numbers or ABI flags — will always be present in
++ # virtual environments, so we use that.
++ python_exe_name = "python" + sysconfig.get_config_var("EXE")
++
++ self.bin_path = self.paths["scripts"]
++ self.python_path = os.path.join(self.bin_path, python_exe_name)
+
+- sysconfig_paths = sysconfig.get_paths(scheme)
+- data_path = Path(sysconfig_paths["data"])
+- path = Path(sysconfig_paths[sysconfig_path])
+- relative_path = path.relative_to(data_path)
++ @staticmethod
++ def _get_sysconfig_paths(prefix):
++ """Calculate the sysconfig paths of a virtual environment in the
given prefix.
+
+- # Path to virtualenv's "site-packages" directory for provided
sysconfig path
+- return os.path.normpath(os.path.normcase(Path(self.prefix) /
relative_path))
++ The virtual environment MUST be using the same Python distribution
as us.
++ """
++ # Determine the sysconfig scheme used in virtual environments
++ if "venv" in sysconfig.get_scheme_names():
++ # A 'venv' scheme was added in Python 3.11 to allow users to
++ # calculate the paths for a virtual environment, since the
default
++ # scheme may not always be the same as used on virtual
environments.
++ # Some common examples are the system Python distributed by
macOS,
++ # Debian, and Fedora.
++ # For more information, see
https://github.com/python/cpython/issues/89576
++ venv_scheme = "venv"
++ elif os.name == "nt":
++ # We know that before the 'venv' scheme was added, on Windows,
++ # the 'nt' scheme was used in virtual environments.
++ venv_scheme = "nt"
++ elif os.name == "posix":
++ # We know that before the 'venv' scheme was added, on POSIX,
++ # the 'posix_prefix' scheme was used in virtual environments.
++ venv_scheme = "posix_prefix"
++ else:
++ # This should never happen with upstream Python, as the 'venv'
++ # scheme should always be available on >=3.11, and no other
++ # platforms are supported by the upstream on older Python
versions.
++ #
++ # Since the 'venv' scheme isn't available, and we have no
knowledge
++ # of this platform/distribution, fallback to the default scheme.
++ #
++ # Hitting this will likely be the result of running a custom
Python
++ # distribution targetting a platform that is not supported by
the
++ # upstream.
++ # In this case, unless the Python vendor patched the Python
++ # distribution in such a way as the default scheme may not
always be
++ # the same scheme, using the default scheme should be correct.
++ # If the vendor did patch Python as such, to work around this
issue,
++ # I would recommend them to define a 'venv' scheme that matches
++ # the layout used on virtual environments in their Python
distribution.
++ # (rec. signed Filipe Laíns — upstream sysconfig maintainer)
++ venv_scheme = sysconfig.get_default_scheme()
++ warnings.warn(
++ f"Unknown platform '{os.name}', using the default install
scheme '{venv_scheme}'. "
++ "If this is incorrect, please ask your Python vendor to add
a 'venv' sysconfig scheme "
++ "(see https://github.com/python/cpython/issues/89576, or
check the code comment).",
++ stacklevel=2,
++ )
++ # Build the sysconfig config_vars dictionary for the virtual
environment.
++ venv_vars = sysconfig.get_config_vars().copy()
++ venv_vars["base"] = venv_vars["platbase"] = prefix
++ # Get sysconfig paths for the virtual environment.
++ return sysconfig.get_paths(venv_scheme, vars=venv_vars)
++
++ def resolve_sysconfig_packages_path(self, sysconfig_path):
++ return self.paths[sysconfig_path]
+
+ def site_packages_dirs(self):
+ dirs = []
+ if sys.platform.startswith("win"):
+ dirs.append(os.path.normpath(os.path.normcase(self.prefix)))
+


  • [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (c0b14b45df3aba30051a53bdd7b73dd050522669), Pavel Vinogradov, 12/10/2024

Archive powered by MHonArc 2.6.24.

Top of Page