[ckan-dev] Setuptools fails to install template folders?

Ross Jones ross at servercode.co.uk
Fri Nov 28 10:01:54 UTC 2014


Is this caused by a missing MANIFEST.in? You can try this out by copying the one in https://github.com/ckan/ckanext-spatial <https://github.com/ckan/ckanext-spatial> (and obviously modifying it to point to the files to be copied) before running python setup.py install


Ross


> On 28 Nov 2014, at 09:49, Florian May <florian.wendelin.mayer at gmail.com> wrote:
> 
> Hi all,
> 
> not sure whether this is the right place to ask - apologies if it's not.
> Did anyone run into this problem, or could point me into the right direction:
> 
> In different plugins, e.g. https://github.com/open-data/ckanext-scheming <https://github.com/open-data/ckanext-scheming>, setuptools won't copy the extension's templates folder into the installed egg, which makes CKAN stumble over the non-existing templates.
> 
> To reproduce:
> 
> CKAN source install (master)
> With CKAN's virtualenv activated:
> git clone the plugin into /usr/lib/default/ckan/src
> setuptools-install the plugin (python setup.py install)
> This will copy the plugin into e.g.
> /url/lib/ckan/default/lib/python2.7/site-packages/ckanext_scheming-0.0.1-py2.7.egg/ckanext/scheming
> However, the templates and in another plugin, another folder with js/css are missing.
> 
> This is strange - setup.py specifies
>     packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
>     namespace_packages=['ckanext', 'ckanext.scheming'],
>     include_package_data=True,
> which should discover and copy all files inside the source directory - only it doesn't copy the templates/ folders...
> 
> Manually copying the missing folders from the plugin's source to the installed egg folder fixes the problem. Since I found this in two separate plugins, and other plugins work with basically identical setup.pys it's likely I'm doing something wrong (although with identical installation procedures). 
> Could anyone shed some light on this?
> 
> Cheers,
> Florian
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141128/bf8daebd/attachment-0003.html>


More information about the ckan-dev mailing list