Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Delta Between Two Patch Sets: Lib/distutils/sysconfig.py

Issue 18211: -Werror=statement-after-declaration problem
Left Patch Set: Created 6 years, 9 months ago
Right Patch Set: Created 6 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/sysconfig.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 """Provide access to Python's configuration information. The specific 1 """Provide access to Python's configuration information. The specific
2 configuration variables available depend heavily on the platform and 2 configuration variables available depend heavily on the platform and
3 configuration. The values may be retrieved using 3 configuration. The values may be retrieved using
4 get_config_var(name), and the list of variables is available via 4 get_config_var(name), and the list of variables is available via
5 get_config_vars().keys(). Additional convenience functions are also 5 get_config_vars().keys(). Additional convenience functions are also
6 available. 6 available.
7 7
8 Written by: Fred L. Drake, Jr. 8 Written by: Fred L. Drake, Jr.
9 Email: <fdrake@acm.org> 9 Email: <fdrake@acm.org>
10 """ 10 """
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 tmpv = v.replace('$$', '') 322 tmpv = v.replace('$$', '')
323 323
324 if "$" in tmpv: 324 if "$" in tmpv:
325 notdone[n] = v 325 notdone[n] = v
326 else: 326 else:
327 try: 327 try:
328 v = int(v) 328 v = int(v)
329 except ValueError: 329 except ValueError:
330 # insert literal `$' 330 # insert literal `$'
331 done[n] = v.replace('$$', '$') 331 done[n] = v.replace('$$', '$')
332 if n == 'BASECFLAGS': 332 if n == 'BASECFLAGS' and not python_build:
333 print("BASECFLAGS", python_build)
333 done[n] = done[n].replace('-Werror=declaration-after-sta tement', '') 334 done[n] = done[n].replace('-Werror=declaration-after-sta tement', '')
334 else: 335 else:
335 done[n] = v 336 done[n] = v
336 337
337 # Variables with a 'PY_' prefix in the makefile. These need to 338 # Variables with a 'PY_' prefix in the makefile. These need to
338 # be made available without that prefix through sysconfig. 339 # be made available without that prefix through sysconfig.
339 # Special care is needed to ensure that variable expansion works, even 340 # Special care is needed to ensure that variable expansion works, even
340 # if the expansion uses the name without a prefix. 341 # if the expansion uses the name without a prefix.
341 renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS') 342 renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')
342 343
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 return vals 565 return vals
565 else: 566 else:
566 return _config_vars 567 return _config_vars
567 568
568 def get_config_var(name): 569 def get_config_var(name):
569 """Return the value of a single variable using the dictionary 570 """Return the value of a single variable using the dictionary
570 returned by 'get_config_vars()'. Equivalent to 571 returned by 'get_config_vars()'. Equivalent to
571 get_config_vars().get(name) 572 get_config_vars().get(name)
572 """ 573 """
573 return get_config_vars().get(name) 574 return get_config_vars().get(name)
LEFTRIGHT
« no previous file | Lib/sysconfig.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+