I found that pip runs a python script command line that looks like this:
__file__ = '<path to package>/setup.py' from setuptools.command import egg_info def replacement_run(self): self.mkpath(self.egg_info) installer = self.distribution.fetch_build_egg for ep in egg_info.iter_entry_points('egg_info.writers'):
In the top-level directory of the package where setup.py was not there, I placed setup.py, which reproduced this behavior, but chdir'd in the directory containing the βrealβ setup.py and executed, which is on end.
The only problem was that pip creates the "pip-egg-info" directory, which is expected to be populated, requiring the creation of a symbolic link in the directory with the "real" setup.py.
The new, top-level setup.py looks like this:
#! /usr/bin/env python from os import chdir, symlink, getcwd from os.path import join, basename, exists filename = basename(__file__) chdir("python") setupdir = getcwd() egginfo = "pip-egg-info" if not exists(egginfo) and exists(join("..", egginfo)): symlink(join("..", egginfo), egginfo) __file__ = join(setupdir, filename) from setuptools.command import egg_info def replacement_run(self): self.mkpath(self.egg_info) installer = self.distribution.fetch_build_egg for ep in egg_info.iter_entry_points('egg_info.writers'):
It is probably fragile, but should continue to work until pip changes the command-line pin code that it generates
source share