summaryrefslogtreecommitdiff
path: root/src/distutils2/command
diff options
context:
space:
mode:
authorJeremy Kloth <jeremy.kloth@gmail.com>2010-07-08 11:55:56 -0600
committerJeremy Kloth <jeremy.kloth@gmail.com>2010-07-08 11:55:56 -0600
commit271787937151300c6a9d11dea67ce1fcc3f8d4bd (patch)
tree741af8e9900e70c58012aa4ac726a9e7e23a0d58 /src/distutils2/command
parentc7f43f9e62b8a1562473578b3cca65e0f984f1c2 (diff)
downloaddisutils2-271787937151300c6a9d11dea67ce1fcc3f8d4bd.tar.gz
Removed bogus uses of sub-commands
Diffstat (limited to 'src/distutils2/command')
-rw-r--r--src/distutils2/command/register.py7
-rw-r--r--src/distutils2/command/sdist.py14
2 files changed, 5 insertions, 16 deletions
diff --git a/src/distutils2/command/register.py b/src/distutils2/command/register.py
index 8abb3c8..29b87e4 100644
--- a/src/distutils2/command/register.py
+++ b/src/distutils2/command/register.py
@@ -28,8 +28,6 @@ class register(PyPIRCCommand):
boolean_options = PyPIRCCommand.boolean_options + [
'verify', 'list-classifiers', 'strict']
- sub_commands = [('check', lambda self: True)]
-
def initialize_options(self):
PyPIRCCommand.initialize_options(self)
self.list_classifiers = 0
@@ -46,9 +44,8 @@ class register(PyPIRCCommand):
self.finalize_options()
self._set_config()
- # Run sub commands
- for cmd_name in self.get_sub_commands():
- self.run_command(cmd_name)
+ # Check the package metadata
+ self.run_command('check')
if self.dry_run:
self.verify_metadata()
diff --git a/src/distutils2/command/sdist.py b/src/distutils2/command/sdist.py
index f893aa1..7799ea5 100644
--- a/src/distutils2/command/sdist.py
+++ b/src/distutils2/command/sdist.py
@@ -45,12 +45,6 @@ class sdist(Command):
description = "create a source distribution (tarball, zip file, etc.)"
- def checking_metadata(self):
- """Callable used for the check sub-command.
-
- Placed here so user_options can view it"""
- return self.metadata_check
-
user_options = [
('template=', 't',
"name of manifest template file [default: MANIFEST.in]"),
@@ -100,8 +94,6 @@ class sdist(Command):
default_format = {'posix': 'gztar',
'nt': 'zip' }
- sub_commands = [('check', checking_metadata)]
-
def initialize_options(self):
# 'template' and 'manifest' are, respectively, the names of
# the manifest template and manifest file.
@@ -162,9 +154,9 @@ class sdist(Command):
# manifest
self.filelist.clear()
- # Run sub commands
- for cmd_name in self.get_sub_commands():
- self.run_command(cmd_name)
+ # Check the package metadata
+ if self.metadata_check:
+ self.run_command('check')
# Do whatever it takes to get the list of files to process
# (process the manifest template, read an existing manifest,