Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: scons-2.0.1/script/scons

Issue 6731096: Patched the new version of SCons to work around a Mac+Python+Toolchain bug. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/third_party/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scons-2.0.1/README.nacl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # 2 #
3 # SCons - a Software Constructor 3 # SCons - a Software Constructor
4 # 4 #
5 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The S Cons Foundation 5 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The S Cons Foundation
6 # 6 #
7 # Permission is hereby granted, free of charge, to any person obtaining 7 # Permission is hereby granted, free of charge, to any person obtaining
8 # a copy of this software and associated documentation files (the 8 # a copy of this software and associated documentation files (the
9 # "Software"), to deal in the Software without restriction, including 9 # "Software"), to deal in the Software without restriction, including
10 # without limitation the rights to use, copy, modify, merge, publish, 10 # without limitation the rights to use, copy, modify, merge, publish,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 else: 154 else:
155 # Split /usr/libfoo/python*/os.py to /usr/libfoo/python*. 155 # Split /usr/libfoo/python*/os.py to /usr/libfoo/python*.
156 libpath, tail = os.path.split(libpath) 156 libpath, tail = os.path.split(libpath)
157 # Split /usr/libfoo/python* to /usr/libfoo 157 # Split /usr/libfoo/python* to /usr/libfoo
158 libpath, tail = os.path.split(libpath) 158 libpath, tail = os.path.split(libpath)
159 # Check /usr/libfoo/scons*. 159 # Check /usr/libfoo/scons*.
160 prefs.append(libpath) 160 prefs.append(libpath)
161 161
162 try: 162 try:
163 import pkg_resources 163 import pkg_resources
164 except ImportError: 164 # BEGIN MODIFICATION
165 # It is known that importing pkg_resources can result in:
166 # An ImportError or
167 # A distutils.errors.DistutilsPlatformError
168 # (See: http://bugs.python.org/issue9516)
169 # The upstream version of SCons only catches an ImportError.
170 # The other exception gets throw on the Mac toolchain bot because it
171 # sets MACOSX_DEPLOYMENT_TARGET to an older version.
172 # In practice, it doesn't matter why importing pkg_resources fails, so
173 # it's reasonable to catch every exception.
174 except Exception:
175 # END MODIFICATION
165 pass 176 pass
166 else: 177 else:
167 # when running from an egg add the egg's directory 178 # when running from an egg add the egg's directory
168 try: 179 try:
169 d = pkg_resources.get_distribution('scons') 180 d = pkg_resources.get_distribution('scons')
170 except pkg_resources.DistributionNotFound: 181 except pkg_resources.DistributionNotFound:
171 pass 182 pass
172 else: 183 else:
173 prefs.append(d.location) 184 prefs.append(d.location)
174 185
(...skipping 12 matching lines...) Expand all
187 import SCons.Script 198 import SCons.Script
188 # this does all the work, and calls sys.exit 199 # this does all the work, and calls sys.exit
189 # with the proper exit status when done. 200 # with the proper exit status when done.
190 SCons.Script.main() 201 SCons.Script.main()
191 202
192 # Local Variables: 203 # Local Variables:
193 # tab-width:4 204 # tab-width:4
194 # indent-tabs-mode:nil 205 # indent-tabs-mode:nil
195 # End: 206 # End:
196 # vim: set expandtab tabstop=4 shiftwidth=4: 207 # vim: set expandtab tabstop=4 shiftwidth=4:
OLDNEW
« no previous file with comments | « scons-2.0.1/README.nacl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698