diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-30 03:52:21 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-30 03:52:21 (GMT) |
commit | 5b7e9d76f39dbf63573519c178835f72e5a5027a (patch) | |
tree | 96b04b9d52d875c9f39d148d88efeafb5184fd35 /Lib/distutils/extension.py | |
parent | a73bfee73da519a508e7d95bc55c1984ae7089bd (diff) | |
download | cpython-5b7e9d76f39dbf63573519c178835f72e5a5027a.zip cpython-5b7e9d76f39dbf63573519c178835f72e5a5027a.tar.gz cpython-5b7e9d76f39dbf63573519c178835f72e5a5027a.tar.bz2 |
General cleanup, raise normalization in Lib/distutils.
Diffstat (limited to 'Lib/distutils/extension.py')
-rw-r--r-- | Lib/distutils/extension.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/distutils/extension.py b/Lib/distutils/extension.py index 43b0d3f..7f5954e 100644 --- a/Lib/distutils/extension.py +++ b/Lib/distutils/extension.py @@ -86,7 +86,7 @@ class Extension: # When adding arguments to this constructor, be sure to update # setup_keywords in core.py. - def __init__ (self, name, sources, + def __init__(self, name, sources, include_dirs=None, define_macros=None, undef_macros=None, @@ -125,17 +125,15 @@ class Extension: # If there are unknown keyword options, warn about them if len(kw): - L = kw.keys() ; L.sort() - L = map(repr, L) + L = map(repr, sorted(kw)) msg = "Unknown Extension options: " + ', '.join(L) if warnings is not None: warnings.warn(msg) else: sys.stderr.write(msg + '\n') -# class Extension -def read_setup_file (filename): +def read_setup_file(filename): from distutils.sysconfig import \ parse_makefile, expand_makefile_vars, _variable_rx from distutils.text_file import TextFile @@ -151,7 +149,7 @@ def read_setup_file (filename): lstrip_ws=1, rstrip_ws=1) extensions = [] - while 1: + while True: line = file.readline() if line is None: # eof break @@ -241,5 +239,3 @@ def read_setup_file (filename): # 'lib_args': library_args } return extensions - -# read_setup_file () |