Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to include django templates in app installed via pip?

I'm working on a django app (django-flux) and I'm trying to get it to properly install with pip from pypi. From this blog post and the distutils documentation, it seems like my setup.py and MANIFEST.in files should be including the flux/templates/flux/*.html data files, for example, but they are not included when I install the app via pip for some reason.

Any suggestion on what I am doing wrong? How can you install django templates (among other non-python files)?

For reference, I have distutils 2.7.3.

like image 912
dino Avatar asked Dec 03 '12 23:12

dino


1 Answers

You are missing include_package_data=True in your setup function.

For more information on this you could turn to Flask's excellent documentation which covers writing a Basic Setup Script:

include_package_data tells distribute to look for a MANIFEST.in file and install all the entries that match as package data.

Then your are importing find_packages but aren't using it so far (packages = find_packages())

like image 124
arie Avatar answered Oct 03 '22 02:10

arie