简体   繁体   English

如何通过构建安装Readline

[英]How to install readline via buildout

I would like to configure my python project to automatically build postgresql in installation process. 我想将我的python项目配置为在安装过程中自动构建postgresql。 You can do it similar to what's described here: 您可以执行类似于此处描述的操作:

Buildout, psycopg2, postgresql Buildout,psycopg2,PostgreSQL

The problem is I don't like using 问题是我不喜欢使用

configure-options =
--without-readline

option 选项

That means I have to install readline library. 这意味着我必须安装readline库。 I looked at plone configuration files in I found some hints, so I added these parts to my buildout.cfg: 我在发现一些提示的过程中查看了plone配置文件,因此将这些部分添加到buildout.cfg中:

[readline-patch]
recipe = z3c.recipe.runscript
url = http://ftp.gnu.org/gnu/readline/readline-5.2-patches
install-script = ${buildout:directory}/bin/fetch-readline-patches.py:fetch
update-script = ${readline-patch:install-script}

[readline]
recipe = zc.recipe.cmmi
url = http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
patch = ${readline-patch:prefix}/readline.patch
extra_options =
    --prefix = ${buildout:parts-directory}/opt

But now, I'm getting this error: 但是现在,我得到了这个错误:

Installing readline-patch.
While:
  Installing readline-patch.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/mnowotka/Dokumenty/MgrFuncAdnot/app/django-gui/eggs/zc.buildout-1.5.2-  py2.7.egg/zc/buildout/buildout.py", line 1805, in main
getattr(buildout, command)(args)
  File "/home/mnowotka/Dokumenty/MgrFuncAdnot/app/django-gui/eggs/zc.buildout-1.5.2-py2.7.egg/zc/buildout/buildout.py", line 584, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/mnowotka/Dokumenty/MgrFuncAdnot/app/django-gui/eggs/zc.buildout-1.5.2-py2.7.egg/zc/buildout/buildout.py", line 1297, in _call
    return f()
  File "/home/mnowotka/Dokumenty/MgrFuncAdnot/app/django-gui/eggs/z3c.recipe.runscript-0.1.3-py2.7.egg/z3c/recipe/runscript/__init__.py", line 39, in install
    self.callScript(script)
  File "/home/mnowotka/Dokumenty/MgrFuncAdnot/app/django-gui/eggs/z3c.recipe.runscript-0.1.3-py2.7.egg/z3c/recipe/runscript/__init__.py", line 28, in callScript
    module = imp.load_source('script', filename)
IOError: [Errno 2] No such file or directory

Any help with making it working would be appreciated. 任何帮助使其工作将不胜感激。

The z3c.recipe.runscript does not have an url option. z3c.recipe.runscript没有url选项。 So the script will not be downloaded. 因此该脚本将不会下载。 You can use a local script, which will download the file and execute it. 您可以使用本地脚本,该脚本将下载文件并执行它。 Or use http://pypi.python.org/pypi/collective.recipe.scriptgen to make a script by buildout which will download the file via ie curl 或者使用http://pypi.python.org/pypi/collective.recipe.scriptgen通过buildout制作脚本,该脚本将通过curl来下载文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM