summaryrefslogtreecommitdiff
path: root/Lib/distutils/core.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-12-21 01:49:00 +0000
committerTarek Ziadé <ziade.tarek@gmail.com>2009-12-21 01:49:00 +0000
commit88e2c5d35a9ce74e779bfc5cb38624bef49c695f (patch)
treec9b8985c220a5d99d1caae8c25c8d654be47bac0 /Lib/distutils/core.py
parent8b9361a26df8b336d08de6a59387c56be520591f (diff)
downloadcpython-git-88e2c5d35a9ce74e779bfc5cb38624bef49c695f.tar.gz
Merged revisions 76956 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76956 | tarek.ziade | 2009-12-21 02:22:46 +0100 (Mon, 21 Dec 2009) | 1 line massive import cleaning in Distutils ........
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r--Lib/distutils/core.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index 95c035742e..c820a420b9 100644
--- a/Lib/distutils/core.py
+++ b/Lib/distutils/core.py
@@ -8,10 +8,12 @@ really defined in distutils.dist and distutils.cmd.
__revision__ = "$Id$"
-import sys, os
+import sys
+import os
from distutils.debug import DEBUG
-from distutils.errors import *
+from distutils.errors import (DistutilsSetupError, DistutilsArgError,
+ DistutilsError, CCompilerError)
from distutils.util import grok_environment_error
# Mainly import these so setup scripts can "from distutils.core import" them.
@@ -31,7 +33,7 @@ usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: %(script)s cmd --help
"""
-def gen_usage (script_name):
+def gen_usage(script_name):
script = os.path.basename(script_name)
return USAGE % vars()
@@ -56,7 +58,7 @@ extension_keywords = ('name', 'sources', 'include_dirs',
'extra_objects', 'extra_compile_args', 'extra_link_args',
'swig_opts', 'export_symbols', 'depends', 'language')
-def setup (**attrs):
+def setup(**attrs):
"""The gateway to the Distutils: do everything your setup script needs
to do, in a highly flexible and user-driven way. Briefly: create a
Distribution instance; find and parse config files; parse the command
@@ -168,10 +170,8 @@ def setup (**attrs):
return dist
-# setup ()
-
-def run_setup (script_name, script_args=None, stop_after="run"):
+def run_setup(script_name, script_args=None, stop_after="run"):
"""Run a setup script in a somewhat controlled environment, and
return the Distribution instance that drives things. This is useful
if you need to find out the distribution meta-data (passed as
@@ -234,7 +234,4 @@ def run_setup (script_name, script_args=None, stop_after="run"):
# I wonder if the setup script's namespace -- g and l -- would be of
# any interest to callers?
- #print "_setup_distribution:", _setup_distribution
return _setup_distribution
-
-# run_setup ()