having DISTUTILS_DEBUG=1 results in the following:
$> python setup.py bdist_egg -i
Distribution.parse_config_files():
reading /usr/lib/python2.5/distutils/distutils.cfg
reading setup.cfg
options (after parsing config files):
option dict for 'aliases' command:
{'release': ('setup.cfg', "egg_info -RDb ''")}
option dict for 'build_py' command:
{'optimize': ('/usr/lib/python2.5/distutils/distutils.cfg', '0')}
option dict for 'egg_info' command:
{'tag_build': ('setup.cfg', '.dev'), 'tag_svn_revision': ('setup.cfg', '1')}
option dict for 'install' command:
{'optimize': ('/usr/lib/python2.5/distutils/distutils.cfg', '0'),
'prefix': ('/usr/lib/python2.5/distutils/distutils.cfg', '/usr/local')}
option dict for 'nosetests' command:
{'detailed_errors': ('setup.cfg', '1'),
'tests': ('setup.cfg',
'enthought/chaco/tests,enthought/chaco/shell/tests,enthought/chaco2/tests,enthought/chaco2/shell/tests'),
'verbosity': ('setup.cfg', '0'),
'with_coverage': ('setup.cfg', '1'),
'with_doctest': ('setup.cfg', '1')}
options (after parsing command line):
option dict for 'aliases' command:
{'release': ('setup.cfg', "egg_info -RDb ''")}
option dict for 'bdist_egg' command:
{'include_docs': ('command line', 1)}
option dict for 'build_py' command:
{'optimize': ('/usr/lib/python2.5/distutils/distutils.cfg', '0')}
option dict for 'egg_info' command:
{'tag_build': ('setup.cfg', '.dev'), 'tag_svn_revision': ('setup.cfg', '1')}
option dict for 'install' command:
{'optimize': ('/usr/lib/python2.5/distutils/distutils.cfg', '0'),
'prefix': ('/usr/lib/python2.5/distutils/distutils.cfg', '/usr/local')}
option dict for 'nosetests' command:
{'detailed_errors': ('setup.cfg', '1'),
'tests': ('setup.cfg',
'enthought/chaco/tests,enthought/chaco/shell/tests,enthought/chaco2/tests,enthought/chaco2/shell/tests'),
'verbosity': ('setup.cfg', '0'),
'with_coverage': ('setup.cfg', '1'),
'with_doctest': ('setup.cfg', '1')}
running bdist_egg
Distribution.get_command_obj(): creating 'bdist_egg' command object
setting options for 'bdist_egg' command:
include_docs = 1 (from command line)
Traceback (most recent call last):
File "setup.py", line 227, in <module>
zip_safe = False,
File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.5/distutils/dist.py", line 992, in run_command
cmd_obj = self.get_command_obj(command)
File "/usr/lib/python2.5/distutils/dist.py", line 879, in get_command_obj
self._set_command_options(cmd_obj, options)
File "/usr/lib/python2.5/distutils/dist.py", line 919, in _set_command_options
% (source, command_name, option))
distutils.errors.DistutilsOptionError: error in command line: command
'bdist_egg' has no such option 'include_docs'
On Mon, Sep 15, 2008 at 5:01 PM, chris
I've subclassed bdist_egg in my setup.py to add an option, "--include-docs", 'i'. It works as I expect it to when run from the command line while it's in the setup.py.
Since I have a few projects that may use this, I thought I may try to put it in an extension. However, now when I run python setup.py bdist_egg -i, I get
error: command 'bdist_egg' has no such option 'include_docs'
Is there something extra that needs to be done when putting a subclassed command in an extension instead of just a setup.py?
Thanks, -Chris