setup.py develop -d <localdir> does not work

Issue #44 resolved
Michael Bayer
created an issue

it seems like distribute's re-establishment of the setuptools installation fails to account for an unusual "site.py" file being searched for.

{{{
z-eeks-Computer-3:sa05 classic$ export PYTHONPATH=.
z-eeks-Computer-3:sa05 classic$ python setup.py develop -d .
running develop
running egg_info
writing lib/SQLAlchemy.egg-info/PKG-INFO
writing top-level names to lib/SQLAlchemy.egg-info/top_level.txt
writing dependency_links to lib/SQLAlchemy.egg-info/dependency_links.txt
writing entry points to lib/SQLAlchemy.egg-info/entry_points.txt
reading manifest template 'MANIFEST.in'
warning: no files found matching '.html' under directory 'doc'
warning: no files found matching '
.txt' under directory 'doc'
no previously-included directories found matching 'doc/build/output'
writing manifest file 'lib/SQLAlchemy.egg-info/SOURCES.txt'
running build_ext
error: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/site.py: No such file or directory

}}}

When the -d flag is not specified, the command completes:

{{{
z-eeks-Computer-3:sa05 classic$ python setup.py develop
running develop
running egg_info
writing lib/SQLAlchemy.egg-info/PKG-INFO
writing top-level names to lib/SQLAlchemy.egg-info/top_level.txt
writing dependency_links to lib/SQLAlchemy.egg-info/dependency_links.txt
writing entry points to lib/SQLAlchemy.egg-info/entry_points.txt
reading manifest template 'MANIFEST.in'
warning: no files found matching '.html' under directory 'doc'
warning: no files found matching '
.txt' under directory 'doc'
no previously-included directories found matching 'doc/build/output'
writing manifest file 'lib/SQLAlchemy.egg-info/SOURCES.txt'
running build_ext
Creating /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/SQLAlchemy.egg-link (link to lib)
Adding SQLAlchemy 0.5.5dev-r6341 to easy-install.pth file

Installed /Users/classic/dev/sa05/lib
Processing dependencies for SQLAlchemy==0.5.5dev-r6341
Finished processing dependencies for SQLAlchemy==0.5.5dev-r6341
}}}

If I replace distribute's fake "setuptools" installation with the original one:

{{{
bash-3.2# cd
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
bash-3.2# mv setuptools-0.6c9-py2.6.egg setuptools-0.6c9-py2.6.egg.distribute
bash-3.2# mv setuptools-0.6c9-py2.6.egg.OLD.1252346057.45 setuptools-0.6c9-py2.6.egg
}}}

then both commands complete successfully.

Comments (3)

  1. Tarek Ziadé repo owner

    I found the problem, thanks for the feedback

    That's at line 1077 in command/easy_install.py,

    the install_site_py() function calls

    resource_string(Requirement.parse("setuptools"), "site.py")
    

    To get site.py, of source that now needs to be :

    resource_string(Requirement.parse("distribute"), "site.py")
    

    Will be fixed in 0.6.2

  2. Log in to comment