From 41456cad9ebb1d01c8829ab342f242d959a5b480 Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Thu, 31 Jul 2014 14:51:57 -0400 Subject: [PATCH] Match setup.py format from newer XBlock boilerplate --- setup.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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"]), ) -- 1.7.10.4