设置 ckanext-wordpresser 时出错

Error in setting up ckanext-wordpresser

我正在尝试为我的 ckan 实例制作一个 wordpress 界面,我发现了以下插件:
ckanext-wordpresser

但是当我执行以下命令时:

$ pip install -e  git+https://github.com/okfn/ckanext-wordpresser#egg=ckanext-wordpresser

我收到这个错误:

Obtaining ckanext-wordpresser from
git+https://github.com/okfn/ckanext-wordpresser#egg=ckanext-wordpresser
Updating /usr/lib/ckan/default/src/ckanext-wordpresser clone
Complete output from command python setup.py egg_info:
running egg_info
writing requirements to ckanext_wordpresser.egg-info/requires.txt
writing ckanext_wordpresser.egg-info/PKG-INFO
writing namespace_packages to ckanext_wordpresser.egg-info/namespace_packages.txt
writing top-level names to ckanext_wordpresser.egg-info/top_level.txt
writing dependency_links to ckanext_wordpresser.egg-info/dependency_links.txt
writing entry points to ckanext_wordpresser.egg-info/entry_points.txt
writing pbr to ckanext_wordpresser.egg-info/pbr.json
error: Namespace package problem: ckanext.wordpresser is a namespace package, but its init.py does not call declare_namespace()! Please fix it. (See the setuptools manual under "Namespace Packages" for details.) "

Command "python setup.py egg_info" failed with error code 1 in /usr/lib/ckan/default/src/ckanext-wordpresser/

问题是 setup.py 中的这一行:

namespace_packages=['ckanext', 'ckanext.wordpresser'],

改成:

就可以了
namespace_packages=['ckanext'],

但我不会自己做 PR,因为我不愿意测试它是否仍然有效(尽管我认为它会)。所以我建议您可以 git 克隆存储库,进行更改,然后:

pip install -e ../ckanext-wordpresser

它会安装并准备好尝试。如果它有效(并且扩展名很旧,所以我认为有点远)然后创建一个 PR。