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

Allow order in which SConscript files are read to be set. #20

Merged
merged 2 commits into from Aug 14, 2016

Conversation

timj
Copy link
Member

@timj timj commented Aug 9, 2016

No description provided.

if b.startswith(item):
bi = i
return cmp(ai, bi)
scripts.sort(cmp=cmpOrder)
Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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.

@@ -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
Copy link
Member Author

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?

Copy link
Member

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.

@TallJimbo TallJimbo merged commit 9b20f32 into master Aug 14, 2016
@ktlim ktlim deleted the tickets/DM-7179 branch August 25, 2018 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants