X-Git-Url: http://git.indexdata.com/?p=mkwsxb-moved-to-github.git;a=blobdiff_plain;f=mkwsbiblio%2Fsetup.py;fp=mkwsbiblio%2Fsetup.py;h=bf89297bc2896e2069a868d318166f57e9967121;hp=0000000000000000000000000000000000000000;hb=7d9d7826c10263bdbf9e8721832ff79229ae13f0;hpb=d88ca3ff75e178263c51153b9ed6468ab2b859a4 diff --git a/mkwsbiblio/setup.py b/mkwsbiblio/setup.py new file mode 100644 index 0000000..bf89297 --- /dev/null +++ b/mkwsbiblio/setup.py @@ -0,0 +1,37 @@ +"""Setup for mkwsbiblio XBlock.""" + +import os +from setuptools import setup + +def package_data(pkg, roots): + """Generic function to find package_data. + + All of the files under each of the `roots` will be declared as package + data for package `pkg`. + + """ + data = [] + 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='mkwsbiblio', + version='0.1', + description='XBlock to embed a bibliographic record via MKWS', + packages=[ + 'mkwsbiblio', + ], + install_requires=[ + 'XBlock', + ], + entry_points={ + 'xblock.v1': [ + 'mkwsbiblio = mkwsbiblio:MKWSBiblio', + ] + }, + package_data=package_data("mkwsbiblio", ["static", "public"]), +)