Skip to content

Commit 9fbf759

Browse files
committed
Override dependency version python
1 parent 2d70f99 commit 9fbf759

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

relenv/build/windows.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ def populate_env(env, dirs):
3636
env["MSBUILDDISABLENODEREUSE"] = "1"
3737

3838

39+
def patch_file(path, old, new):
40+
with open(path, "r") as fp:
41+
content = fp.read()
42+
new_content = ""
43+
for line in content.splitlines():
44+
line.replace(old, new)
45+
new_content += line + os.linesp
46+
with open(path, "w") as fp:
47+
fp.write(new_content)
48+
49+
50+
def override_dependency_string(dirs, old, new):
51+
patch_file(dirs.source / "PCbuild" / "python.props", old, new)
52+
patch_file(dirs.source / "PCbuild" / "get_externals.bat", old, new)
53+
54+
55+
3956
def build_python(env, dirs, logfp):
4057
"""
4158
Run the commands to build Python.
@@ -47,6 +64,10 @@ def build_python(env, dirs, logfp):
4764
:param logfp: A handle for the log file
4865
:type logfp: file
4966
"""
67+
68+
# Override default versions
69+
override_dependency(dirs, "sqlite-3.40.1.0", "sqlite-3.50.4.0")
70+
5071
arch_to_plat = {
5172
"amd64": "x64",
5273
"x86": "win32",

0 commit comments

Comments
 (0)