summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2023-11-15 15:19:56 +0000
committerNirbheek Chauhan <nirbheek@centricular.com>2023-11-15 16:47:39 +0000
commit23e44070ea832081b5fdb249428ad1d36bec48a4 (patch)
treef737543e7c4f0debbcb49b1f1d95bdb4b3df1a4b
parent55648bf7d7e7fa280fdb6e47de31bbec4bab0dc9 (diff)
cerbero: Fix bootstrap on Windows with Python 3.12
Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/427 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1301>
-rw-r--r--cerbero/config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cerbero/config.py b/cerbero/config.py
index e2ad7138..dadbce34 100644
--- a/cerbero/config.py
+++ b/cerbero/config.py
@@ -215,6 +215,11 @@ class Config (object):
setattr(self, a, None)
self.arch_config = {self.target_arch: self}
+ # Starting with Python 3.12, subprocess.py looks at these case-sensitively
+ if 'COMSPEC' in os.environ:
+ os.environ['ComSpec'] = os.environ['COMSPEC']
+ if 'SYSTEMROOT' in os.environ:
+ os.environ['SystemRoot'] = os.environ['SYSTEMROOT']
# Store raw os.environ data
self._pre_environ = os.environ.copy()
self.config_env = os.environ.copy()