[Distutils] distribute's sandboxing doesn't preserve working_set; leads to setup_requires problems

P.J. Eby pje at telecommunity.com
Fri May 20 04:28:00 CEST 2011


At 04:35 PM 5/19/2011 -0400, Erik Bray wrote:
>Just to confirm my theory about this, I modified 
>setuptools.sandbox.run_setup to also save off and restore 
>pkg_resources.working_set.{entries,entry_keys,by_key}.  This solves 
>the problem, and the build works regardless of how my setup_requires 
>are ordered.  Is there any reason this shouldn't be done?  It seems 
>reasonable to me... It would also still be nice to find a workaround 
>until and unless this gets patched.

That's necessary, but I don't think it's sufficient.  The changes I 
did to fix this in 2009 save other aspects of pkg_resources state 
besides just those, and I don't think it's something you can fix by 
monkeypatching.

(I could be wrong, of course, but given that setuptools was already 
been fixed, I'm not that motivated to investigate more deeply.)



More information about the Distutils-SIG mailing list