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: Restore compatibility with SCons < 4.0.0 #92041

Merged

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented May 17, 2024

I'm not familiar with the Python semantics of {**a, **b} (I literally learned about it when working on #91792), but it seems like SCons Environment before 4.0.0 doesn't automatically expose its internal dictionary to this operator.

Calling SubstitutionEnvironment.Dictionary() explicitly seems to do the trick and it still works for the following versions I could test:

  • 3.0.0
  • 3.1.0
  • 3.1.1
  • 3.1.2
  • 4.0.0
  • 4.1.0
  • 4.7.0

I couldn't test 3.0.x because this version requires the imp module, which has been removed in Python 3.12. I'll see if I can add a CI build using SCons 3.0.0 on Python 3.11 so we can properly test its support, until we eventually decide to bump our minimum required version.

Edit: I could test 3.0.0 in a python:3.6 podman container, works fine with this PR.
Edit 2: On the other hand, testing on CI showed that SCons 3.0.0 still has breaking issues, so we're bumping the min version to 3.1.0 3.1.2 in #92043.

CC @Repiteo @AThousandShips

@akien-mga akien-mga merged commit 5b34162 into godotengine:master May 17, 2024
16 checks passed
@akien-mga akien-mga deleted the scons-restore-compat-pre-4.0.0 branch May 17, 2024 09:17
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.

Older versions of SCons are no longer supported
2 participants