summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/extension.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 (GMT)
commit3679727939a9d25ccfe057e71e8a4b8be73d47ce (patch)
tree88326b8ec80cf57f51d2e093143e233ec4ce1be5 /Lib/distutils/extension.py
parent5db0c94072abad10c9d2df99eefd1f51eb84f2bc (diff)
downloadcpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.zip
cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.tar.gz
cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.tar.bz2
reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Diffstat (limited to 'Lib/distutils/extension.py')
-rw-r--r--Lib/distutils/extension.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/Lib/distutils/extension.py b/Lib/distutils/extension.py
index ebe5437..5c07bda 100644
--- a/Lib/distutils/extension.py
+++ b/Lib/distutils/extension.py
@@ -6,6 +6,7 @@ modules in setup scripts."""
__revision__ = "$Id$"
import os
+import sys
import warnings
# This class is really only used by the "build_ext" command, so it might
@@ -134,17 +135,14 @@ class Extension:
def read_setup_file(filename):
"""Reads a Setup file and returns Extension instances."""
- warnings.warn('distutils.extensions.read_setup_file is deprecated. '
- 'It will be removed in the next Python release.')
- _sysconfig = __import__('sysconfig')
- from distutils.sysconfig import (expand_makefile_vars,
+ from distutils.sysconfig import (parse_makefile, expand_makefile_vars,
_variable_rx)
from distutils.text_file import TextFile
from distutils.util import split_quoted
# First pass over the file to gather "VAR = VALUE" assignments.
- vars = _sysconfig._parse_makefile(filename)
+ vars = parse_makefile(filename)
# Second pass to gobble up the real content: lines of the form
# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
@@ -164,10 +162,7 @@ def read_setup_file(filename):
file.warn("'%s' lines not handled yet" % line)
continue
- with warnings.catch_warnings():
- warnings.simplefilter("ignore")
- line = expand_makefile_vars(line, vars)
-
+ line = expand_makefile_vars(line, vars)
words = split_quoted(line)
# NB. this parses a slightly different syntax than the old