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

Side by Side Diff: Lib/sysconfig.py

Issue 18211: -Werror=statement-after-declaration problem
Patch Set: Created 6 years, 11 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 | « Lib/distutils/sysconfig.py ('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 """Access to Python's configuration information.""" 1 """Access to Python's configuration information."""
2 2
3 import os 3 import os
4 import re 4 import re
5 import sys 5 import sys
6 from os.path import pardir, realpath 6 from os.path import pardir, realpath
7 7
8 __all__ = [ 8 __all__ = [
9 'get_config_h_filename', 9 'get_config_h_filename',
10 'get_config_var', 10 'get_config_var',
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 tmpv = v.replace('$$', '') 245 tmpv = v.replace('$$', '')
246 246
247 if "$" in tmpv: 247 if "$" in tmpv:
248 notdone[n] = v 248 notdone[n] = v
249 else: 249 else:
250 try: 250 try:
251 v = int(v) 251 v = int(v)
252 except ValueError: 252 except ValueError:
253 # insert literal `$' 253 # insert literal `$'
254 done[n] = v.replace('$$', '$') 254 done[n] = v.replace('$$', '$')
255 if n == 'BASECFLAGS':
256 done[n] = done[n].replace('-Werror=declaration-after-sta tement', '')
255 else: 257 else:
256 done[n] = v 258 done[n] = v
257 259
258 # do variable interpolation here 260 # do variable interpolation here
259 variables = list(notdone.keys()) 261 variables = list(notdone.keys())
260 262
261 # Variables with a 'PY_' prefix in the makefile. These need to 263 # Variables with a 'PY_' prefix in the makefile. These need to
262 # be made available without that prefix through sysconfig. 264 # be made available without that prefix through sysconfig.
263 # Special care is needed to ensure that variable expansion works, even 265 # Special care is needed to ensure that variable expansion works, even
264 # if the expansion uses the name without a prefix. 266 # if the expansion uses the name without a prefix.
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 print('Python version: "%s"' % get_python_version()) 693 print('Python version: "%s"' % get_python_version())
692 print('Current installation scheme: "%s"' % _get_default_scheme()) 694 print('Current installation scheme: "%s"' % _get_default_scheme())
693 print() 695 print()
694 _print_dict('Paths', get_paths()) 696 _print_dict('Paths', get_paths())
695 print() 697 print()
696 _print_dict('Variables', get_config_vars()) 698 _print_dict('Variables', get_config_vars())
697 699
698 700
699 if __name__ == '__main__': 701 if __name__ == '__main__':
700 _main() 702 _main()
OLDNEW
« no previous file with comments | « Lib/distutils/sysconfig.py ('k') | no next file » | no next file with comments »

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