setup.py develop is not locating install_requires packages in custom site dir

I have a package, 'proj', which specifies a dependency on 'mypkg', version 0.0.2 $ cat setup.py from setuptools import find_packages, setup setup(name = "proj", version = "0.0.1", platforms = ["linux2"], packages = find_packages(), zip_safe = False, install_requires=["mypkg==0.0.2"], entry_points = {"console_scripts": ["proj = proj.main:main"]}, ) I have been able to successfully easy_install an egg created with setup.py bdist_egg, and the 'proj' entry point successfully `requires' mypkg 0.0.2. However, setup.py develop is not able to find mypkg. I am installing it into the user site dir so that it's private during development, rather than in my system wide /custom/site-packages directory: $ python setup.py develop --install-dir ~/.local/lib/python2.6/site- packages --script-dir ~/bin --allow-hosts localhost running develop Checking .pth file support in /home/user/.local/lib/python2.6/site- packages /custom/bin/python -E -c pass TEST PASSED: /home/user/.local/lib/python2.6/site-packages appears to support .pth files running egg_info creating proj.egg-info writing requirements to proj.egg-info/requires.txt writing proj.egg-info/PKG-INFO writing top-level names to proj.egg-info/top_level.txt writing dependency_links to proj.egg-info/dependency_links.txt writing entry points to proj.egg-info/entry_points.txt writing manifest file 'proj.egg-info/SOURCES.txt' reading manifest file 'proj.egg-info/SOURCES.txt' writing manifest file 'proj.egg-info/SOURCES.txt' running build_ext Creating /home/user/.local/lib/python2.6/site-packages/proj.egg-link (link to .) Adding proj 0.0.1 to easy-install.pth file Installing proj script to /home/user/bin Installed /path/to/proj Processing dependencies for proj==0.0.1 Searching for mypkg==0.0.2 Link to http://pypi.python.org/simple/mypkg/ ***BLOCKED*** by --allow- hosts Couldn't find index page for 'myproj' (maybe misspelled?) Scanning index of all packages (this may take a while) Link to http://pypi.python.org/simple/ ***BLOCKED*** by --allow-hosts No local packages or download links found for mypkg==0.0.2 error: Could not find suitable distribution for Requirement.parse ('mypkg==0.0.2') pkg_resources.require() has no trouble finding it, however. $ python Python 2.6.2 (r262:71600, Jul 16 2009, 14:04:28) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from pkg_resources import require require("mypkg==0.0.2") [mypkg 0.0.2 (/custom/site-packages/mypkg-0.0.2-py2.6.egg)] import mypkg
The problem is fixed if I explicitly tell setuptools that /custom/site- packages is a site directory with --site-dirs, but it's unclear why this should be necessary since that directory is already in sys.path. Note that / custom/site-packages was created by following the instructions here: http://peak.telecommunity.com/DevCenter/EasyInstall#administrator-installati...

A related question: mypkg comes with several scripts which I'm not interested in using for this project. However, because the mypkg location (/custom/site-packages, /custom/bin) differs from the development location ~/.local/lib/python.2-6/site-packages, ~/bin), setuptools is copying all of the mypkg scripts to ~/bin. Since I don't actually need any of these is there any way to disable this? I still want the scripts / console_scripts associated with 'proj', however. It's especially inconvenient since running setup.py develop -- uninstall will not remove them.

On Aug 17, 10:46 am, ryles <ryle...@gmail.com> wrote:
A related question: mypkg comes with several scripts which I'm not interested in using for this project. However, because the mypkg location (/custom/site-packages, /custom/bin) differs from the development location ~/.local/lib/python.2-6/site-packages, ~/bin), setuptools is copying all of the mypkg scripts to ~/bin. Since I don't actually need any of these is there any way to disable this? I still want the scripts / console_scripts associated with 'proj', however. It's especially inconvenient since running setup.py develop -- uninstall will not remove them.
I also noted that while setup.py develop --uninstall will remove 'proj' from ~/.local/lib/python.2-6/site-packages/easy-install.pth, mypkg will remain there. I suppose this is intentional since setuptools is uncertain if any other package is still dependent on having it there. I wonder if it would be worth it to add an option to force cleanup of these things.
participants (1)
-
ryles