summaryrefslogtreecommitdiff
path: root/setuptools/_distutils/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/_distutils/core.py')
-rw-r--r--setuptools/_distutils/core.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/setuptools/_distutils/core.py b/setuptools/_distutils/core.py
index 305ecf69..333596ac 100644
--- a/setuptools/_distutils/core.py
+++ b/setuptools/_distutils/core.py
@@ -11,7 +11,12 @@ import sys
import tokenize
from distutils.debug import DEBUG
-from distutils.errors import *
+from distutils.errors import (
+ DistutilsSetupError,
+ DistutilsError,
+ CCompilerError,
+ DistutilsArgError,
+)
# Mainly import these so setup scripts can "from distutils.core import" them.
from distutils.dist import Distribution
@@ -19,6 +24,9 @@ from distutils.cmd import Command
from distutils.config import PyPIRCCommand
from distutils.extension import Extension
+
+__all__ = ['Distribution', 'Command', 'PyPIRCCommand', 'Extension', 'setup']
+
# This is a barebones help message generated displayed when the user
# runs the setup script with no arguments at all. More useful help
# is generated with various --help options: global help, list commands,
@@ -33,7 +41,7 @@ usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
def gen_usage(script_name):
script = os.path.basename(script_name)
- return USAGE % vars()
+ return USAGE % locals()
# Some mild magic to control the behaviour of 'setup()' from 'run_setup()'.
@@ -85,7 +93,7 @@ extension_keywords = (
)
-def setup(**attrs):
+def setup(**attrs): # noqa: C901
"""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