Search code examples
pythonsetuptoolsdistutils

Can't figure out how to include *.html files within a site-packages folder


I cannot figure out how to write my setup.py script in order to include *.html files within the installed package.

Here is my attempt:

import os
from setuptools import setup, find_packages

setup(name='django-testapp',
  version='0.1',
  author='RadiantHex',
  license='BSD',
  keywords='testapp,django',
  packages=['testapp']],
  include_package_data=True,
  data_files = os.walk('testapp'),
  zip_safe = False,
  )

The *.html files are contained within the testapp folder.


Any ideas?


Solution

  • Add following 'package_data' argument to the setup():

    setup(...,
        package_data={
            'testapp' : ['testapp/*.html']
        }, ...)