[IPython-dev] Requiring distribute on Windows

MinRK benjaminrk@gmail....
Fri Jun 24 14:20:53 CDT 2011


On Fri, Jun 24, 2011 at 12:20, Brian Granger <ellisonbg@gmail.com> wrote:
> On Fri, Jun 24, 2011 at 11:52 AM, MinRK <benjaminrk@gmail.com> wrote:
>> On Fri, Jun 24, 2011 at 11:01, Brian Granger <ellisonbg@gmail.com> wrote:
>>> Hi,
>>>
>>> In the course of testing IPython.parallel on Windows, Min and I have
>>> discovered that ipcluster won't work on Windows unless distribute is
>>> installed and used to install IPython.  The reason is that setuptools
>>> has a bug that interacts with multiprocessing in a subtle, nasty way.
>>> Min has been using distribute all along for testing and dev., so we
>>> didn't see it until now.  This leads to a question:
>>>
>>> Should we required distribute to be installed and used to install
>>> IPython on Windows?
>>
>> The issue is that distribute writes scripts with the traditional `if
>> __name__ == '__main__'` block, whereas
>> vanilla setuptools does not, breaking any use of multiprocessing in
>> entry points on Windows (all child processes will enter the outer
>> loop, launching an infinite number of children).
>>
>> I *have* figured out a way to catch this in the entry point itself
>> using inspect, so we shouldn't have to depend on distribute, if this
>> fix is acceptable:
>>
>> https://github.com/minrk/ipython/commit/ab437a4d476f7819cf47a5dbb5ee6d40f66a7958
>
> I will look at this later today.  That would probably be better than
> requiring distribute though.

I discovered a cleaner check using multiprocessing instead of inspect:
https://github.com/minrk/ipython/commit/3d64c96440751be38fe2a61400134eec3609457e

>
> Cheers,
>
> Brian
>
>> -MinRK
>>
>>>
>>> I am not sure how this will affect the .msi installer.  We might be
>>> able to relax the requirement for that installer as the command line
>>> scripts are created differently.
>>>
>>> Cheers,
>>>
>>> Brian
>>>
>>> --
>>> Brian E. Granger
>>> Cal Poly State University, San Luis Obispo
>>> bgranger@calpoly.edu and ellisonbg@gmail.com
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>
>>
>
>
>
> --
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> bgranger@calpoly.edu and ellisonbg@gmail.com
>


More information about the IPython-dev mailing list