我正在尝试使用标准./configure
,make
,make install
制作一个可以编译某些软件的buildout方法。
问题是我不知道如何直接在配方中获得鸡蛋的路径。
这是我食谱的一部分:
class ApacheRecipe:
def __init__(self, buildout, name, options):
[...]
def install(self):
if self.force_install:
shutil.rmtree(self.install_path)
if not os.path.exists(self.install_path):
os.mkdir(self.install_path)
egg_path = get_current_egg_path() #FIXME: how ?
os.chdir(egg_path)
f = os.popen('./configure')
[...]
答案 0 :(得分:0)
...您可以阅读我留给您zc.recipe.cmmi
的评论中的源代码,您会在Recipe
class Recipe(object):
def __init__(self, buildout, name, options):
self.buildout, self.name, self.options = buildout, name, options
directory = buildout['buildout']['directory']
download_cache = buildout['buildout'].get('download-cache')
还要考虑阅读那里的其余代码,看看应该如何完成,例如使用tempfile
来构建临时模块等。