Skip to content

Commit

Permalink
Fix #2893: Issues with extension's Python namespace packages
Browse files Browse the repository at this point in the history
The `ckanext` Python package is installed by CKAN as a namespace
package. However, the templates for creating an extension do not
declare that package as a namespace package. Extensions created
from the templates therefore break the virtualenv.

The fix is to make sure that `ckanext` is declared as a namespace
packages in the extension's `setup.py`.
  • Loading branch information
torfsen committed Mar 11, 2016
1 parent 0fe167e commit 6875b41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ckan/pastertemplates/template/setup.py_tmpl
Expand Up @@ -54,6 +54,7 @@ setup(
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
namespace_packages=['ckanext'],

# List run-time dependencies here. These will be installed by pip when your
# project is installed. For an analysis of "install_requires" vs pip's
Expand Down

0 comments on commit 6875b41

Please sign in to comment.