[Distutils] Distribute 0.6.12 broken on Windows

Sridhar Ratnakumar sridharr at activestate.com
Thu May 20 23:09:44 CEST 2010


On 5/19/2010 3:47 PM, Ronny Pfannschmidt wrote:
> On Wed, 2010-05-19 at 15:10 -0700, Sridhar Ratnakumar wrote:
>> >  On 2010-05-19, at 2:53 PM, Sridhar Ratnakumar wrote:
>> >
>>>> >  >>  Ronny has fixed the .local / ENABLE_USER_SITE flag if you want to give
>>>> >  >>  it a shot too
>>> >  >
>>> >  >  You mean "easy_install --user"? Yup, that too works as expected.
>> >
>> >  If you were rather referring to this bug:http://bitbucket.org/tarek/distribute/issue/150/  - no, it has not been fixed in 0.6-maint.
>> >
> It would be nice to get some more help for debugging that one,
> i lack a affected system/idea how to really reproduce

Install $package into your user site. I used "pypm install $package" for 
this, which by defaults puts the package in the user site. And then 
create a virtualenv, upgrade its setuptools to distribute-dev and run 
$virtualenv/Scripts/easy_install.exe $package.

> all simple tests with a virtualenv point me to works fine now
> (as i added the code to respect ENABLE_USER_SITE)

I found out where the problem was. This patch fixes it for me:

diff -r ab666b0eacbb setuptools/command/easy_install.py
--- a/setuptools/command/easy_install.py        Wed May 19 22:43:52 2010 
+0200
+++ b/setuptools/command/easy_install.py        Thu May 20 14:06:56 2010 
-0700
@@ -1347,8 +1347,7 @@
          site_lib = get_python_lib(plat_specific)
          if site_lib not in sitedirs: sitedirs.append(site_lib)

-    if sys.version >= "2.6":
-        import site
+    if HAS_USER_SITE and site.ENABLE_USER_SITE:
          sitedirs.append(site.USER_SITE)

      sitedirs = map(normalize_path, sitedirs)

-srid



More information about the Distutils-SIG mailing list