1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

SCons: use OrderedDict to ensure insertion order of modules

The insertion order for dictionaries is only a language feature for
Python 3.6/3.7+ implementations, and not prior to that.

This ensures that the engine won't be rebuilt if the order of detected
modules changes in any way, as the `OrderedDict` should guarantee
inerstion order.
This commit is contained in:
Andrii Doroshenko (Xrayez)
2020-05-28 16:48:19 +03:00
parent 757d8b5672
commit 0138ba59ac
2 changed files with 6 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ import os
import re
import glob
import subprocess
from collections import OrderedDict
from compat import iteritems, isbasestring, decode_utf8
@@ -131,7 +132,7 @@ def parse_cg_file(fname, uniforms, sizes, conditionals):
def detect_modules(at_path):
module_list = {} # name : path
module_list = OrderedDict() # name : path
modules_glob = os.path.join(at_path, "*")
files = glob.glob(modules_glob)