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

Side by Side Diff: Lib/distutils/sysconfig.py

Issue 18211: -Werror=statement-after-declaration problem
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:
View unified diff | Download patch
« no previous file with comments | « no previous file | Lib/sysconfig.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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' and not python_build:
333 print("BASECFLAGS", python_build)
334 done[n] = done[n].replace('-Werror=declaration-after-sta tement', '')
332 else: 335 else:
333 done[n] = v 336 done[n] = v
334 337
335 # Variables with a 'PY_' prefix in the makefile. These need to 338 # Variables with a 'PY_' prefix in the makefile. These need to
336 # be made available without that prefix through sysconfig. 339 # be made available without that prefix through sysconfig.
337 # Special care is needed to ensure that variable expansion works, even 340 # Special care is needed to ensure that variable expansion works, even
338 # if the expansion uses the name without a prefix. 341 # if the expansion uses the name without a prefix.
339 renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS') 342 renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')
340 343
341 # do variable interpolation here 344 # do variable interpolation here
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 return vals 565 return vals
563 else: 566 else:
564 return _config_vars 567 return _config_vars
565 568
566 def get_config_var(name): 569 def get_config_var(name):
567 """Return the value of a single variable using the dictionary 570 """Return the value of a single variable using the dictionary
568 returned by 'get_config_vars()'. Equivalent to 571 returned by 'get_config_vars()'. Equivalent to
569 get_config_vars().get(name) 572 get_config_vars().get(name)
570 """ 573 """
571 return get_config_vars().get(name) 574 return get_config_vars().get(name)
OLDNEW
« no previous file with comments | « no previous file | Lib/sysconfig.py » ('j') | no next file with comments »

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