Author belopolsky
Recipients belopolsky, dstufft, eric.araujo
Date 2015-02-09.21:06:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423516005.28.0.423247861021.issue23426@psf.upfronthosting.co.za>
In-reply-to
Content
With the following simple setup.py

$ cat setup.py
from distutils.core import setup
from distutils.command.install import install

class install1(install):
    sub_commands = install.sub_commamnds

setup(name='bug', cmdclass={'install': install1})


I get

>>> from distutils.core import run_setup
>>> run_setup('setup.py')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Lib/distutils/core.py", line 216, in run_setup
    exec(f.read(), g, l)
  File "<string>", line 4, in <module>
  File "<string>", line 5, in install1
NameError: name 'install' is not defined

Furthermore, on an even simpler setup.py:

$ cat setup1.py
from distutils.core import setup

setup(name='bug')

run_setup runs, but clobbers sys.argv:

>>> from distutils.core import run_setup
>>> run_setup('setup1.py', script_args=['--name'])
bug
<distutils.dist.Distribution object at 0x101dddef0>
>>> import sys;sys.argv
['setup1.py', '--name']
History
Date User Action Args
2015-02-09 21:06:45belopolskysetrecipients: + belopolsky, eric.araujo, dstufft
2015-02-09 21:06:45belopolskysetmessageid: <1423516005.28.0.423247861021.issue23426@psf.upfronthosting.co.za>
2015-02-09 21:06:45belopolskylinkissue23426 messages
2015-02-09 21:06:44belopolskycreate