这与我之前问过的this问题有关。
最终的结果是我希望能够安装我的软件包"identity.model“和所有依赖项。像这样..。
$ easy_install -f http://eggs.sadphaeton.com identity.model
Searching for identity.model
Reading http://eggs.sadphaeton.com
Reading http://pypi.python.org/simple/identity.model/
Couldn't find index page for 'identity.model' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for identity.model
error: Could not find suitable distribution for Requirement.parse('identity.model')无论出于什么原因,运行这个easy_install都会访问我根据this information布局的主页
我的index.html
<html>
<head>
<title>SadPhaeton Egg Repository</title>
</head>
<body>
<a rel="homepage" href="AlchemyExtra">AlchemyExtra</a>
<a rel="homepage" href="identity.model">identity.model</a>
<a rel="homepage" href="repoze.what.plugins.config">repoze.what.plugins.config</a>
</body>
</html>如果我跑..。
$ easy_install -i http://eggs.sadphaeton.com identity.model它会找到我的包和我放在那里的repoze.what.plugins.config,因为它是一个依赖项。然而,当它去获取tw.forms(托管在http://eggs.sadphaeton.com上的外部依赖)时,它以一个失败结束,因为它只搜索了pypi
显然,我误解了“规范”。有谁知道诀窍是什么吗?
发布于 2009-10-18 15:42:23
-f将获取您提供的url,并在那里以及PyPI上查找包。这类页面的一个示例是http://dist.plone.org/release/3.3.1/,如您所见,这是分发文件的列表。
使用-i可以定义主索引页。如您所见,它缺省为http://pypi.python.org/simple/,索引页面是包的索引,而不是分发文件的索引。
因此,在您的情况下,easy_install -i http://eggs.sadphaeton.com identity.model应该可以下载identity.model。对我来说是这样的,就像两次在中间,但不是第一次或第二次。我不知道你是不是在尝试不同的格式?但在任何情况下,它都会在tw.forms上失败,因为它不在您的索引页面上。
因此,解决方案应该是制作一个像http://dist.plone.org/release/3.3.1/这样的页面,上面有你的鸡蛋。我不知道格式必须有多精确,但我认为它相当灵活。
更新:
以下是步骤解决方案的步骤:
键入easy_install -f http://localhost:8080/ <modulename>,
它将安装模块。
发布于 2009-10-19 00:52:34
看起来诀窍在于在根目录的index.html上有rel=“下载”链接。
<html>
<head>
<title>SadPhaeton Egg Repository</title>
</head>
<body>
<a rel="homepage" href="AlchemyExtra">AlchemyExtra</a> <a rel="download" href="AlchemyExtra/AlchemyExtra-0.0dev-py2.6.egg">download</a><br>
<a rel="homepage" href="identity.model">identity.model</a> <a rel="download" href="identity.model/identity.model-0.0dev-py2.6.egg">download</a><br>
<a rel="homepage" href="repoze.what.plugins.config">repoze.what.plugins.config</a> <a rel="download" href="repoze.what.plugins.config/repoze.what.plugins.config-0.0.0-py2.6.egg">download</a><br>
</body>
</html>这解决了我眼前的问题,尽管如果规范中有更多关于这方面的细节就更好了。根据我读到的内容,我预计easy_install会在主页上查找下载链接,但它似乎并不想为我这么做。
现在以某种方式自动化这一点,因为手动做这件事是一件很糟糕的事情。
发布于 2010-01-30 02:35:00
问题是您试图混合使用-i和-f模式来制作页面;您需要选择其中一种模式,因为rel=""只适用于-i。
如果你想使用-f模式,那么你只需要一个包含鸡蛋的the服务器目录。如果您想使用-i,那么您必须为每个项目提供一个包含index.html的子目录,并且这些index.html文件将包含rel="homepage"内容。
https://stackoverflow.com/questions/1585077
复制相似问题