自定义mfabrik gomobiletheme上的构建错误

时间:2012-03-25 10:09:07

标签: python plone

如果我创建一个新主题,我将成为一个追溯:

../ bin / paster create -t​​ gomobile_theme gomobiletheme.mytheme

...

Traceback (most recent call last):
  File "../bin/paster", line 275, in <module>
    paste.script.command.run()
  File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/command.py", line 238, in run
    result = self.command()
  File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/create_distro.py", line 170, in command
    egg_info_dir = pluginlib.egg_info_dir(output_dir, dist_name)
  File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/pluginlib.py", line 135, in egg_info_dir
    % ', '.join(all))
IOError: No egg-info directory found (looked in ./gomobiletheme.mytheme/./gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/setup.cfg/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/docs/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/README.txt/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/gomobiletheme/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/src/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/setup.py/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/CONTRIBUTORS.txt/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/CHANGES.txt/gomobiletheme.mytheme.egg-info)

然后我将我的主题添加到buildout.cfg,重新成为这样的错误:

bin/buildout
Develop: '/opt/plone4/plone4/src/gomobiletheme.mytheme'
error in gomobiletheme.mytheme setup command: Distribution
contains no modules or packages for namespace package 'gomobiletheme'
While:
 Installing.
 Processing develop directory '/opt/plone4/plone4/src/
gomobiletheme.mytheme'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
 File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/buildout.py", line 1660, in main
   getattr(buildout, command)(args)
 File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/buildout.py", line 394, in install
   installed_develop_eggs = self._develop()
 File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/buildout.py", line 634, in _develop
   zc.buildout.easy_install.develop(setup, dest)
 File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/easy_install.py", line 895, in develop
   *args) == 0
AssertionError

知道有人错了吗?

1 个答案:

答案 0 :(得分:0)

我认为这是由您使用的模板引起的。也许它已经过时了。

检查您的setup.py是否如下所示:

  packages=find_packages('src'),
  namespace_packages=['gomobiletheme'],

但你需要额外的:

package_dir = {'': 'src'},

指令让buildout再次运行。