From: Jason Skomorowski Date: Thu, 31 Jul 2014 18:51:57 +0000 (-0400) Subject: Match setup.py format from newer XBlock boilerplate X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=41456cad9ebb1d01c8829ab342f242d959a5b480;p=mkwsxb-moved-to-github.git Match setup.py format from newer XBlock boilerplate --- diff --git a/setup.py b/setup.py index a564fbf..7de2766 100644 --- a/setup.py +++ b/setup.py @@ -3,21 +3,25 @@ import os from setuptools import setup +def package_data(pkg, roots): + """Generic function to find package_data. -def package_data(pkg, root): - """Generic function to find package_data for `pkg` under `root`.""" + All of the files under each of the `roots` will be declared as package + data for package `pkg`. + + """ data = [] - for dirname, _, files in os.walk(os.path.join(pkg, root)): - for fname in files: - data.append(os.path.relpath(os.path.join(dirname, fname), pkg)) + for root in roots: + for dirname, _, files in os.walk(os.path.join(pkg, root)): + for fname in files: + data.append(os.path.relpath(os.path.join(dirname, fname), pkg)) return {pkg: data} - setup( name='mkwsxb-xblock', version='0.1', - description='XBlock to embed MKWS widgets.', + description='XBlock to embed MKWS widgets', packages=[ 'mkwsxb', ], @@ -29,5 +33,5 @@ setup( 'mkwsxb = mkwsxb:MKWSXB', ] }, - package_data=package_data("mkwsxb", "static"), + package_data=package_data("mkwsxb", ["static", "public"]), )