2

在 Plone 4.3.3 中使用 zopeskel 时也会出现该错误。这似乎与这个问题略有不同。在 Plone 4.3.2 下没有错误。

$ ../bin/paster create plone_basic
Selected and implied templates:
  PasteScript#basic_package  A basic setuptools-enabled package

Variables:
  egg:      plone_basic
  package:  plone_basic
  project:  plone_basic
Enter version (Version (like 0.1)) ['']:
Enter description (One-line description of the package) ['']:
Enter long_description (Multi-line description (in reST)) ['']:
Enter keywords (Space-separated keywords/tags) ['']:
Enter author (Author name) ['']:
Enter author_email (Author email) ['']:
Enter url (URL of homepage) ['']:
Enter license_name (License name) ['']:
Enter zip_safe (True/False: if the package can be distributed as a .zip file) [False]:
Creating template basic_package
Creating directory ./plone_basic
  Recursing into +package+
    Creating ./plone_basic/plone_basic/
    Copying __init__.py to ./plone_basic/plone_basic/__init__.py
  Copying setup.cfg to ./plone_basic/setup.cfg
  Copying setup.py_tmpl to ./plone_basic/setup.py
Running /home/Plone-4.3.3/Python-2.7/bin/python setup.py egg_info
Traceback (most recent call last):
  File "/home/Plone-4.3.3/zeocluster/bin/paster", line 259, in <module>
    sys.exit(paste.script.command.run())
  File "/home/Plone-4.3.3/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/home/Plone-4.3.3/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/home/Plone-4.3.3/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
    result = self.command()
  File "/home/Plone-4.3.3/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/create_distro.py", line 170, in command
    egg_info_dir = pluginlib.egg_info_dir(output_dir, dist_name)
  File "/home/Plone-4.3.3/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/pluginlib.py", line 135, in egg_info_dir
    % ', '.join(all))
IOError: No egg-info directory found (looked in ./plone_basic/./plone_basic.egg-info, ./plone_basic/setup.py/plone_basic.egg-info, ./plone_basic/plone_basic/plone_basic.egg-info, ./plone_basic/setup.cfg/plone_basic.egg-info)
4

1 回答 1

1

解决方法 1

问题似乎是缺少setuptools. 安装 setuptools 后,paste(以及所有基于它的工具)可以运行生成的 setup.py。以下解决了该问题:

wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O - | sudo -u plone_buildout /usr/local/Plone-4.3.3/Python-2.7/bin/python

UnifiedInstaller-4.3.3 不安装 setuptools。看这张

正如 SteveM 指出的(见评论),这不是推荐的解决方法。

(首选)解决方法2

生成的数据在那里(尽管抛出了错误!)但 setup.py 不会运行。因此Paste*不会生成目录。稍后当 buildout 运行时,它将生成/下载Paste*目录等。

如果你想运行 setup.py。您可以修补 PasteScript(风险自负!)。

至于PasteScript-1.7.5转到第 587 行/path/to/Plone-4.3.3/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py并获取当前的 sys.path 并将其传递给subprocess.Popen(). 这样,setup.py将与zopeskelorpaste环境一起运行。

current_env = os.environ.copy()
current_env['PYTHONPATH'] = ':'.join(sys.path)
proc = subprocess.Popen([cmd] + list(args),
                        cwd=cwd,
                        stderr=stderr_pipe,
                        stdout=subprocess.PIPE,
                        env=current_env) # <- pass the env here

我将尝试找出这种解决方法可能导致问题的情况。我已经发布了一个问题PasteScripthttps ://bitbucket.org/ianb/pastescript/issue/16/pass-the-syspath-to-the-subprocess-in

更新:如果不生成/添加Paste*目录(运行构建或通过上述解决方法)本地命令将不可用。

于 2014-05-22T08:32:11.383 回答