[IPython-dev] Adding setupttols to iptyhon's setup.py

Andrew Straw strawman@astraw....
Wed Dec 12 11:40:46 CST 2007


Here is my "ssetup", which is on my $PATH:

#!/bin/bash
# ssetup - "setuptools setup"
python -c "import setuptools, 
sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" 
$*

(Everything that is not a comment goes on the same line.)

This deals with all kinds of setup.py scripts that expect __file__ and 
__name__ to be set in addition to sys.argv[0] to be 'setup.py'.

Note that numpy.distutils and setuptools are not completely compatible, 
so this may get you into trouble with numpy/scipy, so be careful there.

-Andrew


Gael Varoquaux wrote:
> On Wed, Dec 12, 2007 at 09:25:45AM -0800, Andrew Straw wrote:
>> And don't forget you can always do:
> 
>> python -c "import setuptools; execfile('setup.py')" develop --prefix 
>> /usr/local
> 
> Yes, I'll settle for this. Though as the command is hard to remmeber for
> my small brain, I'll check in a file that does the 
> "import setuptools; execfile('setup.py')" if you don't mind. What should
> I call it? setup_tools.py? Obviously not setuptools.py.
> 
> Cheers,
> 
> Gaël




More information about the IPython-dev mailing list