[ python-Bugs-1529871 ] distutils regression related to Distribution.run_command

SourceForge.net noreply at sourceforge.net
Thu Jul 27 19:49:51 CEST 2006


Bugs item #1529871, was opened at 2006-07-27 13:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1529871&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
Summary: distutils regression related to Distribution.run_command

Initial Comment:
The following used to work in Python 2.4.x but fails
under Python 2.5:

>>> import setuptools
>>> import distutils.core
>>> distutils.core._setup_stop_after = 'config'
>>> 
>>> import setup
>>> setup.dist.run_command('test')

Where setup.dist is an instance of
distutils.core.Distribution (which setuptools replaces
with setuptools.dist.Distribution).

Under Python 2.4.x, this code would execute setuptools'
test command. Under Python 2.5b2 (as of r50855), this
code results in the following exception:

/opt/dev/python/2.5/lib/python2.5/distutils/dist.py:263:
UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    setup.dist.run_command('test')
  File
"/opt/dev/python/2.5/lib/python2.5/distutils/dist.py",
line 992, in run_command
    cmd_obj = self.get_command_obj(command)
  File
"/opt/dev/python/2.5/lib/python2.5/distutils/dist.py",
line 868, in get_command_obj
    klass = self.get_command_class(command)
  File
"/opt/dev/python/2.5/lib/python2.5/site-packages/setuptools/dist.py",
line 357, in get_command_class
    return _Distribution.get_command_class(self, command)
  File
"/opt/dev/python/2.5/lib/python2.5/distutils/dist.py",
line 851, in get_command_class
    raise DistutilsModuleError("invalid command '%s'" %
command)
distutils.errors.DistutilsModuleError: invalid command
'test'

I'd greatly appreciate it if this regression could be
fixed before Python 2.5 is released.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1529871&group_id=5470


More information about the Python-bugs-list mailing list