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
Allow order in which SConscript files are read to be set. #20
Conversation
if b.startswith(item): | ||
bi = i | ||
return cmp(ai, bi) | ||
scripts.sort(cmp=cmpOrder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future deprecation warning: cmp
is not allowed in Python 3 sort. Use key
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does key
take a function in Python 3? This implementation won't work at all unless that's the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I'm an idiot. I knew how key
worked - I just thought we needed it to work like cmp
to implement this sorting, which is what I meant to ask. Obviously that's not the case. Fixed to use key
.
7a5c657
to
ba4f778
Compare
@@ -102,15 +109,26 @@ def initialize(cls, packageName, versionString=None, eupsProduct=None, eupsProdu | |||
except TypeError: | |||
pass | |||
state.targets["version"] = state.env.VersionModule(versionModuleName) | |||
scripts = [] | |||
for root, dirs, files in os.walk("."): | |||
if "SConstruct" in files and root != ".": | |||
dirs[:] = [] | |||
continue | |||
dirs[:] = [d for d in dirs if not d.startswith('.')] | |||
dirs.sort() # happy coincidence that include < libs < python < tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this happy coincidence still relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch; I'd meant to remove that whole line (and I will now). It should not be relevant.
97bad48
to
1780e04
Compare
1780e04
to
9b20f32
Compare
No description provided.