[SERVER-30300] Remove python2 print expression usage from SCons files Created: 25/Jul/17  Updated: 30/Oct/23  Resolved: 15/Sep/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.6.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 2017-08-21, Platforms 2017-09-11, Platforms 2017-10-02
Participants:

 Description   

Future proof our SCons files against SCons 3.0, which will permit usage of python 3.



 Comments   
Comment by Ramon Fernandez Marina [ 15/Sep/17 ]

Author:

{'username': u'acmorrow', 'name': u'William Deegan', 'email': u'bill@baddogconsulting.com'}

Message:SERVER-30300 Changes to allow build to work with SCons 3.0. Entirely changes to print calls

Signed-off-by: Andrew Morrow <acm@mongodb.com>
Branch:master
https://github.com/mongodb/mongo/commit/e9570ae0bc9dae3823ee2ef815251c02ff50e2bc

Comment by Andrew Morrow (Inactive) [ 14/Sep/17 ]

Thanks, that does exactly what I need.

Comment by bdbaddog#1 [ 14/Sep/17 ]

@Andrew Morrow - I think it's this one:
https://bitbucket.org/bdbaddog/scons-bugfixes/commits/996d359c35f5a7abf8b91b7095ff27d38780627c

Which is pretty big.
I'd try just adding :
from _future_ import print_function

To
src / engine / SCons / Script / SConscript.py

From a quick read it looks like the sconscripts are exec'ed with globals from that context. (See: https://bitbucket.org/bdbaddog/scons-bugfixes/annotate/f8b1f621e2957ddd6b7ca167892d058538583b36/src/engine/SCons/Script/SConscript.py?at=default&fileviewer=file-view-default#SConscript.py-168)

Comment by Andrew Morrow (Inactive) [ 14/Sep/17 ]

bdbaddog - Did you track down a link to the 3.0 commit that achieved this when evaluating SConscripts? I'd like to cherry-pick it into our vendored SCons 2.5, if possible.

Comment by Andrew Morrow (Inactive) [ 25/Jul/17 ]

We should consider backporting this as well, so that if in the future we upgrade our vendored SCons to 3.0, we can do so across all branches.

Generated at Thu Feb 08 04:23:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.