[Distutils] Problem with setuptools >=0.5a9 and develop command
Michael Twomey
micktwomey at gmail.com
Tue Jul 12 13:01:45 CEST 2005
Hi,
I've been busily converting some of my smaller servers to eggs, and
I've hit a problem with the develop command. From setuptools 0.5a9
onwards the develop command barfs with the following traceback:
$ python2.4 setup.py develop --help
Traceback (most recent call last):
File "setup.py", line 33, in ?
install_requires = [
File "/usr/lib/python2.4/site-packages/setuptools-0.5a10-py2.4.egg/setuptools/__init__.py",
line 51, in setup
File "/usr/lib/python2.4/distutils/core.py", line 135, in setup
ok = dist.parse_command_line()
File "/usr/lib/python2.4/site-packages/setuptools-0.5a10-py2.4.egg/setuptools/dist.py",
line 107, in parse_command_line
File "/usr/lib/python2.4/distutils/dist.py", line 432, in parse_command_line
args = self._parse_command_opts(parser, args)
File "/usr/lib/python2.4/site-packages/setuptools-0.5a10-py2.4.egg/setuptools/dist.py",
line 385, in _parse_command_opts
File "/usr/lib/python2.4/distutils/dist.py", line 530, in _parse_command_opts
parser.set_negative_aliases(negative_opt)
File "/usr/lib/python2.4/distutils/fancy_getopt.py", line 143, in
set_negative_aliases
self._check_alias_dict(negative_alias, "negative alias")
File "/usr/lib/python2.4/distutils/fancy_getopt.py", line 125, in
_check_alias_dict
raise DistutilsGetoptError, \
distutils.errors.DistutilsGetoptError: invalid negative alias
'always-unzip': option 'always-unzip' not defined
Looking at commands/develop.py I notice that it's the only command
which sets 'command_consumes_arguments = False', and it also doesn't
override the negative_opt dict. I tried setting 'negative_opt = {}'
and it started working again.
So this patch "fixes" the issue though I don't know the internals of
distutils/setuptools to tell you exactly why:
--- /tmp/setuptools-0.5a10/setuptools/command/develop.py
2005-07-06 19:15:52.000000000 +0100
+++ setuptools/command/develop.py 2005-07-12 11:50:04.000000000 +0100
@@ -21,6 +21,8 @@
boolean_options = [
'multi-version', 'exclude-scripts', 'always-copy', 'uninstall'
]
+
+ negative_opt = {}
command_consumes_arguments = False # override base
Is anyone else seeing this problem? I've reproduced it on a debian
linux box and my apple laptop.
cheers,
Michael
More information about the Distutils-SIG
mailing list