Skip to content
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

SCons: Bump minimum version of SCons to 4.0 & Python to 3.8 #99134

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Nov 12, 2024

As discussed in this RocketChat thread1, the bump to Ubuntu 22.04 for our GitHub Actions have raised the lower bounds of support for both Python and SCons. As our current minimum versions for both (3.1.2 for SCons & 3.6 for Python) are well into EOL as-is, it feels ideal to bump the versions in tandem. In contrast to previous PRs trying to have other changes in tandem, this is strictly focused on bumping the minimum versions

Immediate benefits include:

  • Having a minimum Python version that matches the minimum supported version for mypy.
  • Bumping Ruff's minimum version to 3.8 as well, now matching versions
  • Single baseline OS for Linux builds

Footnotes

  1. https://chat.godotengine.org/channel/buildsystem?msg=Wuq39TCvaHTSiSAuL

@akien-mga
Copy link
Member

You can add at least those changes too:

diff --git a/SConstruct b/SConstruct
index ee34d421e0..0eba4c3f7b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1060,13 +1060,6 @@ if env["vsproj"]:
     env.vs_srcs = []
 
 if env["compiledb"]:
-    if env.scons_version < (4, 0, 0):
-        # Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.
-        print_error(
-            "The `compiledb=yes` option requires SCons 4.0 or later, but your version is %s." % scons_raw_version
-        )
-        Exit(255)
-
     env.Tool("compilation_db")
     env.Alias("compiledb", env.CompilationDatabase())
 
diff --git a/methods.py b/methods.py
index 64c3839718..1fb6f367b0 100644
--- a/methods.py
+++ b/methods.py
@@ -409,8 +409,7 @@ def use_windows_spawn_fix(self, platform=None):
             "shell": False,
             "env": env,
         }
-        if sys.version_info >= (3, 7, 0):
-            popen_args["text"] = True
+        popen_args["text"] = True
         proc = subprocess.Popen(cmdline, **popen_args)
         _, err = proc.communicate()
         rv = proc.wait()

SCons: 3.1.2 → 4.0
Python: 3.6 → 3.8
@Repiteo Repiteo force-pushed the scons/bump-scons-python branch from 378b1e1 to 66fe2c8 Compare November 12, 2024 17:30
@Repiteo Repiteo merged commit 06d2ec4 into godotengine:master Nov 13, 2024
20 checks passed
@Repiteo Repiteo deleted the scons/bump-scons-python branch November 13, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants