Commits

Luke Plant committed f701606

Fixed setup.py and friends to include package data

  • Participants
  • Parent commits 9beb573

Comments (0)

Files changed (2)

 include *.rst
 include LICENSE
 include AUTHORS
+include MANIFEST.in
 include docs/Makefile
 include docs/conf.py
 include manage.py
 include test_settings.py
 recursive-include docs *.rst
+recursive-include django_easyfilters/tests *
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
+def find_package_data(pkg, filetypes):
+    import glob
+    import itertools
+
+    out = []
+    for f in filetypes:
+        for x in range(0, 20):
+            pattern = pkg + '/' + ('*/' * x) + f
+            out.extend([p[len(pkg)+1:] for p in glob.glob(pattern)])
+    print out
+    return out
+
 
 setup(
     name = "django-easyfilters",
     version = '0.1',
     packages = find_packages(),
-    include_package_data = True,
-
     author = "Luke Plant",
     author_email = "L.Plant.98@cantab.net",
     url = "https://bitbucket.org/spookylukey/django-easyfilters/",
                         + "\n\n" +
                         read('CHANGES.rst')
     ),
+    package_data = {
+        'django_easyfilters': find_package_data('django_easyfilters', ['*.json', '*.html', '*.css', '*.js'])
+        },
     license = "MIT",
     keywords = "django filter autofilter drilldown easy simple",
     classifiers = [